Glossary

Write-Ahead Log

Append every change to a durable log before applying it, so the database can recover after a crash.

1 min read·4 sections
Open the interactive version → diagrams, practice & more

Definition

Append every change to a durable log before applying it, so the database can recover after a crash.

How it works

The backbone of durability (the D in ACID): on restart the DB replays the WAL to redo committed work and undo half-done transactions. The same log doubles as the source for replication and change-data-capture. Sequential appends are fast, which is why nearly every storage engine uses one.

Common questions

What is Write-Ahead Log?

Append every change to a durable log before applying it, so the database can recover after a crash.

How does Write-Ahead Log work?

The backbone of durability (the D in ACID): on restart the DB replays the WAL to redo committed work and undo half-done transactions. The same log doubles as the source for replication and change-data-capture. Sequential appends are fast, which is why nearly every storage…

What is Write-Ahead Log used for in system design?

The backbone of durability (the D in ACID): on restart the DB replays the WAL to redo committed work and undo half-done transactions. The same log doubles as the source for replication and change-data-capture. Sequential appends are fast, which is why nearly every storage…

Part of Glossary on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Browse the glossary and "X vs Y" comparisons, or build this one →