Storage & Durability
Lesson, slides, and applied problem sets.
View SlidesLesson
Storage & Durability
Why durability
Crashes happen. Durable systems recover by replaying logs and reconstructing state.
Write-ahead log (WAL)
Persist changes before applying them in memory. On recovery, replay the WAL.
Compaction
Logs and LSM trees merge old data into new, reducing space and speeding reads.
What you will build
- WAL replay to reconstruct a key-value store
- LSM-style run merge (compaction)
- LSM read path with Bloom filters and tombstones
- Multi-way LSM compaction with tombstone GC