Concepts

Measuring systems

Foundations

Availability and the Nines

What 99.9% actually means in minutes, why chaining services multiplies the downtime, and why two copies divide it.

Every dependency in series takes a slice off your availability; every redundant copy in parallel gives one back — at the cost of running it.

99.9%SLAredundancysingle point of failure

Try it

Move the dials — the sentence under the picture changes.
99%99%99%one copy each: any one down takes the path down98.5%98.507% up · about 10.7 h/mo downin series the availabilities multiply; in parallel the failures do
3 services in series, each with 1 copy at 99.50%: the whole path is up 98.507% of the time — 98.5%, about 10.7 h/mo of downtime. Every single-copy service in the chain takes its own slice off.

In plain words

Availability is the share of time a system answers correctly. It is quoted in "nines": 99% is two nines, 99.9% is three. The percentages look close together; the minutes they allow are not. And a request that passes through five services is only up when all five are — so availability multiplies down the chain, while running two copies of a thing multiplies it back up.

What a nine costs

7.3 hours down per month
99%
44 minutes
99.9%
4.4 minutes
99.99%
26 seconds
99.999%

Each extra nine is ten times less downtime — and roughly ten times the engineering. Three nines is achievable with care. Four needs redundancy at every layer and automated failover. Five means no human is ever in the loop when something breaks, because 26 seconds is less time than it takes to read the alert.

Series divides, parallel multiplies

cartpricinginventorypaymentsFour services, each 99.9%. All up: checkout works.Inventory has its 44 minutes… checkout is down for all of it.Pricing has its 44 minutes… down again.In series: 0.999 × 0.999 × 0.999 × 0.999 = 99.6%. Nearly 3 hours a month.Now two copies of each. A service is down only when BOTH copies are: 1 − 0.001² = 99.9999%.Four of those in series: 99.9996%. About 10 seconds a month.
Every dependency in series takes a slice. Every copy in parallel gives it back.
The arithmeticTypeScript
const series   = (...a: number[]) => a.reduce((p, x) => p * x, 1);          // all must be up
const parallel = (a: number, n: number) => 1 - Math.pow(1 - a, n);          // any one is enough

series(0.999, 0.999, 0.999, 0.999);      // 0.996  — four single-copy services
parallel(0.999, 2);                      // 0.999999 — one service, two copies
series(...Array(4).fill(parallel(0.999, 2)));  // 0.999996 — four services, two copies each

Where the nines go

Single points of failure

One database, one load balancer, one region, one DNS provider. Each is a series term with no parallel partner. The playground's "losing one instance: nothing left" is this.

Long chains

Every synchronous dependency multiplies. Ten services at 99.9% in a request path is 99%. Async work (a queue) takes a step out of the chain.

Deploys

Restarting one copy is planned downtime for that copy. With one copy, it is planned downtime for the service. N−1 sizing makes deploys free.

The things you do not run

The payment gateway's 99.95% is a term in your product too. You cannot raise it; you can add a fallback provider (parallel) or make the step async.

SLA, SLO, SLI

Three words that get mixed up, one idea each:

What it isExample
SLI — indicatorThe thing you measureShare of requests answered 2xx within 300 ms
SLO — objectiveThe target you hold yourself to99.9% of requests, over 30 days
SLA — agreementThe promise to a customer, with consequences99.9%, or a credit on the bill

Set the SLO tighter than the SLA, so you notice before the customer does. What to do with the gap — the error budget — has its own concept: SLOs and error budgets.

Where it goes wrong

  • Quoting the component, not the path. "Our database is 99.99%" is not your availability. Multiply the chain.
  • Redundancy that shares a fate. Two copies on the same host, in the same rack, behind the same switch, in the same region. They fail together, so the parallel maths does not apply. Spread them.
  • Counting only crashes. A service that is up and returning errors, or up and taking 30 seconds, is down as far as the user is concerned. Define the SLI on what the user sees.
  • Chasing a nine you do not need. An internal admin tool at 99.99% is money spent for nobody. Pick the number the users actually need.

Take this with you

  • The one idea: series multiplies availability down; parallel multiplies it back up. Chains and single copies are where nines go to die.
  • In an interview, multiply the request path, name the single points of failure, and say what you would make redundant or asynchronous.
  • At work, draw your request path and count the series terms. The one with a single copy is your availability.