High availability (HA) means a system keeps serving users even when parts of it fail. It is measured as the share of time the service is up:
| Availability | Downtime per year (525,600 min) |
|---|---|
| 99% | 87.6 hours |
| 99.9% | 8.76 hours |
| 99.99% | 52.56 minutes |
Components in series (a request needs all of them, such as load balancer → app → database): multiply the availabilities. The chain is always less available than its weakest part.
A_series = A1 × A2 × ...
LB 99.99% × app 99.9% × DB 99.9% ≈ 99.79%Components in parallel (any one is enough, such as two app servers behind a load balancer): the system is down only if all copies are down.
A_parallel = 1 − (1 − A1) × (1 − A2) × ...
two servers at 99% -> 1 − 0.01 × 0.01 = 99.99%The parallel formula assumes the copies fail independently. Two servers on the same rack, power supply or availability zone can fail together, so spread them across zones.
Building blocks of HA: no single point of failure (SPOF), health checks so the load balancer stops sending traffic to dead instances, automatic failover, and replicas spread across availability zones.
The classic trap is adding more components in series (another proxy, another service hop) and expecting availability to go up. Every serial hop lowers it.
In interviews: "Two servers each 99% available behind a load balancer; what is the availability?" Show the parallel formula, then multiply by the load balancer's availability.