LSM-tree storage engine
Your task
Design an LSM-tree (log-structured merge) storage engine to back a write-heavy key-value store: ~500K writes/sec of 200-byte records, a 10:1 write-to-read ratio, point lookups and short range scans, and a strict durability guarantee that an acknowledged write survives a single-node crash. Walk through the in-memory and on-disk structures, how reads are served, and how background work keeps the engine healthy under sustained load.
It covers
- Lsm tree
- Compaction
- Write amplification