Sub topic 3
How Redundancy in Parallel Raises Availability
Assume you know basic web-service architecture, percentages, probability multiplication, and short Python programs. This chapter focuses on how multiple service copies affect availability.
Parallel redundancy
A system has parallel redundancy when several components can provide the same function. The system works if at least one component works.
If each component is available independently, calculate system availability as:
parallel availability = 1 - probability that all components failFor two components with availability \(A\):
def parallel(*availabilities):
failed_together = 1
for availability in availabilities:
failed_together *= 1 - availability
return 1 - failed_together
print(parallel(0.999, 0.999)) # 0.999999, or 99.9999%Two components at 99.9% availability can produce 99.9999% availability under this model. This improvement depends on failures being independent.
Correlated failures and failure domains
Correlated failures happen when several components fail because of the same cause. Examples include:
- Two servers in the same rack losing power.
- Replicas using the same failed database.
- Instances in one region losing network access.
- A bad deployment reaching every copy.
A failure domain is a group of components exposed to a shared failure. Spread replicas across hosts, racks, zones, or regions according to the failures you must tolerate.
Planned maintenance and partial outages
Define what “down” means before measuring availability. A service might be reachable while one zone is offline, but users in that zone could still experience failures. A deployment might reduce capacity without causing every request to fail.
Use health checks, load balancing, graceful draining, and rolling or blue-green deployments to keep serving traffic during maintenance. Measure the user-visible result, including failed or slow requests, rather than only whether a process is running.
Design patterns for higher availability
Useful patterns include:
- Run multiple instances behind a load balancer.
- Replicate state and test failover regularly.
- Spread instances across independent failure domains.
- Remove unhealthy instances automatically.
- Keep capacity for a failed instance or zone.
- Make deployments reversible and gradual.
The cost of each extra nine
Each additional nine reduces the allowed failure budget by a factor of ten. Redundancy, spare capacity, multi-zone operation, testing, and operational work all cost money.
Choose a target from user and business impact. A critical payment path may justify 99.99%, while an internal report may not justify 99.9%. Higher availability also increases complexity, which can create new failure modes.
Exercise
Two independent replicas each have 99% availability. What is their combined availability?
Show answer
1 - (0.01 × 0.01) = 0.9999, or 99.99%.