Search code examples
amazon-web-servicesamazon-rdsavailability-zone

Running aws RDS MySQL in 3 AZs


I'm planning to run MySQL RDS. My question is Is it possible to run MySQL in 3 availability zones? Or is it only limited to 2 AZs. If it's running in 3AZs does it mean I get better redundancy compare with running in two AZs?


Solution

  • Using the RDS Multi-AZ High Availability feature1 you can only have one stand-by replica:

    In a Multi-AZ deployment, Amazon RDS automatically provisions and maintains a synchronous standby replica in a different Availability Zone. The primary DB instance is synchronously replicated across Availability Zones to a standby replica to provide data redundancy, eliminate I/O freezes, and minimize latency spikes during system backups. Running a DB instance with high availability can enhance availability during planned system maintenance, and help protect your databases against DB instance failure and Availability Zone disruption.

    This is only a failover solution -- you can't use the standby for load balancing.

    You can create additional Read Replicas2 that cover other availability zones and can be used to horizontally scale read traffic. But there are two caveats:

    • Unlike the standby, RDS cannot automatically fail over to a read replica when the primary DB goes down. You would need to implement this yourself using other tools like Route53.
    • Read replicas use asynchronous replication, so they may lag behind the master. You need to determine if this is acceptable in your failover scenario.