Fault Tolerance vs High Availability
Overview
Both ideas aim to keep a system running when something breaks, and people often mix them up. The difference is whether users notice the failure at all.
Knowing which one you actually need saves a lot of money and complexity.
Detailed Notes
What is it
- Fault tolerance (FT): the system keeps working with no interruption at all when a component fails. Users see nothing. There is no gap, because several components do the same work at the same time and the others simply carry on.
- High availability (HA): the system is designed to be up almost all the time and to recover very quickly from a failure. There may be a short blip (seconds to minutes) while traffic moves to a healthy copy.
In short: FT means zero interruption, HA means minimal interruption.
The problem it solves
Failures are certain (as you saw in the Availability chapter), so you must choose how to deal with them. Some systems, such as flight controls or a heart monitor, cannot afford even a few seconds of pause. Most systems, such as a shopping site, can tolerate a brief hiccup. Treating every system as if it needed zero interruption wastes money, and treating critical ones as if a blip were fine is dangerous.
How it works
Fault tolerant design runs duplicates in lockstep. Every request is handled by more than one component at once, and results are compared or the surviving one carries on instantly. This means paying for the spare capacity all the time, and it is complex to build.
Highly available design uses redundancy plus failover: a spare copy waits, a health check or heartbeat (Heartbeats chapter) notices when the active one fails, and traffic is switched across. Typical ingredients:
- Several servers behind a load balancer, which stops sending traffic to unhealthy ones.
- A database follower that gets promoted when the leader dies (Leader and Follower chapter).
- Copies in more than one location, so a whole-site failure does not matter.
| Fault tolerance | High availability | |
|---|---|---|
| Goal | No visible interruption | Minimal downtime |
| On failure | Others carry on instantly | Switch to a healthy copy after a short delay |
| Cost | Very high (always-on duplicates) | Moderate |
| Complexity | Very high | Moderate |
| Typical use | Life-critical or financial core systems | Most websites and APIs |
They are not enemies. A highly available system may use fault tolerant pieces for its most critical layer. Neither is a substitute for backups, since both replicate mistakes and deletions as faithfully as good data.
A simple example
A twin-engine aircraft can keep flying after one engine fails: that is fault tolerance, nobody notices. A spare tyre in a car is high availability. You do have to stop, swap it and lose some minutes, but you are back on the road quickly.
System design example
A video-streaming service:
- The website and API run on many servers behind a load balancer across two data centres. If a server dies, the load balancer routes around it within seconds. That is HA, and viewers might see one failed request that retries successfully (retries are covered in the next chapter).
- The billing ledger writes every transaction to several machines at the same time and only confirms when a majority has it (quorum). A single machine failure causes no interruption. That is closer to fault tolerance.
Ask in an interview: "Can this feature tolerate a few seconds of disruption?" If yes, HA is enough.
Summary
- Fault tolerance: no interruption when something fails; the most expensive option.
- High availability: very short interruption, then automatic recovery; the usual choice.
- Both rely on redundancy and removing single points of failure; they differ in how seamless the switch is.
- Neither replaces backups.
Architecture Diagram
A load balancer sends traffic only to healthy copies.
- 1Users send requests to the load balancer.
- 2A health check finds that Server B has failed.
- 3Traffic goes only to Server A until B is repaired.
Common Interview Questions
Finished this lesson?
0 of 91 lessons done · 0% of the course

