Design a two-region API and database that survives losing a region
Choose replication from the recovery point, add up the failover clock against a 5-minute objective, and size each region to carry the other.
Prompt
An order API takes 12,000 requests/s at peak, 10% of them writes, and keeps its state in one relational database. It runs in two regions. Design it to survive the loss of either region with a recovery time objective (RTO) of 5 minutes and a recovery point objective (RPO) of 5 seconds: replication, how traffic moves, what happens to writes in flight, and how failover is triggered and tested.
Questions worth clarifying
- RTO 5 minutes and RPO 5 seconds apply to losing a whole region, not a single host
- One writable primary at a time; the other region holds a replica and serves reads
- Losing up to 5 s of acknowledged writes is accepted; two writable primaries is not
- Clients retry failed writes with an idempotency key
- Failover may be automatic; failing back is a planned change
Inputs you will estimate from
Peak requests/sWritesRegionsRequests/s per API instanceLog bytes per writeReplication lag p99Time to detectFence and promoteDNS TTL
Free to try · sign in to save your attemptOpen the workbench with live capacity math
Open in the app