Availability and the nines

Why you need it

Every system is down sometimes. People still need a way to say how often, and to agree how much down time is acceptable before deciding how much money to spend avoiding it. The share of time it works, written as nines, is that number.

Think of it like this

A shop that promises to be open 99% of the days in a year. That sounds like always, until you notice it allows three or four closed days, and you cannot choose which ones.

Where you’ll find it

  • AWS: Promises 99.9% for Amazon S3 storage, and pays credits back when it misses.
  • Google Cloud: Promises 99.999% for Spanner spread over several regions: about 5 minutes down a year.
  • GitHub: Shows its real record to everyone on its status page.

What to know first

Availability. The share of time a system answers correctly. 99% means it works 99 minutes out of every 100.

Down time. The time it does not work. 100% minus availability.

SLA. A service level agreement: a written promise, usually with money back if it is broken.

How it works

  1. Count the nines. 99% is "two nines", 99.9% is "three nines", and so on. Each nine you add makes the allowed down time ten times smaller, as in the animation.
  2. Turn it into time. 99%: about 3.7 days a year.99.9%: about 8.8 hours a year.99.99%: about 53 minutes a year.99.999%: about 5 minutes a year.
  3. Parts in a chain multiply. If a request needs a web server (99.9%) and then a database (99.9%), it only works when both do: 99.9% × 99.9% is about 99.8%. Every part you add in a row lowers the total.
  4. Spares side by side raise it. Two copies that fail separately, where either one is enough, are only down when both are. Two at 99% each gives about 99.99%. That is why the fix for Single points of failure is a spare.
  5. Each nine costs more. Going from two nines to three may need a spare server. Going to five may need copies in several cities and people on call all night. Pick the number your users actually need, not the biggest one. See SLOs and error budgets.

An example

A shop's site runs on one server at 99.9%. That allows about 8.8 hours down a year.

Checkout also calls a payment service at 99.9%. Both must work, so checkout is about 99.8%: nearly 18 hours a year.

Add a second server, so either one can answer. The servers together are now at about 99.9999%, and the payment service is the weak link.

Lesson: the total can never be better than the weakest part in the chain, so look there first.

Further reading

  • Embracing Risk, Google SRE book. Why Google does not aim for 100%, and how it picks a target. Free to read. Start with this one.
  • The Calculus of Service Availability, Ben Treynor and others, Google. How the nines of each part add up to the nines of the whole system.
  • uptime.is, a small free tool. Type any percentage and see the down time per day, week, month and year.