Sub topic 3
Redundancy: spare capacity that removes single points of failure
This chapter assumes you know basic client-server architecture, what a load balancer does, and how timeouts and health checks work. It builds on the previous chapter's idea of a single point of failure (SPOF), a component whose failure takes the whole service down.
What redundancy means
Redundancy is keeping more capacity than the normal workload needs, so that when one component fails, another can carry its work. The spare can be a second server, a second network link, a second power feed, or a second copy of the data.
Redundancy does not prevent failures. It changes their effect. A failed server still fails, but users no longer notice.
Why it works: the math
Availability is the fraction of time a component works. If two components must both work (in series), their availabilities multiply. If only one of two must work (in parallel), the service is down only when both are down.
def series(*availabilities):
result = 1.0
for a in availabilities:
result *= a
return result
def parallel(*availabilities):
all_down = 1.0
for a in availabilities:
all_down *= (1.0 - a)
return 1.0 - all_down
print(series(0.99, 0.99)) # about 0.9801
print(parallel(0.99, 0.99)) # about 0.9999Two 99% components in series give about 98.01%. The same two in parallel give about 99.99%. This assumes the components fail independently, which is often false. The next chapter covers fault domains, which address that assumption.
Finding the places to add it
Walk the request path from the client to the data and ask of each component, "If this disappears, does the service stop?" Common hiding places include:
- A single application server or a single database instance.
- One load balancer in front of many servers.
- One DNS provider or one network uplink.
- One power supply, switch, or disk.
- A single person or manual runbook step that only one engineer knows.
Each answer of "yes" marks a SPOF. Add redundancy there, starting with the component that is most likely to fail or most costly to lose.
Redundancy has costs
Spare capacity is not free, and it creates new problems.
- Money. You pay for resources that sit idle or lightly used.
- Complexity. More parts means more configuration, more states, and more ways for the failover logic itself to misbehave.
- Shared dependencies. Two servers behind one load balancer still have one load balancer. Redundancy only counts where the copies are truly separate.
- Hidden capacity loss. If two servers each run at 70% load and one fails, the other must absorb 140%. The system overloads and fails too. Size spares so the survivors can carry the full load.
Adding the spare in practice
The simplest form is several identical servers behind a load balancer. The balancer also needs a spare, because it is now the shared component. The following table shows how the SPOF moves as you add layers.
| Design | Remaining SPOF |
|---|---|
| One server | The server |
| Two servers, one load balancer | The load balancer |
| Two servers, two load balancers | Shared site, power, or network |
| Servers in two zones | Region-wide failures |
Each step removes one SPOF and exposes the next. You stop when the remaining risk is acceptable for the service's availability target, not when no SPOF remains.
Exercise
Two web servers each run at 60% of their capacity and share traffic equally behind a load balancer. One server fails. What load does the survivor face, and is this design safe? Name one component that is still a SPOF.
Show answer
The survivor takes all the traffic, so it faces 120% of its capacity and will overload, so the design is not safe. Keep each server below 50% under normal load, or add a third server. The single load balancer is still a SPOF.