Survive a database failure
Statement
A payment service: 800 requests/s. At second 30 the primary database fails for 45 seconds. Without a replica that is a single point of failure: every request errors. With a read replica attached to the primary, reads move to it at once and after 15 seconds the replica is promoted and takes writes too. Up to 5 % errors are tolerated during the outage, but in the last 30 seconds the system must be fully back to normal. Pick the replica’s tier so it can carry everything once promoted.
Constraints
- p95 ≤ 250 ms, errors ≤ 0.1 % (≤ 5 % during the outage), recovery in the last 30 s, budget $2000/month.