System designCore11 min

Redundancy & failure domains

Two copies of a 99% server give 99.99%, on paper. Here is how to find the boxes with no copy, where to put the copies, and why real copies fail together far more often than the formula says.

1 · The problem

Every request path has a box nobody copied

A single point of failure (SPOF) is a component whose failure, alone, stops the service. To find them, trace one request and ask at every box: what if this dies right now?

Take an online shop. A shopper's request resolves the shop's name, reaches the load balancer and lands on one of three app servers, which asks the cache for the product and, on a miss, the database. The app tier passes the test: one server dies and two carry the load. The cache is one machine. When it dies, every product read falls through to a database that was sized only for the misses.

DNSone providerLoad balancerone instanceApp servers3 copiesCacheone nodeDatabase3 replicason a missDNSone providerLoad balancerone instanceApp servers3 copiesCacheone nodeDatabase3 replicason a miss

Walk the path and mark every box without a copy. Three of the five boxes here can take the whole service down by themselves.

The obvious single points are databases and caches. The dangerous ones are the things nobody draws as part of the system: the name, the config, the certificate, and the box in front of all the copies.

Hidden single point

Why it hides

It has happened

DNS

Three zones of healthy servers are unreachable if the name does not resolve

A cloud provider, 2025: an automation bug emptied one service's DNS record for about 3 hours; everything depending on it failed

A config or policy service

Every copy reads the same value, so one bad value reaches all of them

A cloud provider, 2025: a bad policy record reached every region in seconds and crashed a core service

A certificate

Every copy presents the same certificate, and it expires on all of them in the same second

Put expiry dates on a dashboard: this failure shows no warning in load or error rates

The load balancer itself

It sits in front of the copies, so its failure hides them all

This is why managed load balancers run as several nodes, spread across zones

A 2021 outage at one of the largest internet companies shows how deep the hiding goes. A maintenance command cut its data centers off from the network, and the internal tools needed to fix that depended on the same network. Engineers had to go to the buildings.

2 · The fix

Copies in parallel add nines, if they fail on their own

Put two cache nodes side by side and a read fails only when both are down at the same moment. If each is down 1% of the time, and the second is no more likely to be down because the first is, both are down 1% × 1% = 0.01% of the time: availability 99.99%. In general, n copies each available a give 1 − (1 − a)ⁿ.

API serversCache A99%Cache B99%

Both down at once: 0.01 × 0.01 = 0.0001. Together: 1 − 0.0001 = 99.99%, if, and only if, their failures are independent.

Copies at 99% each

Availability

Down per 30 days

1

99%

7.2 hours

2

99.99%

4.3 minutes

3

99.9999%

2.6 seconds

A shortcut: when every input is made only of nines, add the nines. Two independent three-nines copies give six nines. Now the caveat that carries this whole article. The multiplication assumes the copies fail for unrelated reasons. That is false whenever they share a rack, a power feed, a deploy, a config value, a certificate, a dependency or a bug. Everything that follows is about making the assumption a little more true.

3 · The shapes

Standby, active-active or spare capacity: each buys a different thing

Active-passive means one copy serves and the other waits, and how warm the waiting copy is sets both the recovery time and the bill. A cold standby is backups and a plan: you rebuild, in hours or days. A warm standby runs scaled down with data replicating to it: failover is minutes plus a scale-up. A hot standby runs at full size, in sync, taking no traffic: failover is seconds, and you pay for a copy that produces nothing.

Active-active means every copy serves all the time. There is no failover moment, only less capacity, and you have proved every day that the second copy works. The price is that writes now happen in two places.

UsersLoad balancerPrimaryserves everythingHot standbyin sync, idleon failurereplicateUsersLoad balancerPrimaryserves everythingHot standbyin sync, idleon failurereplicate

Active-passive: the standby costs a full copy's hardware, serves nothing until the day it is needed, and that day is also its first real test.

N+1, N+2 and 2N describe spare capacity rather than pairs; the terms come from data-center power design. N is what carries the load, N+1 has one spare unit, N+2 two, and 2N is a complete second set on its own distribution path. In data-center practice N+1 is the common choice and 2N the expensive one.

Arrangement

What runs

Failover

What it costs

Cold standby

Nothing; backups exist

Hours to days: rebuild

Storage for backups

Warm standby

A small copy, data replicating

Minutes: switch and scale up

A fraction of a copy

Hot standby

A full copy, idle

Seconds: switch

A full copy, no extra output

Active-active

All copies serving

None: capacity drops

A full copy, plus consistency work

N+1

N+1 units serving

None if one unit fails

One unit in N (4 → 5 is 25%)

A worked example: your API needs 4 servers at peak, each 99% available.

  • Exactly 4: the tier is up only when all four are. 0.99⁴ = 96.1%, about 28 hours down a month.
  • N+1 (five servers, any four suffice): 99.90%, 42 minutes.
  • N+2: 99.998%, under a minute.
  • 2N (eight servers): 99.99999%, well under a second.

The first spare bought two nines for 25% more servers.

How the switch happens, who decides the primary is dead, and how you stop it coming back as a second primary is Failure detection & split brain.

4 · Where copies live

A copy only counts if it sits in a different failure domain

A failure domain is a set of things that fail together: one host, the rack it sits in, the building, the region. Two copies inside the same domain share every failure of that domain, and the independence you multiplied with is gone. So spread copies across domains, and pick the domain by what you want to survive and what the distance costs you.

Domain

What takes it out

Separating copies costs

Host

A kernel panic, a dead disk, a runaway process

Nothing

Rack

Its switch or its power feed

Nothing, if you ask the scheduler to put each copy on its own rack

Availability zone

A data center's power, cooling or network

A millisecond or two per synchronous write: zones are kilometers apart, all within about 100 km

Region

A regional outage, a disaster, a region-wide bad push

Tens of milliseconds per synchronous write, or async replication and lost writes on failover

The cloud providers define the middle two the same way. An availability zone is one or more data centers with their own power, cooling and networking; a region is a group of them, usually three or more. Treat a zone as a single failure domain within a region. Zones are far enough apart that a fire takes one, and close enough that copies can replicate synchronously.

Load balancerCache copy 1zone a, rack 12Cache copy 2zone b, rack 4Cache copy 3zone c, rack 9

Three copies in three zones: a rack switch or an entire zone can go and two copies remain. A regional outage still takes all three, which is what a second region is for.

5 · The catch

Real copies fail together

Why do systems with three copies of everything still go down? Because the copies are not three independent coin flips. They run the same code, receive the same config, trust the same certificate, call the same dependencies and read the same clock. These are correlated failures (also called common-mode failures), and each one takes every copy out at the same moment, which is exactly what 1 − (1 − a)ⁿ assumed could not happen.

Shared by every copy

Real outage, from its postmortem

The same deploy

A content network, 2019: one slow firewall rule reached every machine worldwide in seconds and exhausted their CPUs: 27 minutes of errors

The same config push

A cloud provider, 2025: bad policy data replicated globally and crashed the service that checks every API call; hours to recover

The same dependency

A cloud provider, 2020: an internal service hit a limit; sign-in, monitoring and the status page failed most of a day

The same bug, same instant

A DNS provider, 2017: a leap second made time seem to run backwards, and the same bug fired at the same instant on every machine running that code path

Shared power

A cloud provider, 2023: one facility lost its utility power and its generators; services that lived only there were down for days

0100200300400020406080100Share of each copy's failures that hit both (%)Pair down per 30 days (min)10% shared: 11× worse

Each copy is down 1% of the time. If a share s of that comes from causes that hit both, the pair is down s × 1% + ((1 − s) × 1%)². Fully independent: 4.3 minutes a month. With just 10% of failures shared: 47 minutes, eleven times the textbook number.

The defenses match the causes. Roll out to one copy, then one zone, and watch before continuing; the 2019 firewall rule above skipped exactly that staging. Treat config pushes as deploys, with the same staging and rollback. Know your dependencies' dependencies. And test by actually turning a whole zone off: the provider in the 2023 outage had never fully taken that facility offline, so nobody knew which services lived only there.

6 · The bill

Redundancy is paid for in money, complexity and agreement

Every copy costs three things:

  • Money. A hot standby is twice the hardware for no extra output. Active-active is twice the hardware and does give you capacity, once built.
  • Complexity. Failover logic, health checks, the runbook for the day the copy is the one that is wrong. Every added component can fail too.
  • Agreement. Two copies of data have to be kept the same. Synchronous replication makes every write wait for the other zone (a millisecond or two) or the other region (tens of milliseconds). Asynchronous replication lets the copies drift, and a failover can lose the last writes.

Keeping two copies in step

Each write waits for

If the main copy fails

Synchronous, other zone

A millisecond or two

The copy has every write

Synchronous, other region

Tens of milliseconds

The copy has every write

Asynchronous

Nothing extra

The last writes can be lost

That last cost is where the rest of this track goes. Once there are two copies and a network between them, you must decide which one is right when they disagree, and what a client may see meanwhile: Consistency models, CAP & PACELC and Consensus & leader election. Redundancy is the entry ticket to distributed systems, not a way around them.

Check yourself

5 questions

1. Two cache nodes, each 99% available, sit in the same rack. Why might you get far less than 99.99%?
2. Your API needs 4 servers for peak load and you run exactly 4, each 99% available. What is the tier's availability?
3. Which failure is not fixed by adding a second copy of a server?
4. Which statement about the arrangements is true?
5. Three database replicas are on three different racks in one availability zone. What can still take out all three at once?

Takeaways

Remember this

  • Walk the request path and ask 'what if this dies?' at every box, including DNS, config, certificates and the load balancer.
  • n independent copies at availability a give 1 − (1 − a)ⁿ: two 99% copies are 99.99%, and the word that matters is independent.
  • Active-passive buys recovery time with idle hardware; active-active buys no failover moment with a consistency problem; N+1 buys one failure's worth of spare capacity.
  • Spread copies across failure domains: host, rack, zone, region; a copy in the same domain is not a copy.
  • Copies fail together through shared deploys, configs, certificates, dependencies, bugs and power; stage every rollout and test by turning a zone off.