Multi-AZ DB Instance
A deployment model where AWS RDS maintains two DB instances across two Availability Zones:
- Master DB Instance — handles all read/write traffic
- Standby DB Instance — kept in sync via synchronous replication
Key Characteristics
| Feature | Detail |
|---|---|
| Replication | Synchronous (zero data loss) |
| Failover | Automatic |
| Endpoint | Single read/write endpoint |
| Standby accessibility | ❌ Not accessible directly |
Failover Works
- If the master fails, AWS automatically promotes the standby to master.
- The endpoint remains the same — no application changes needed.
- Failover typically completes in 60–120 seconds.
Use Case
- Production workloads that require high availability and cannot tolerate downtime.
Multi-AZ DB Cluster
An enhanced deployment model that creates:
- 1 Primary DB Instance (read/write)
- 2 Readable Standby DB Instances (across different AZs)
Key Characteristics
| Feature | Detail |
|---|---|
| Replication | Synchronous |
| Failover | Automatic & faster than single Multi-AZ |
| Write Endpoint | 1 (points to primary) |
| Read Endpoint | 1 (load-balanced across standbys) |
| Standby accessibility | ✅ Yes — for reads |
Endpoints Available
- Write Endpoint → routes to the Primary instance
- Read Endpoint → routes to the two readable standbys
Use Case
- High-traffic production apps needing both HA and read scalability without separate read replicas.
Read Replicas
Separate DB instances that receive replicated data from the source (master) instance asynchronously.
Key Characteristics
| Feature | Detail |
|---|---|
| Replication | Asynchronous (lag typically in seconds) |
| Region | Can be in any AWS region |
| Endpoint | Separate read-only endpoint |
| Promotion | Can be promoted to standalone R/W instance |
| Prerequisite | Automated backups must be enabled on source |
Comparison Table
| Feature | Multi-AZ Instance | Multi-AZ Cluster | Read Replica |
|---|---|---|---|
| Primary goal | High Availability | HA + Read Scale | Read Scalability |
| Replication type | Synchronous | Synchronous | Asynchronous |
| Standby readable? | ❌ No | ✅ Yes | ✅ Yes |
| Cross-region? | ❌ No | ❌ No | ✅ Yes |
| Automatic failover | ✅ Yes | ✅ Yes | ❌ No |
| Separate read endpoint | ❌ No | ✅ Yes | ✅ Yes |
CREATE DATABASE testdb;
USE testdb;
CREATE TABLE employees (id INT PRIMARY KEY, name VARCHAR(50));
INSERT INTO employees VALUES (1, 'Alice'), (2, 'Bob');
SELECT * FROM employees;
Query
USE testdb;
SELECT * FROM employees;
Aurora DB overview: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Overview.html
