NoSQL Internals HLD: The LSM Tree That Makes Writes Cheap
How a write-optimized NoSQL store works inside: the LSM tree (memtable, write-ahead log, immutable SSTables), the read path with bloom filters, compaction and tombstones, and LSM versus B-tree.
"How does a NoSQL database work inside?" Half the articles on this site reach for Cassandra or RocksDB whenever the load is write-heavy — and this is why. Under the hood they don't use the B-tree a relational database does; they use a log-structured merge-tree (LSM), which turns every write into a cheap append plus a sequential flush instead of a random in-place page update. That single choice is what lets them swallow a firehose of writes — and the price it pays (reads must check several files) is bought back by compaction. Three pieces carry it: an in-memory memtable (plus a write-ahead log …
What’s inside
Read this one free
Sign in and your first premium article is on us — read NoSQL Internals HLD: The LSM Tree That Makes Writes Cheap free.