Skip to main content

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​

ChapterFocus
Storage Engine FundamentalsPages, buffers, read/write paths
Write-Ahead LogDurability, crash recovery, group commit
B-TreesIn-place updates, page splits, clustering
LSM TreesMemtable, SSTables, compaction strategies

Learning Path​

  1. Storage Engine Fundamentals — pages, caching, and I/O patterns.
  2. Write-Ahead Log — durability primitive used everywhere.
  3. B-Trees — PostgreSQL, MySQL InnoDB, SQL Server.
  4. LSM Trees — RocksDB, Cassandra, DynamoDB, LevelDB.

Interview Prep​

ResourceTopic
Distributed DatabasesHow engines compose at scale
Question"B-tree vs LSM for write-heavy workload?"

Prerequisites​

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 hereWhat you practice
Chapter §22A / §22BShip-ready LLD + drill catalog
Chapter §23 PRACTICEFull interview script
Curriculum Overview — Phase 7Rollout status

Next Domain​

Continue to Distributed Databases and Transactions.

Return to the Curriculum Overview for the full learning path.