LSM trees

Log-structured merge trees buffer writes in memory and flush them as sorted files that are merged in the background. Writes are very fast; reads may check several files, helped by Bloom filters.

Where it shows up in real systems

  • Wide-column store

    Every node accepts writes and each row is stored on RF replicas. The consistency level decides how many replicas must answer: ONE is fast and stays available when nodes fail but can return stale data; QUORUM on both reads and writes guarantees you read your latest write, at the cost of latency and availability. This is PACELC in practice.

    In production: Apache Cassandra, ScyllaDB, Amazon Keyspaces, Azure Managed Instance for Cassandra

  • Time-series database

    Writes are append-only and compressed by time, and queries aggregate ranges such as an average per minute. Downsampling and retention policies keep storage under control.

    In production: InfluxDB, TimescaleDB, Amazon Timestream, Prometheus TSDB, QuestDB

See it break, then fix it

Build an architecture, send it a day of traffic and outages, and learn why it holds or fails. Free to start.