ContentsThe library

Running a Service That Stays Up

Available to Whom, Exactly

Availability is a ratio of good events to total events, and every word in that sentence has to be pinned down before the number means anything at all.

Ask three people whether a service is up and you will get three answers, all

sincere. The purpose of this lesson is to replace the question with one that has

a single answer.

The ratio

Availability is the share of events that went well.

FIG 1The whole definition
the number of events that counted as successful
the total number of events considered
The formula is trivial and the definitions are not. Everything contentious about reliability measurement lives in what an event is, what counts as successful, and which events are considered at all. Two teams can compute this honestly and disagree by an order of magnitude.

An event is usually a request, but not always. For a batch system it might be a

scheduled run. For a data pipeline it might be an hour of freshness. Pick the

thing the user would complain about if it went wrong, and count those.

Measured where

This is the part that gets skipped, and it is the part that decides whether the

number is worth anything.

FIG 2Three places the same request can be counted
The measurement has to be taken at the leftmost point you can manage. A service reporting perfect availability during a total outage is not lying, it is answering a question nobody asked.

The rule is simple to state and unpopular to follow: measure as close to the

user as you can reach, and treat the service's own opinion of itself as

diagnostic information rather than as the number.

What counts as failure

Two cases decide most of the argument.

A response that arrives after thirty seconds is a failure. The user has left. So

the definition of success needs a latency limit inside it, and that limit is a

product decision rather than an engineering one.

A request that was rejected because it asked for something it was not allowed to

have is not a failure. The service did exactly its job. Counting those makes the

number worse every time someone probes an endpoint they should not, which

punishes the service for working correctly.

FIG 3One hour of downtime, reported over different periods
hours downhours in the windowavailability percent
reported over a day1.0024.0095.83
reported over a month1.00720.0099.86
reported over a year1.008760.0099.99
The same incident, the same service, three defensible numbers. This is why a target without a window attached is not a target, and why a rolling window is usually the honest choice: a calendar month quietly forgives everything that happened before the first.

Nines as minutes

The last step is to stop saying nines and start saying minutes, because minutes

are something a team can reason about.

FIG 4What each target allows
target percentminutes down per monthminutes down per day
two nines99.00432.0014.40
three nines99.9043.201.44
four nines99.994.320.14
Four nines allows four minutes a month, which is less time than it takes a person to read a page and decide what to do. That is worth noticing before promising it, because it means the response has to be automatic and the cost of getting there is very different from three nines.

Each additional nine costs roughly an order of magnitude more to reach, and buys

a reduction in downtime that the user may not be able to perceive at all,

particularly if their own network is less reliable than your service. Choosing a

target is therefore an economic question, and the next lesson is about what the

gap between the target and perfection is for.

What to hold on to

Availability is good events over total events, and both halves are definitions

you choose. It has to be measured where the user stands, because the worst

failures are invisible from inside. Slowness counts as failure and expected

rejections do not. Every number needs a window attached. And a target is best

read as a number of minutes, because that is the form in which it can be spent.

Recap

  • Availability is the share of events that succeeded, so the number depends entirely on what counts as an event and what counts as success, and those definitions are decisions rather than facts.
  • The only measurement that matters is the one taken where the user is, because a service can be perfectly healthy by its own account while nobody can reach it.
  • A target expressed in nines is a permission slip written in minutes: three nines is about forty-three minutes of unavailability per month, and those minutes are a resource to be spent rather than a failure to be avoided.

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

NextThe Budget You Are Allowed to Spend →

The rest of this course

  1. 01Available to Whom, Exactlyyou are here
  2. 02The Gap Between Your Target and Perfection Is a Resourceopening only
  3. 03The Average Is the Enemyopening only
  4. 04A Chain of Reliable Parts Is Not Reliableopening only
  5. 05Nothing Degrades Gracefullyopening only
  6. 06The Service Was Fine Until Somebody Changed Itopening only
  7. 07The Helpful Client That Finishes the Jobopening only
  8. 08A Pager That Everyone Trustsopening only

Read alongside