You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Production databases need to survive hardware failures and handle growing read traffic. Amazon RDS provides two complementary features to address these requirements: Multi-AZ deployments for high availability and read replicas for horizontal read scalability.
When you enable Multi-AZ, RDS automatically provisions and maintains a synchronous standby replica in a different Availability Zone within the same Region.
| Event | Automatic Failover? |
|---|---|
| Primary AZ outage | Yes |
| Primary host failure | Yes |
| Primary instance unresponsive | Yes |
| Storage failure on primary | Yes |
| Manual reboot with failover | Yes (you initiate) |
| DB engine patching | Yes (if maintenance window triggers reboot) |
| Scaling instance class | Brief downtime, not a failover |
RDS provides a single DNS endpoint for your database. During failover, RDS updates the DNS record to point to the new primary. Your application does not need to change its connection string — it just needs to handle a brief disconnection and reconnect.
mydb.cxyz123abc.us-east-1.rds.amazonaws.com → Primary (AZ-a)
failover → Standby promoted (AZ-b)
In 2022, AWS introduced the Multi-AZ DB Cluster deployment for MySQL and PostgreSQL. This creates a cluster with:
| Feature | Classic Multi-AZ | Multi-AZ DB Cluster |
|---|---|---|
| Standby instances | 1 (not readable) | 2 (readable) |
| Failover time | 60–120 s | ~35 s |
| Read scaling | No | Yes |
| Engines | All six | MySQL 8.0, PostgreSQL 13+ |
Read replicas use the engine's native asynchronous replication to stream changes from the primary to one or more replicas. Replicas are read-only and can serve SELECT queries, reducing the load on the primary.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.