Video in progress
What is the difference between availability and durability?
Availability is whether the system can answer requests right now. Durability is whether written data won't be lost. A service can be down for an hour, but if the data stays intact, durability hasn't been broken.
📖 Answer
People mix these two up a lot in interviews, but they measure different things.
An example: object storage like S3 advertises durability of "eleven nines" (99.999999999%) — meaning the chance of losing a file is extremely small. Availability is much lower, for example 99.9–99.99%. In other words, sometimes a file may be temporarily unreachable, but it won't be lost.
The opposite case exists too: you ran Redis without persistence. It's very fast and always answers — high availability. But it restarted and all the data is gone — zero durability.
Durability comes from writing to disk (fsync), multiple copies (replication), storing in different zones, and backups. Availability comes from multiple instances, a load balancer, failover and health checks.
In a design, ask the questions plainly: "What happens if this data is lost?" and "What happens if this service is down for 10 minutes?". For payments, for example, durability is sacred, while for a cache it doesn't matter at all.
Sign up to mark studied questions and save your progress.