Code Room
System designMedium
Question
Design the write-ahead log for a single-node relational OLTP engine that must guarantee durability (committed transactions survive a crash) and atomicity (no torn writes), while sustaining 60k small transactions/sec with a commit-latency p99 under 5ms. The dataset is 500GB on NVMe; in-place page updates are used for the main heap/index. Describe the WAL record format, the commit protocol, how recovery works, and the main throughput trade-off.
What a strong answer looks like
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.