Code RoomCompaction I/O starves foreground reads
HardPrep Room Coding #3430

Compaction I/O starves foreground reads

System designDistributed systemsSenior–Staff~45 min

An LSM store handles ingest fine most of the time, but during traffic bursts foreground reads/writes spike AND compaction has to run to keep the LSM shape healthy — and they fight over the same disk I/O. Symptoms: read p99 spikes during compaction, and occasionally writes STALL entirely because L0 files pile up faster than compaction drains them. Design the compaction scheduler / I/O controller that keeps the tree healthy without letting background compaction starve foreground latency, and explain the dilemma (why you can't just deprioritize compaction).

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.

Clarify5:00 left
Estimate5:00 planned
Design15:00 planned
Deep dive12:00 planned
Failure8:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.