Skip to main content

LSM-tree storage engine

The core idea

Bitcask keeps a current location for every key in memory.

A log-structured merge tree, or LSM tree, instead buffers recent writes and organizes older keys in sorted files.

In this lesson

  • From a write buffer to sorted files
  • Watch three keys fill a buffer
  • Replay the same states
  • What a complete merge can remove
  • Reading without visiting every record
  • The work moves into maintenance

Continue reading

Pro unlocks video lessons, visual walkthroughs, full notes, diagrams, case studies, and implementations across the System Design archive.