LSM Databases

Master Log-Structured Merge Trees through interactive visualizations. Learn how databases like RocksDB, LevelDB, and Cassandra achieve incredible write performance.

What is an LSM Tree?

A Log-Structured Merge Tree (LSM Tree) is a data structure designed for high write throughput. Instead of updating data in place (like B-trees), LSM trees buffer writes in memory and periodically flush them to immutable files on disk. This transforms random writes into sequential writes, dramatically improving write performance on both SSDs and HDDs.

SST Files

Understand Sorted String Tables - the immutable, sorted files that store your data on disk

MemTable

Explore the in-memory write buffer that captures all writes before flushing to disk

Write-Ahead Log

Understand how RocksDB makes every write durable — block structure, CRC, fsync, and crash recovery

LSM Levels

Coming Soon

See how data is organized into levels and why this structure enables fast writes

Compaction

Coming Soon

Watch how SST files are merged and compacted to reclaim space and improve read performance

Bloom Filters

Coming Soon

Learn how probabilistic data structures help avoid unnecessary disk reads