▶ Interactive Lab

Compaction Strategies — STCS vs LCS vs TWCS

Watch how each strategy merges SSTables over time.

Advertisement
Each write produces an SSTable. Compaction merges based on strategy.

What you're seeing

STCS: Merges similarly-sized SSTables. Good write throughput; reads touch many files.

LCS: SSTables in levels; each level is sorted non-overlapping. Reads touch few files; write amplification high.

TWCS: Window per time bucket; never compacts across windows. Perfect for time-series with TTL.

★ KEY TAKEAWAY
STCS: merges similar-sized SSTables. LCS: leveled, low read amp. TWCS: time-windowed, perfect for time-series.
▶ WHAT TO TRY
  • Switch strategies and write more SSTables.
  • Click Trigger compaction — see how each merges differently.