LSMTrees
A log-structured merge-tree (LSM-tree) is a data structure and storage architecture designed to optimize write-heavy workloads by buffering writes in memory and writing them to disk in large, sequential batches. It supports efficient range queries and updates, and is widely used in modern NoSQL databases.
In an LSM-tree, incoming writes first go to an in-memory structure called a memtable, and are also
Compaction is central to LSM-tree maintenance. It merges overlapping key ranges from smaller SSTables and rewrites
Read operations consult the memtable first and, if not found, search SSTables across levels, often using Bloom
LSM-trees underpin several well-known databases, including LevelDB and RocksDB, and are used by Cassandra and HBase.