Releasing and running it · lesson 8 of 10
Ideas in this lesson
AAvailabilitythe share of time the service works
BSLI · SLO · SLAwhat you measure · your target · your promise
CError budgetthe unreliability the target allows

Reliability

Last updated

How reliable should Pila be? “Always up” sounds right and is impossible, and trying for it would stop the team from ever changing anything. In this lesson you'll measure availability, see what 99% or 99.9% means in minutes at the health centre, and use the tools Google's site reliability engineers use to agree a target: service level indicators, objectives and agreements, and the error budget between them.

By the end of this lesson you can

  • Calculate availability and the downtime a target allows
  • Tell SLIs, SLOs and SLAs apart
  • Use an error budget to balance new features against reliability

Measuring availability

Availability is the share of time a service works:

A=uptimetotal time

If Pila was down for 3 hours in a 30-day month (720 hours), its availability was A=717720≈99.58%.

Turned around, a target availability allows this much downtime:

allowed downtime=(1−A)×total time

Google's engineers often measure it a second way, by requests rather than time: the share of texts that got a correct reply. For Pila, that's closer to what patients feel, because downtime at 3 a.m. bothers nobody.

What the nines mean

Targets are often called by their nines: 99.9% is “three nines”. Each extra nine allows ten times less downtime, and costs much more to reach. Slide through the targets:

Downtime the target allows
Per week10.1 minutes
Per 30-day month43.2 minutes
Per year8.8 hours

If a month’s allowance all fell while the health centre is open (10 hours a day), that’s 43.2 minutes of one morning.

At 99%, how much downtime does a 30-day month allow?

Indicators, objectives, agreements

Google's Site Reliability Engineering book gives three terms that keep the conversation exact:

SLI, SLO, SLA
TermIsPila
SLI: service level indicatorSomething measured that users feelThe share of texts answered correctly within 10 seconds, during opening hours
SLO: service level objectiveThe target for the SLI, agreed by the team and its users99.5% each month
SLA: service level agreementA promise to a customer, with consequences if it’s brokenThe barangay’s contract with the hosting company: 99.9% uptime of the server, or a refund

SLOs are internal targets the team steers by; SLAs are external promises with penalties, usually set looser than the SLO so there's warning before a promise breaks. A good SLI measures what users experience, not what's easy to count: a running server that sends no replies is “up” and useless.

Error budgets

If the SLO is 99.5%, then 0.5% of texts may fail each month. That 0.5% is the error budget, and the book's insight is to spend it.

  • While budget remains, the team releases freely: new features, experiments, upgrades. Some will cause small failures; the budget allows for them.
  • When the budget is used up, the team agrees in advance to slow down: freeze features, and spend the time on reliability until the budget recovers.

The budget turns an argument (Kap. Ernesto wants features, Jun wants stability) into a number both sides agreed to. DORA's research makes a related point: speed and stability aren't opposites; the teams that release most often also tend to recover from failures fastest.

It’s the 18th. Pila has used 110% of this month’s error budget. Kap. Ernesto asks for the vaccination reminders this week. What does the policy say?

Spot the trap: promising 100%

Spot the trapKap. Ernesto

The mayor asks Kap. Ernesto to promise, in writing, that Pila will “never go down”. He asks the team to agree.

What happens if…

Check what you learned

Pila was down 6 hours in a 30-day month. What was its availability?
Which is the target the team steers by?
What is an error budget?

Sources

Every claim on this page comes from these sources: the standard, the founding text of a method, a study, or the official record of a project, from the body that publishes it. Industry reports are labelled as such.

All sources for Simple Software Development