What’s RDS Multi-AZ?

What’s RDS Multi-AZ?

Multi-AZ means Multi-Availability Zone

  • It is a feature that is used to help with resilience and business continuity.
  • Multi-AZ configures a secondary RDS instance(replica) within a different availability zone in the same Region as a primary instance.
  • The only purpose of Multi-AZ is to provide a failover option for the primary RDS instance. It’s not to be used as a secondary replica to offload read-only traffic to.
  • The replication of data happens synchronously.
  • RDS uses a Failover mechanism on Oracle, Mysql, MariaDB, and Postgre SQL instances. if you have configured Multi-AZ for one of these engine types and an incident occurs which causes an outage to the primary RDS instance, then the RDS failover process will take over automatically.
  • The RDS failover process happens automatically and is managed by AWS
  • RDS updates the DNS record to point to the secondary instance within 60–120 seconds.
  • This Failover process will happen in the following scenarios on the primary instance:
    1. Patching maintenance
    2. Host failure
    3. Availability Zone Failure
    4. Instance rebooted with Failover
    5. DB instance class is modified

How can you be made aware of when this event occurs?

The RDS Failover triggers an event that is recorded as RDS-EVENT-0025 when the failover process is complete. This allows you to configure RDS to notify you by SMS or SNS when this event is triggered.

These events are also recorded within the RDS Console.

If you are curious about how to configure failover notification click here

SQL Server Mirroring

SQL Server Multi-AZ is achieved through the use of SQL Server Mirroring.

  • Multi-AZ is available on SQL Server 2008 R2, 2012, 2014, 2016, and 2017 on both Standard and Enterprise Editions.
  • SQL Mirroring provisions a secondary RDS instance in a separate AZ than that of the primary RDS instance to help with resilience and fault tolerance.
  • Both primary and secondary instances in SQL Server mirroring use the same Endpoint.

Before enabling SQL Mirroring, you need to ensure you have your environment configured correctly first.

  • You need to have a database subnet group must be configured with a minimum of 2 different AZ’s within it.
  • You can specify which availability zone the standby mirrored instance will reside in. It’s always a good practice to architect your application that communicates with the RDS database across Multi-AZs.
  • To check which AZ the standby instance in you can use the AWS CLI command ‘ describe-db-instances’

Amazon Aurora DB

Amazon Aurora is different from the previous DB engines when it comes to resiliency across more than a single AZ.

  • Aurora DB clusters are fault-tolerant by default.
  • This is achieved within the cluster by replicating the data across different instances in different AZs.
  • Aurora can automatically provision and launch a new primary instance in the event of a failure, which can take up to 10 minutes which can be a significant amount of time if the database is being used within a critical production environment. However, this time can be significantly reduced if you enable Multi-AZ on your Aurora cluster which allows RDS to automatically provision a replica within a different AZ.
  • Should a failure occur, the replica instance is promoted to the new primary instance without having to wait for 10 minutes.
  • This creates a highly available and resilient database solution.
  • It’s possible to create up to 15 replicas if required, each with a different priority.

Disclaimer, I’m writing a blog to keep track of my notes during pursue getting AWS Certified Developer — Associate Certification

Thank you for reading and please share if you like it.

Follow me on Twitter or LinkedIn if you like.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store