This simulation demonstrates how an LSM tree routes writes through an in-memory memtable into immutable on-disk SSTables, how reads must search the memtable and then SSTables from newest to oldest, how bloom filters let reads skip files that cannot contain a key, and how background compaction merges SSTables to bound read cost and reclaim space from overwritten or deleted keys.
Add writes to fill the memtable and watch it flush into a new SSTable on disk. Issue reads for different keys and observe the search order: memtable first, then SSTables from newest to oldest, with bloom filters shown skipping files that cannot contain the key. Trigger compaction to merge SSTables and see the file count drop, stale versions and tombstones disappear, and subsequent reads become cheaper.
Controls let you write key-value pairs to trigger memtable growth and flushes, issue point reads to trace the memtable-then-SSTables search path with bloom filter skips highlighted, and manually trigger compaction to merge SSTables and observe the resulting drop in file count and read cost.
Did you know that Google's original Bigtable paper introduced the SSTable and popularized the LSM tree design, and that the same core idea now powers Cassandra, HBase, RocksDB, LevelDB, and even parts of modern versions of MySQL's storage layer through engines like MyRocks?
This simulation demonstrates how an LSM tree routes writes through an in-memory memtable into immutable on-disk SSTables, how reads must search the memtable and then SSTables from newest to oldest, how bloom filters let reads skip files that cannot contain a key, and how background compaction merges SSTables to bound read cost and reclaim space from overwritten or deleted keys.
This simulation demonstrates how an LSM tree routes writes through an in-memory memtable into immutable on-disk SSTables, how reads must search the memtable and then SSTables from newest to oldest, how bloom filters let reads skip files that cannot contain a key, and how background compaction merges SSTables to bound read cost and reclaim space from overwritten or deleted keys.
Add writes to fill the memtable and watch it flush into a new SSTable on disk. Issue reads for different keys and observe the search order: memtable first, then SSTables from newest to oldest, with bloom filters shown skipping files that cannot contain the key. Trigger compaction to merge SSTables and see the file count drop, stale versions and tombstones disappear, and subsequent reads become cheaper.
Did you know that Google's original Bigtable paper introduced the SSTable and popularized the LSM tree design, and that the same core idea now powers Cassandra, HBase, RocksDB, LevelDB, and even parts of modern versions of MySQL's storage layer through engines like MyRocks?