Write-Ahead Logging (WAL)¶
Recording intended changes to a sequential log before applying them to the actual data structure enables crash recovery while converting random writes to sequential writes.
Tension Addressed¶
Durability vs. Performance
Recognizable As¶
Transaction logs, redo logs, journal files, any "replay" mechanism for crash recovery, database checkpoint operations
Canonical Sources¶
Mohan et al., "ARIES: A Transaction Recovery Method" (1992); Gray & Reuter, "Transaction Processing: Concepts and Techniques" (1992)
Transfers To¶
All durable databases, journaling file systems, event sourcing, change data capture, distributed consensus (Raft/Paxos logs)
WAL works because sequential writes are fast and logs can be replayed to reconstruct state. This pattern recurs wherever crash consistency matters.
Related Concepts¶
- Crash Consistency - Storage & I/O Foundations