FREE LESSON · Databases & data systems · 4 OF 4
Database Recovery, Replication and Durability
Database mastery: a commit is a promise — Logging, recovery, replication, and failure boundaries
Recovery needs an ordered story of intended change.
With write-ahead logging, relevant log records reach the durability boundary before changed data pages do. After a crash, recovery replays committed work and removes or ignores incomplete work according to the engine’s protocol. Replication creates additional copies, but acknowledgement policy decides which failures those copies can survive without losing accepted writes.
Durability, availability, and freshness are contracts with named failure assumptions.
Replica count is not a durability statement by itself
Three asynchronous replicas may all lag an acknowledged primary. A primary failure can therefore lose accepted writes despite four total copies. Quorum or synchronous acknowledgement strengthens that boundary but adds latency and may reduce availability during partitions. The product must choose consciously.
Ask which nodes confirmed which bytes before the user was told “done.”