Design a cloud database's write path and crash recovery
I was asked this
No reports yet. Sign in to say where you were asked it.
A system design interview question asked in Amazon's technical phone screen, last asked Jan 2026. It tests databases, durability and replication.
Design how writes flow through a managed cloud relational database whose compute (the database engine) is separate from a distributed, replicated storage layer. Trace a transaction from the client's COMMIT to durable storage, explain how data is replicated across machines and availability zones, and how the system recovers after a crash or the loss of a node or a whole zone.
Requirements
- Functional: a committed transaction survives any single failure; read replicas serve reads; a failed primary is replaced automatically.
- Non-functional: low commit latency, durability across zones, recovery in seconds rather than minutes, and limited write amplification.
Clarifying questions
- What failures must we survive: a node, a zone, a zone plus one more node?
- Are read replicas allowed to lag, and by how much?
- Single writer, or several?
- What recovery time and recovery point does the product promise?
What a strong answer covers
- The commit path: the engine writes redo log records (not whole pages) to storage, and a commit is acknowledged once a write quorum (for example 4 of 6 copies across 3 zones) has the log durable.
- Quorum rules that tolerate losing a zone for writes and a zone plus a node for reads, and why read and write quorums must overlap.
- Storage nodes applying log records to pages in the background; gossip among replicas to fill gaps; repairing a lost segment quickly by keeping segments small.
- Crash recovery: the new engine finds the highest durable, contiguous log position and resumes without replaying the whole log; undo of uncommitted transactions in the background.
- Read replicas fed by the log stream and their lag; what a reader can see during a failover.
- Write amplification compared with shipping full pages, and the metrics you'd watch (commit latency, quorum health, replica lag).
Follow-ups
- Support several writers at once: how are conflicts detected?
- A whole region fails: what does cross-region replication cost in latency and data loss?
- Take a consistent backup or snapshot without pausing writes.
Where it's asked
- Amazon · Technical phone screen · Last asked Jan 202660 min · Live coding in a shared editor that does not run code, plus Leadership Principles questions · No AI
What it tests
databases · durability · replication · recovery
No official answer yet. Draw yours on the right; publish it and it shows under Community.
Nothing published yet. Publish your canvas and it shows here for others to open and remix.
