Storage Engines
B-trees, LSM trees, write-ahead logs, compaction, and the mechanics beneath databases.
Figure: LSM-tree write path — WAL, memtable, and SSTable compaction.
What You'll Learn
Every database is built on a storage engine. This domain explains how data lands on disk, how B-trees and LSM trees trade read vs write amplification, and why WALs are non-negotiable for durability.
Chapters
| Chapter | Focus |
|---|---|
| Storage Engine Fundamentals | Pages, buffers, read/write paths |
| Write-Ahead Log | Durability, crash recovery, group commit |
| B-Trees | In-place updates, page splits, clustering |
| LSM Trees | Memtable, SSTables, compaction strategies |
Learning Path
- Storage Engine Fundamentals — pages, caching, and I/O patterns.
- Write-Ahead Log — durability primitive used everywhere.
- B-Trees — PostgreSQL, MySQL InnoDB, SQL Server.
- LSM Trees — RocksDB, Cassandra, DynamoDB, LevelDB.
Interview Prep
| Resource | Topic |
|---|---|
| Distributed Databases | How engines compose at scale |
| Question | "B-tree vs LSM for write-heavy workload?" |
Prerequisites
- Computer Architecture — caches and I/O
- Operating Systems — virtual memory, filesystems
Production readiness + Game Day
Every substantive chapter in this domain targets the Production LLD and Game Day Standard: whiteboard Production LLD (APIs, data, failure paths) and run Game Day drills (inject → detect → mitigate → verify → learn).
| Start here | What you practice |
|---|---|
| Chapter §22A / §22B | Ship-ready LLD + drill catalog |
| Chapter §23 PRACTICE | Full interview script |
| Curriculum Overview — Phase 7 | Rollout status |
Next Domain
Continue to Distributed Databases and Transactions.
Return to the Curriculum Overview for the full learning path.