Code RoomLSM vs B+tree engine choice
MediumPrep Room Coding #3159

LSM vs B+tree engine choice

System designDatabases & SQLStorage & CDNMid–Senior~40 min

Your team is choosing the storage engine for a new service and the platform offers both an LSM-tree engine and a B+tree engine under the same API (think MongoDB WiredTiger vs MyRocks, or RocksDB vs an in-place B-tree). The workload: write-heavy (10:1 write:read), keys are random UUIDs, values ~1KB, data grows ~1TB/month, reads are mostly point lookups of recently written keys, on commodity SSDs where write endurance and disk cost matter. Pick an engine, justify it on first principles, and state the conditions under which you'd switch to the other.

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.

Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.