Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Build LevelDB from Scratch — Go

This series of eight labs walks you through building a production-quality key-value storage engine from first principles, one subsystem at a time. Each lab compiles and runs independently; later labs import earlier ones so you always have a working engine at the end of every step.

LabTopic
Lab 01Write-Ahead Log (WAL)
Lab 02MemTable + Internal Keys
Lab 03Write Path: WAL → MemTable + Crash Recovery
Lab 04SSTable (Sorted String Table)
Lab 05MemTable Flush to L0
Lab 06Compaction and Merged Iterator
Lab 07Snapshots, Compatibility Layer, and Benchmarks
Lab 08LevelDB from Scratch (Capstone)

Big picture

WAL  →  MemTable (SkipList)  →  flush  →  L0 SSTables
                                               │
                                         compaction
                                               │
                                          L1 SSTables

Start with Lab 01 — Write-Ahead Log.