Cianplan

Level 2: Data · L2.1 Data models, SQL vs NoSQL, storage engines & indexing

LSM-trees: built for writes

Explain memtables, SSTables, compaction and write vs read amplification.

13 min · Pro

What you take away

  • Writes go to a write-ahead log and an in-memory sorted table, then flush to immutable sorted files — all sequential.

And 3 more inside the class, in Pro.

How the class is laid out

  1. The problem
  2. The simple version
  3. The write path, and the read path
  4. Check your understanding