Durability


Last Updated on Feb 09, 2021

Durability is one of the four safety guarantees (ACID) that databases provide to avoid specific error scenarios and concurrency issues.

Durability guarantees that once a transaction is committed successfully, the written changes are never lost, even if there is a hardware fault or database crash.

There are different levels of durability possible. It would be sufficient for a single-node database to write data to a hard drive or SSD and use a write-ahead log for recovery in case of disk corruption.

For a replicated database, durability can be more involved. The database may have to ensure that the data has been copied to some designated number of nodes before reporting success.

Perfect durability does not exist. Even with all durability measures, data can still be lost. If all hard disks and all backups are somehow lost, a database will not help with data recovery.

Also, no one durability technique can provide absolute guarantees. Risk-reduction techniques, including writing to disk, replicating to remote machines, and backups should be used together to reliably secure data.


Related:

© 2022 Ambitious Systems. All Rights Reserved.