Keep working when parts break, by having spare copies of everything important.
Fault tolerance means a system keeps working even when some of its parts break. Redundancy is the main way to get it: keep spare copies of the important parts.
A fault is when something breaks. A failure is when users notice. A fault-tolerant system has fewer failures than faults, because it hides faults from users.
Redundancy means having more than you need: two servers when one is enough, three copies of the data, two network links. If one fails, another carries on.
If one copy is up 99% of the time, the chance that both of two independent copies are down at once is 1% Γ 1% = 0.01%. So two copies give 99.99%. Three copies give 99.9999%. This is why redundancy is so powerful.
| Kind | What is duplicated | Example |
|---|---|---|
| Hardware | Machines, disks, power, network links | Two power supplies, RAID disks |
| Software / service | Running copies of a service | Five app servers behind a load balancer |
| Data | Copies of stored data | Database replicas, object storage copies |
| Geographic | Whole sites in different places | A second region with its own copy |
| Time (retry) | Trying the same thing again | Retry a failed request on another server |
| Information | Extra data to rebuild lost data | Parity, checksums, erasure coding |
| Style | How it works | Good and bad |
|---|---|---|
| Active-active | All copies serve traffic at the same time | No wasted capacity, fast recovery. But you need the capacity and sync to cope when one is lost. |
| Active-passive | One copy serves, a standby waits | Simple. The standby may be idle (wasteful) and take time to start. |
| N+1 | N copies are needed, plus one spare | A cheap way to survive one failure |
| N+M / 2N | More spares, up to a full duplicate | Survives more failures, but costs much more |
Model: the service is up if at least one copy works. A whole zone fails with the chance you set, and inside a working zone each copy fails alone. It assumes failover is perfect and instant, which real systems only approach. The default numbers are made up for teaching (illustrative).
| Term | Meaning in easy words |
|---|---|
| Fault | Something breaks, such as a disk or a process |
| Failure | The system stops giving correct service to users |
| Fault tolerance | The ability to keep working correctly when parts fault |
| Redundancy | Extra copies or capacity that are not needed when everything works |
| Single point of failure | A part with no backup. If it fails, everything stops. |
| Failure domain | A group of things that can fail together, such as a rack, a zone or a region |
| Failover | Moving work from a failed part to a spare |
| Active-active | All copies serve traffic at the same time |
| Active-passive | One copy serves while another waits as a standby |
| N+1 | Enough for the load, plus one spare |
| Graceful degradation | Keep the most important features working when something is broken |
| Choice | We gain | We lose |
|---|---|---|
| More copies | Higher availability | Higher cost and more to keep in sync |
| Copies far apart (regions) | Survive big disasters | Higher latency and harder data sync |
| Copies close together (one rack) | Fast and cheap | They fail together |
| Active-active | Use all capacity, fast recovery | Harder to build, needs spare room for the survivors |
| Active-passive | Simple | Idle spare and slower failover |
| Automatic failover | Fast recovery | A risk of wrong switches (for example split brain) |