System Design Academy

Saving…

Lesson 8 of 8 in Module 20 of 54 lessons complete

Single Points of Failure & Redundancy

Module 2, lesson 8Concept10 min

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.

  1. Draw the path

    Include the load balancer, application, session store and database.

  2. Ask about failure

    For each box, ask what happens if it stops working.

  3. Add a spare

    Protect every part whose failure stops the whole service.

  4. 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.

Protect both the front door and the database path.

Users reach either balancer, then servers in zones A or B. Both use a primary database; after failover, they use its standby copy.

FeatureActive-activeActive-passive
CostBoth copies need capacity; reserve room for failureStandby also costs money while not serving users
Switching speedAlready serving; failed routes still need removalDetect failure, promote standby, then route traffic
ComplexityCoordinate simultaneous service and data changesKeep 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.

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

You run 3 web servers behind 1 load balancer with 1 database. Which are single points of failure?
Two "redundant" servers both plug into the same network switch. Why is that a problem?

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.

Try the quick check above whenever you feel ready.

Previous: Forward Proxies, Reverse Proxies & API Gateways