Sub topic 9
How Redundancy in Parallel Raises Availability
This chapter assumes you know what availability and the nines mean, can convert a target into a downtime budget, and have seen how serial dependencies multiply availabilities together. Here you will learn how redundant copies of a component raise availability, and where the arithmetic stops being trustworthy.
The core idea
A set of redundant components in parallel fails only when every copy fails at the same time. If one copy is available 99.9% of the time, it is unavailable 0.1% of the time. With two independent copies, the chance that both are down together is 0.001 × 0.001 = 0.000001. Availability is therefore 1 − 0.000001 = 99.9999%.
The general formula for n copies is:
A_parallel = 1 - (1 - A1) × (1 - A2) × ... × (1 - An)Compare this with the serial rule, where you multiply availabilities. In parallel, you multiply unavailabilities.
Computing it in Python
from math import prod
def series(*availabilities):
return prod(availabilities)
def parallel(*availabilities):
return 1 - prod(1 - a for a in availabilities)
print(series(0.999, 0.999, 0.999)) # about 0.997003, roughly 99.70%
print(parallel(0.999, 0.999)) # about 0.999999, roughly 99.9999%The first line shows three required components in series dropping to about 99.70%. The second shows two redundant copies rising to about 99.9999%.
Each copy adds diminishing returns
Adding copies helps a lot at first, then less. The table uses components that are each 99.9% available.
| Copies | Unavailability | Availability | Downtime per 30 days |
|---|---|---|---|
| 1 | 0.1% | 99.9% | 43.2 min |
| 2 | 0.0001% | 99.9999% | about 2.6 seconds |
| 3 | 0.0000001% | 99.9999999% | about 3 milliseconds |
Each extra copy multiplies the unavailability by 0.001 again. The second copy buys three nines. The third buys three more, but those nines are so far past what other parts of your system can deliver that you will not notice them. A system is only as available as its weakest serial link.
Redundancy inside a serial chain
Real systems combine both rules. Suppose a request passes through a load balancer, an application tier, and a database. Each is 99.9% available alone. Run two copies of the application tier and two of the database:
from math import prod
def series(*a):
return prod(a)
def parallel(*a):
return 1 - prod(1 - x for x in a)
lb = 0.999
app = parallel(0.999, 0.999)
db = parallel(0.999, 0.999)
print(series(lb, app, db)) # about 0.998999The result is about 99.9%, the same as a single load balancer. The load balancer is still a single point of failure, and it caps the whole chain. Redundancy only helps where you apply it, so find the weakest serial component first.
The independence assumption
The formula assumes that copies fail independently. That assumption is often false. Copies fail together when they share any of these:
- The same power feed, rack, or data center.
- The same software version, so one bug crashes every copy.
- The same configuration push or deployment.
- The same upstream dependency, such as one DNS provider.
When failures are correlated, the real unavailability is much higher than the formula says. Two servers in one rack on one power supply behave closer to one server for power failures. The next chapter covers failure domains in detail.
Redundancy also has costs
- Failover time. If a standby needs 30 seconds to take over, those seconds count as downtime. Active-active designs, where all copies serve traffic, avoid most of this delay.
- Capacity. Two servers that each run at 80% load cannot survive losing one. Plan so the survivors can carry the full load.
- Complexity. Replication, health checks, and failover logic are themselves components that can fail.
Exercise
A service has two independent replicas, each 99.5% available. A load balancer in front of them is 99.99% available. What is the availability of the whole path, assuming the load balancer and replicas are in series?
Show answer
The replicas in parallel give 1 − (0.005 × 0.005) = 1 − 0.000025 = 0.999975. Multiplying by the load balancer gives 0.999975 × 0.9999 ≈ 0.999875, or about 99.99%. The load balancer is now the main limit.
Exercise
Why might a pair of 99.9% servers in the same rack deliver much less than 99.9999% availability?
Show answer
The formula assumes independent failures. In one rack, a shared power or network failure takes both down together, so their failures are correlated and the real availability is lower.