AlgoMaster Logo

How Databases Guarantee Durability

Medium Priority9 min readUpdated July 4, 2026
AI Mock Interview

Practice this topic in a realistic system design interview

Durability means that once a database says a transaction is committed, that transaction should not disappear after a failure.

That sounds simple, but real systems fail in many different ways. The database process can crash. The operating system can restart before changed pages are written to disk. A disk can fail. A replica can fall behind. Someone can delete the wrong rows.

No single feature protects against all of those failures.

Databases build durability in layers:

  • Write-ahead logging protects committed data after a local crash.
  • Flushing makes sure important log records actually reach durable storage.
  • Checkpointing makes crash recovery faster.
  • Replication protects against losing a machine or disk.
  • Backups and point-in-time recovery protect against bad deletes, corruption, bad deploys, and late-discovered mistakes.

Durability is not one switch. It is a stack of safeguards.

This chapter explains how those safeguards work together.

1. Write-Ahead Logging

Premium Content

This content is for premium members only.