Question
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).
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.