Code Room
System designHardsd-g294
Subject Write ahead logLevel Senior–Staff~45 minCommon in Storage & CDN interviewsIndustries Technology, Software development

Question

A single-node OLTP engine's commit path is fsync-bound: every committing transaction calls fsync on the WAL to be durable, and under 50k tx/sec the disk can't sustain one fsync per commit — throughput collapses and commit latency spikes. You must raise commit throughput without weakening the durability guarantee (a transaction reported committed must survive a power loss). Design the WAL write/commit path: how you batch durability work across concurrent committers, how you keep latency bounded, and the knobs that trade latency for throughput.

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.