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.
| Lab | Topic |
|---|---|
| Lab 01 | Write-Ahead Log (WAL) |
| Lab 02 | MemTable + Internal Keys |
| Lab 03 | Write Path: WAL → MemTable + Crash Recovery |
| Lab 04 | SSTable (Sorted String Table) |
| Lab 05 | MemTable Flush to L0 |
| Lab 06 | Compaction and Merged Iterator |
| Lab 07 | Snapshots, Compatibility Layer, and Benchmarks |
| Lab 08 | LevelDB from Scratch (Capstone) |
Big picture
WAL → MemTable (SkipList) → flush → L0 SSTables
│
compaction
│
L1 SSTables
Start with Lab 01 — Write-Ahead Log.