</> MAANG.io
system design · 201

Intermediate

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/124 solved 0% complete

Write-Ahead Log (WAL)

maang.io System Design Series


A write-ahead log enforces one deceptively simple rule: write down what you're about to do, before you do it. That single ordering — log record to durable storage first, data change second — is what lets a database survive a crash without losing or corrupting an acknowledged write. It's the foundation under durability and atomicity, and you'll meet it again inside Cassandra's commit log, RocksDB, and Kafka's partitions.

This deep dive comes in three parts:

  • Foundations & Core Concepts — the log-before-data rule, log records, the LSN, and redo vs undo.
  • Internals — ARIES three-pass recovery, checkpoints, physiological logging, and group commit, with worked numbers.
  • Interview — Staff/Principal Q&A: durability guarantees, recovery reasoning, and the tuning trade-offs.

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.