Code Room
System designHard
Question
Design the on-disk B+tree index structure for a single-node embedded OLTP store (think SQLite/LMDB class) that must support fully ACID transactions, crash safety without a separate WAL if possible, and many concurrent readers that never block a writer. Workload is 95% point lookups and short range scans, 5% updates, dataset ~200GB on a single NVMe drive, p99 read latency target 2ms. Walk through the page/node layout, how you achieve durability and reader/writer concurrency, and the central trade-off of your design.
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.