corner gradient
Blog

RDS DB Instances Should Be Configured with Multiple Availability Zones

RDS DB Instances Should Be Configured with Multiple Availability Zones

When Multi-AZ is enabled, AWS automatically provision and maintain a synchronous database standby replica on a dedicated hardware in a different datacenter (known as Availability Zone). AWS RDS will automatically switch from the primary cluster to the available standby replica in the event of a failure such as an Availability Zone outage, an internal hardware or network outage, a software failure or in case of planned interruptions such as software patching or changing the RDS cluster type.

AWS RDS is a fully managed database service that makes it easy to set up, operate and scale a relational database in the cloud. The service supports multiple database engines including Oracle, PostgreSQL, MySQL and Microsoft SQL Server. There are two types of AWS RDS instances – Multi-AZ (with automatic failover) and Single-AZ. When Multi-AZ is enabled, AWS automatically provision and maintain a synchronous database standby replica on a dedicated hardware in a different datacenter (known as Availability Zone). AWS RDS will automatically switch from the primary cluster to the available standby replica in the event of a failure such as an Availability Zone outage, an internal hardware or network outage, a software failure or in case of planned interruptions such as software patching or changing the RDS cluster type.

In order to switch the instances, AWS RDS terminates the instance and launches a new one. Since it is a standard multi-AZ deployment, the failover process is transparent to the connected applications. During this time, RDS will have a brief period of unavailability as it switches over to the standby replica. This can range from several minutes to tens of minutes depending on the size and complexity of your RDS instance.

In order to switch the instances, AWS RDS terminates the instance and launches a new one. Since it is a standard multi-AZ deployment, the failover process is transparent to the connected applications. During this time, RDS will have a brief period of unavailability as it switches over to the standby replica. This can range from several minutes to tens of minutes depending on the size and complexity of your RDS instance.

If your application needs to connect with an active database during this time frame then you should set up connection timeout values that are higher than normal levels before switching over so that connections are not broken during failover events

The entire failover process is coordinated by the Amazon DNS service. There are two A record sets in a multi-AZ deployment that point to the primary DB instance and its standby instance in another Availability Zone respectively. When there is a failover, Amazon DNS automatically changes the A record sets so that they point to the standby DB instance and its secondary Availability Zone respectively.

When you enable Multi-AZ, AWS will automatically provision and maintain a synchronous database standby replica on a dedicated hardware in a different datacenter (known as Availability Zone). AWS RDS will automatically switch from the primary cluster to the available standby replica in the event of a failure such as an Availability Zone outage, an internal hardware or network outage, a software failure or in case of planned interruptions such as software patching or changing the RDS cluster type.

When Multi-AZ is enabled, both primary and secondary replicas are hosted with two separate DB instances. The entire failover process is coordinated by Amazon DNS service. There are two A record sets in a multi-AZ deployment that point to primary DB instance and its standby instance in another Availability Zone respectively. When there is a failover, Amazon DNS automatically changes the A record sets so that they point to secondary DB instance and its replica for high availability

The entire failover process is coordinated by the Amazon DNS service. There are two A record sets in a multi-AZ deployment that point to the primary DB instance and its standby instance in another Availability Zone respectively. When there is a failover, Amazon DNS automatically changes the A record sets so that they point to the standby DB instance and its secondary Availability Zone respectively.

The entire failover process is coordinated by the Amazon DNS service. There are two A record sets in a multi-AZ deployment that point to the primary DB instance and its standby instance in another Availability Zone respectively. When there is a failover, Amazon DNS automatically changes the A record sets so that they point to the standby DB instance and its secondary Availability Zone respectively.

The following sections provide step-by-step instructions for changing your DNS settings to enable Multi-AZ deployments of RDS databases:

  • Using Amazon RDS Manager
  • Using AWS CLI

Using the Amazon RDS Management Console Using RDS Manager To change your DNS settings using the Amazon RDS Manager, follow these steps: 1. In the AWS console, select Services > Amazon RDS. 2. On the dashboard, choose a DB instance and then choose Instance Actions > Modify in the Actions menu. 3. In the Modify DB Instance dialog box, choose Availability Zone as shown below: 4. Click Continue to proceed with changing your DNS settings

Conclusion

In this post, we learned about the advantages of Multi-AZ deployments and saw how they work in practice. We also covered some of the common scenarios in which you may want to enable Multi-AZ on your RDS instance(s). As with any other Amazon Web Services product, it is important that you understand what Multi-AZ is before enabling it on your environment. If you have any questions, please feel free to leave them in the comments section below!

Comments

No comments yet! Why don't you be the first?
Add a comment

Get started with MatosSphere today

Get Demo