Read-heavy at scale
CloudFront → ALB → an auto-scaling group → Aurora with two read replicas. At 40 s the primary fails.
What this architecture teaches
Read-heavy products scale reads in layers: a CDN answers what it can at the edge, read replicas answer most of the rest, and only writes must reach the primary.
At 40 seconds the primary database is killed. Reads keep working from the replicas, but writes fail until Aurora promotes a replica to primary — about 30 seconds here. That window is your write downtime during a failover.
Look at the error rate during the failover: it matches the share of writes in your traffic.
What to look for
- CloudFront answers most reads at the edge
- Reads go to replicas, writes to the primary
- When the primary dies, writes fail until a replica is promoted (30 s)
Components
- Web users — Web browser (Traffic source)
CloudFront — Amazon CloudFront (CDN)
ALB — Application Load Balancer (Load balancer)
api — EC2 Auto Scaling (Server group)
aurora — Amazon Aurora (Relational DB)
aurora replica 1 — Amazon Aurora (Relational DB)
aurora replica 2 — Amazon Aurora (Relational DB)
Scripted events
- At 40 s: aurora is killed