Description: An explanation of how databases like Cassandra and RocksDB use Log-Structured Merge Trees and Sorted String Tables to handle millions of writes per second.
Date: August 24, 2025
Traditional databases often struggle with a classic trade-off: optimize for writes, and reads suffer. LSM Trees take a different approach — they prioritize write performance and accept that reads will be slower.
Sorted String Tables (SSTables) are key-value files where the keys are stored in sorted order. SSTables are immutable and append-only — once written to disk, they never change. This makes writes incredibly fast because they are pure sequential I/O.
To avoid searching every SSTable for a key that doesn’t exist, a Bloom filter is used. It can tell you with 100% certainty if a key does not exist in a data file, preventing the worst-case search scenario.
Read the full, original article on LinkedIn.