Lesson 2.3• 5 min read

Availability in numbers

Calculating compound availability for series vs parallel paths and SLA downtime budgets.

What you will learn

  • Measure availability by time and by successful requests.
  • Combine tiers in series and instances in parallel.
  • Turn a number of nines into a downtime budget.

The mathematical laws of availability

Availability is usually quantified as the share of time a service is up:

Availability=UptimeUptime+Downtime\text{Availability} = \frac{\text{Uptime}}{\text{Uptime} + \text{Downtime}}

For a service spread across many machines and regions, "up" is rarely all-or-nothing, so Google's SRE practice measures request-based availability instead: the proportion of requests that succeed over a rolling window (for example, one day).

Availability=Successful requestsTotal requests\text{Availability} = \frac{\text{Successful requests}}{\text{Total requests}}

The formulas below combine components. They assume components fail independently; shared power, network, software bugs or bad deploys break that assumption, so real redundancy gains are smaller than the arithmetic suggests.

1. Components in series (multiplicative degradation)

If a system requires kkwhat its symbols mean distinct tiers in sequence to process a request (e.g. DNS →\to Load Balancer →\to App Server →\to Database), the total availability is the product of all tier availabilities:

Aseries=∏i=1kAi=A1×A2×⋯×AkA_{\text{series}} = \prod_{i=1}^k A_i = A_1 \times A_2 \times \dots \times A_kwhat its symbols mean

Critical insight: Whenever every component is below 100%100\%, the compound availability of sequential components is lower than that of the least available component. If each of 4 tiers has 99.9%99.9\% availability:

A=(0.999)4=0.996006=99.60%(Downtime increases from 8.7 hrs to 35 hrs/yr!)A = (0.999)^4 = 0.996006 = 99.60\% \quad (\text{Downtime increases from } 8.7\text{ hrs to } 35\text{ hrs/yr}!)what its symbols mean

2. Components in parallel (redundancy amplification)

When nnwhat its symbols mean identical redundant instances run in parallel such that any one healthy instance satisfies demand, the tier fails only if all instances fail simultaneously:

Aparallel=1−∏j=1n(1−Aj)=1−(1−A)nA_{\text{parallel}} = 1 - \prod_{j=1}^n (1 - A_j) = 1 - (1 - A)^nwhat its symbols mean

If a single instance has A=99.9%A = 99.9\%what its symbols mean (1−A=0.0011 - A = 0.001):

  • 2 instances in parallel:1−(0.001)2=0.999999=99.9999%(Six nines!)2\text{ instances in parallel}: 1 - (0.001)^2 = 0.999999 = 99.9999\% \quad (\text{Six nines!})
  • 3 instances in parallel:1−(0.001)3=0.999999999=99.9999999%(Nine nines!)3\text{ instances in parallel}: 1 - (0.001)^3 = 0.999999999 = 99.9999999\% \quad (\text{Nine nines!})

The "Nines" downtime budget reference

  • 99% ("Two nines"): 3.65 days / year • 7.30 hours / month • 14.40 minutes / day
  • 99.9% ("Three nines"): 8.77 hours / year • 43.83 minutes / month • 1.44 minutes / day
  • 99.99% ("Four nines"): 52.60 minutes / year • 4.38 minutes / month • 8.64 seconds / day
  • 99.999% ("Five nines"): 5.26 minutes / year • 26.30 seconds / month • 0.86 seconds / day

For scale, Amazon EC2's service level agreement (last updated May 2022) commits to 99.99%99.99\% monthly uptime for a region and 99.5%99.5\% for a single instance: one machine is far less available than a well-spread fleet.

Availability in series and in parallel

3
2x
Single tier availability:
99.9999%
1 - (1 - 0.999)^2
Total system availability:
99.9997%
(Tier A)^3
Allowed downtime / year:
1.58 minutes
7.89 seconds / month
Users1× instanceLoad balancers2× instancesApp servers4× instancesDatabase2× instancesUsers1× instanceLoad balancers2× instancesApp servers4× instancesDatabase2× instancesUsers1× instanceLoad balancers2× instancesApp servers4× instancesDatabase2× instances
Figure 3

Three tiers in series, each with instances in parallel.

Follow a request from the users: it needs a load balancer, then an app server, then the database, so the three tiers are in series and their availabilities multiply. Within each tier the instances are in parallel: the tier fails only if all of its instances fail at once. Redundancy raises each tier’s availability, and the chain of tiers lowers the total.

  • Users: 1 × Users
  • Load balancers: 2 × Load balancer
  • App servers: 4 × App server
  • Database: 2 × Relational database
  • Users sends requests to Load balancers
  • Load balancers sends requests to App servers
  • App servers sends requests to Database

Key takeaways

  • Tiers in series multiply: four tiers at 99.9% give 99.6%, lower than any one of them.
  • Instances in parallel fail only together: 1−(1−A)n1 - (1 - A)^nwhat its symbols mean, so two instances at 99.9% give six nines.
  • The arithmetic assumes independent failures; shared power, networks, bugs and deploys make real gains smaller.
  • Each extra nine cuts the downtime budget tenfold: 99.9% allows about 8.8 hours a year, 99.99% about 53 minutes.
Sources4