LSMtree
An LSM-tree, or Log-Structured Merge-Tree, is a data structure and storage architecture designed to optimize write throughput for disk-based systems. It buffers incoming writes in memory and periodically flushes them to disk in sorted runs, avoiding random writes and enabling sequential disk I/O. The structure is particularly suited to workloads with high write rates and reads that can tolerate some extra lookup logic.
In an LSM-tree, data is first written to an in-memory data structure called a memtable. When the
Reads in an LSM-tree search the memtable first, then consult in-memory indexes and on-disk SSTables, often aided
LSM-trees are widely used in modern NoSQL databases and storage engines, including LevelDB, RocksDB, Apache Cassandra,