What is 'Data Compaction' in LSM-based databases?

What is 'Data Compaction' in LSM-based databases?

Approach: Explain background merging of storage files.

The background process of merging smaller, sorted files (SSTables) into larger ones while removing deleted or overwritten entries to reclaim space and improve read performance.

Follow-up: Which databases use this approach (e.g., Cassandra, RocksDB)?

Key concepts: sstables, garbage collection, write amplification.