AWS Database Architecture
RDS Multi-AZ vs Read Replicas
Choosing between High Availability for disaster recovery and Horizontal Scaling for performance.
Multi-AZ Setup
The “Insurance Policy”
- Primary DB Instance: The main engine handling all Read/Write traffic.
- Standby Instance: An exact replica located in a different Availability Zone.
- Synchronous Replication: Data is written to both places simultaneously before a commit.
Read Replica Setup
The “Performance Booster”
- Primary DB Instance: Handles all Writes and some Reads.
- Read-Only Replicas: Up to 15 copies (can be in different regions).
- Asynchronous Replication: Data is copied after the commit (eventual consistency).
How Data Flows
Multi-AZ (HA)
One DNS endpoint. If Primary fails, RDS automatically flips the record to Standby.
Read Replicas (Scaling)
Scale out read-heavy apps. Each replica has its own endpoint or use a Load Balancer.
Comparison Matrix
Multi-AZ
Read Replicas
Primary Purpose
Multi-AZ:
High Availability / Disaster Recovery
Read Replicas:
Scalability / Performance
Why use it?
Replication Type
Synchronous (No data loss)
Asynchronous (Lag possible)
How data moves?
Failover
Automatic (Zero manual intervention)
Manual (Must be promoted to Primary)
System failure?
Backups
Taken from Standby (No impact on Primary)
Not applicable for backup source
Performance impact?