How it works
Memtable and flush
Writes enter an ordered in-memory table and a recovery log, then flush to disk as an immutable sorted string table.
Compaction
Background work merges overlapping files, discards overwritten or deleted values, and maintains the chosen level structure.
Read path
A lookup may check memory and several disk files, so indexes and Bloom filters skip files that cannot contain the key.
Amplification tradeoffs
Compaction strategy balances extra bytes read, extra bytes written, temporary space, and lookup latency.