Single Points of Failure & Redundancy
Definition
Single point of failure
- In plain English
- A single point of failure is one part whose breakdown stops the whole system.
- Think of it like
- It is like an old string of fairy lights where one dead bulb turns off the whole string.
Redundancy
- In plain English
- Redundancy means keeping spare copies of a part so another can take over when one fails.
- Think of it like
- It is like carrying a spare tyre.
Active-active and active-passive
- In plain English
- Active-active means every copy serves traffic at once, while active-passive keeps a standby copy idle until it is needed.
- Think of it like
- Like two open checkout lanes versus one open lane and a cashier on break ready to step in.
Why it exists
Three application servers survive one application failure. A single database or load balancer still stops every request when it fails.
Adding application copies alone does not protect the whole request path. You need to examine every required part.
How it works
Failover
- In plain English
- Failover is the switch from a failed part to its backup.
- Think of it like
- Like a backup generator starting when the power cuts.
Availability zone
- In plain English
- An availability zone is a separate data centre in the same region with its own power and network.
- Think of it like
- Like two hospitals in one city on different power grids.
An availability zone sometimes contains several data centres. Treat it as one failure boundary, with power and networking separated from other zones.
- Draw the path
Include the load balancer, application, session store and database.
- Ask about failure
For each box, ask what happens if it stops working.
- Add a spare
Protect every part whose failure stops the whole service.
- Test the switch
Run failure drills and check that surviving copies handle the full traffic.
Users reach either balancer, then servers in zones A or B. Both use a primary database; after failover, they use its standby copy.
| Feature | Active-active | Active-passive |
|---|---|---|
| Cost | Both copies need capacity; reserve room for failure | Standby also costs money while not serving users |
| Switching speed | Already serving; failed routes still need removal | Detect failure, promote standby, then route traffic |
| Complexity | Coordinate simultaneous service and data changes | Keep standby ready and test promotion |
- Assume failures are independent, meaning one copy’s failure does not make the other fail.
- Two 99% copies each fail 1% of the time.
- Both fail together: 0.01 × 0.01 = 0.0001, or 0.01%.
- If either copy can serve everyone, availability is 100% − 0.01% = 99.99%.
- Three independently failing required parts each at 99.9% give 0.999 × 0.999 × 0.999 ≈ 99.7% availability.
Examples
Survive a zone outage
The call system serves traffic in two availability zones at once. Each zone has capacity to handle all calls.
When one zone loses power, new calls route to the other. Existing calls need their own recovery plan.
- Spread required supporting systems across zones too.
- Test losing a whole zone while calls arrive.
The insight
Critical services justify spare capacity and tested recovery across zones.
Keep a reduced service
Couriers cannot open lockers when the only locker server fails. Add a standby server and save the day’s access codes locally.
Graceful degradation
- In plain English
- Graceful degradation means a system keeps offering a reduced service when a part fails instead of stopping completely.
- Think of it like
- Like a café switching to cash-only when the card machine breaks.
Local access codes support already scheduled deliveries during a server outage. New code changes wait until the lockers reconnect.
A failed primary switches to a standby server. The locker also reads saved daily codes to open scheduled deliveries while disconnected.
The insight
Spare servers and a reduced local mode solve different failure cases.
Find the shared switch
Two control servers connect through one network switch. The switch fails, disconnecting both servers.
Network switch
- In plain English
- A network switch connects devices and forwards messages between them.
- Think of it like
- It is like a junction connecting several roads.
Servers A and B both connect to a single network switch, which is their only route to the network.
The insight
Trace shared dependencies instead of counting spare boxes.
Trade-offs
Pros
- Keep service running through failures.
- Perform maintenance while another copy serves.
- Raise availability with tested recovery.
Cons
- Spare capacity costs money.
- Recovery adds complexity and also fails.
- Data copies need coordination to stay consistent.
Use when
- Protect costly outages on user request paths.
- Support maintenance without stopping service.
Avoid when
- Avoid duplicating low-value tools without a downtime requirement.
- Avoid untested spares as a substitute for a recovery plan.
Quick check
Takeaways
- Walk the request path and ask what happens when each part fails.
- Add spares where one failure stops the service.
- Find shared dependencies and test switching to backups.