Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 08 · From Scratch · LSM Tree · with code: Go · about 9 min to read

Watch: Choosing a datastore: the workload picks the book
▶ VideoPlay it as a journeyTutor comes with a plan

LSM Capstone: Everything

The Right Book for the Job
The Right Book for the Job · Open board

The System Design board on choosing a storage engine for the job, with the log-structured one drawn as a stack of sorted books. This capstone is that engine, built. Closes the LSM series, Build Your Own LSM Tree.

Before you start. This series built a small copy of a log-structured storage engine in seven stages. By now it can: keep recent writes in a sorted memtable (LSM 01-02: The Memtable and the Log). Log every write first so a crash cannot lose one. Flush the memtable into an immutable sorted file with a sparse index (LSM 03-04: Table Files and the Sparse Index). Skip files with a Bloom filter (LSM 05: The Bloom Filter). And merge files in levels so a lookup touches about one (LSM 06-07: Compaction and Levels). This lesson follows a write and a read through all of it and compares the result with the real library the design came from.

Lesson 60 of 117 in From Scratch

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 17 October 2026: reading LevelDB’s own README
  • One write, one read
  • Run everything
  • What each property needs
  • What a production engine adds

Lab

Fourteen real queries, six datastores. Which one answers yours without a second system?

Pick A wall of numbered boxes, press Add next question fourteen times, and watch Where the fourteen went fill elsewhere.

Open The right book for the job

Ten vadas left and a crowd reaching at once. How does the stall sell exactly ten, and what does making sure cost?

Drag Buyers reaching for each vada to 12, switch between Hold the tray and Check the count again, and watch Time to an answer.

Open The last vada

Related papers

Review From Scratch