Skip to content
Foundations · 9 min

How reliable is reliable enough? SLOs and error budgets

No service works every single time, and trying to make one do so costs more than it is worth. This lesson explains how teams decide what is good enough, the three abbreviations they use for it, and the idea of a budget for failure.

Perfect is the wrong target

Imagine a service that never fails. To build it you would need spare copies of everything, in several places, and you would have to stop changing it, because every change is a risk. It would be very expensive and would never improve. Meanwhile the user's own phone signal drops more often than your service would. They could not tell the difference between very good and perfect.

So the useful question is not "how do we never fail?" It is "how often may we fail before users are unhappy?" The answer is written down as a number, and the team steers by it.

Three abbreviations

  • SLI, service level indicator: a measurement of how the service is doing for users. Example: the share of requests that succeed.
  • SLO, service level objective: the target for that measurement. Example: "99.9% of requests succeed, measured over 30 days."
  • SLA, service level agreement: a promise made to customers, usually in a contract, with a penalty such as a refund if it is broken.

An easy way to keep them apart: the indicator is the speedometer, the objective is the speed you have chosen to drive at, and the agreement is the legal speed limit. You set your own target stricter than the legal limit, so you have a margin before anything costs money.

What the nines mean

Targets are usually written with nines. Each extra nine allows ten times less failure, and costs a great deal more to reach. Over a 30-day month:

target     may fail       total downtime allowed in 30 days
99%        1 in 100       about 7 hours 12 minutes
99.9%      1 in 1,000     about 43 minutes
99.99%     1 in 10,000    about 4 minutes

The error budget

If the target is 99.9% success, then 0.1% failure is allowed. That allowance is the error budget. It is useful to treat it like money to spend. Shipping a new feature is a risk and may use some of it. So does maintenance. So does plain bad luck.

  • Budget left: the team can ship changes at its normal pace.
  • Budget nearly gone: slow down, and put effort into reliability.
  • Budget spent: stop risky changes until the service has been steady for a while.

This settles an old argument. People who build features want to move fast. People who keep the service running want to move carefully. With a budget, neither side has to win by arguing: the number decides.

A worked example

A service handles 10 million requests in 30 days. Its target is 99.9% success.

  • Allowed failures: 0.1% of 10,000,000 = 10,000 requests. That is the whole month's budget.
  • On day 3, a bad release fails 4,000 requests before it is rolled back. 6,000 remain.
  • On day 10, a database problem fails another 5,000. 1,000 remain, with twenty days still to go.
  • The sensible decision: hold back risky releases, and fix what made those two incidents possible.
Linked exercise · needs a computer · 12 minGlobal metrics ingestRead it here, do it on a computer

Saying it in an interview

When you are asked to design something, state a target early and say what follows from it: "I will aim for 99.9% of requests succeeding. That allows about 43 minutes of downtime a month, so one server failing must not take the service down, but I do not need a second data centre on day one." Choosing a number and showing what it costs is the skill being tested.

The terms and the error budget idea are set out in Site Reliability Engineering (O'Reilly, 2016), edited by Beyer, Jones, Petoff and Murphy, chapters 3 and 4.