This lab walks you through the steps to launch an Amazon Aurora RDS DB instance with multi-AZ enabled. We will also simulate a database failover from one AZ to another.
You will practice using Amazon Aurora.
Duration: 1 hour 30 minutes
AWS Region: US East (N. Virginia) us-east-1
Amazon Relational Database Service (Amazon RDS) is a Relational Database service that offers high availability and throughput.
Amazon RDS comes with great features that include Multi-AZ feature and Read Replica that ensures no data loss.
Amazon RDS also provides you high scalability where you can scale up and scale down depending on your needs.
Multi-Availability zone ( Multi-AZ ) is a feature that comes with Amazon RDS that provides you with high availability and durability for Database instances.
When we are opting for the Multi-AZ database instance, it will automatically create a Primary DB instance and parallelly replicate the data to the standby instances in different availability zones in that region. However, we can't access the standby instances, unlike primary instances.
The main purpose of Multi-AZ is to provide a failover option for primary RDS instances.
Amazon RDS uses the Failover mechanism for Oracle, MYSQL, MariaDB and PostgreSQL instances.
The RDS Failover process happens automatically and is managed by AWS without human intervention.
Amazon RDS uses the concept of SQL Mirroring for Replicating data to standby instances in the different availability zones and both primary and standby instances use the same endpoint.
The failover process will take place due to one of the following reasons occurring in the primary instances:
DB instance class modification.
Availability zone failure
A minimum of two different availability zones should be present in a DB subnet group where you are launching your Primary DB instance.
Amazon Aurora is the DB instance, which is a little different when comparing to the above-mentioned Instance types.
Aurora uses the concept of a DB cluster where the primary instance replicates its data across different availability zones.
In the case of a primary instance failure, Aurora automatically launches its primary instance from the replicated instance in a different availability zone.
Multi-AZ on Aurora clusters makes RDS replicate or provision a replica of the master database to a different availability zone within a Region.
Launching Lab Environment
Launch an EC2 Instance
Create a Security Group for RDS instance
Create an Amazon Aurora database with Multi-AZ enabled
Connecting to the Aurora (MySQL) database on RDS
Connecting the EC2 Server to RDS
Execute Database Operations via SSH
Forcing a Failover to Test Multi-AZ
Testing the Failover Condition
Validation of the lab
Deleting AWS resources