Module 6 · Reliability and infrastructureLesson 68 of 887 minIntermediate

SLIs, SLOs and SLAs

An SLI measures reliability, an SLO sets the target, and an SLA is a promise with penalties. The gap below perfect is your error budget.

Try it

Let the month run and watch the error budget. Ship a bad deploy, then raise the SLO target to 99.99% and see how little room is left.

"Is the system reliable?" needs numbers. Site reliability engineering (SRE) uses three related terms.

SLI: service level indicator

A measurement of something users care about, written as good events divided by valid events:

  • Availability: successful requests / all requests.
  • Latency: requests faster than 300 ms / all requests.
  • Freshness: data updated within 1 minute / all reads.

Measure as close to the user as you can (at the load balancer, or even in the client).

SLO: service level objective

A target for an SLI over a window: "99.9% of checkout requests succeed, measured over 30 days".

  • Never 100%. That's impossible, and chasing it freezes all change.
  • Pick a level where users are happy; more nines cost exponentially more.

SLA: service level agreement

A contract with customers: "if monthly availability drops below 99.5%, you get a 10% credit". SLAs are looser than SLOs, so you're warned well before you owe anyone money.

Error budgets

If the SLO is 99.9%, then 0.1% of requests are allowed to fail. That's the error budget. It changes the conversation between product and reliability:

  • Budget left? Ship features, run experiments, take sensible risks.
  • Budget burning fast? Slow releases, fix the causes, invest in reliability.

Alerting on SLOs

Instead of paging on every CPU spike, alert on burn rate: how fast the budget is being used. Burning a month's budget in an hour is an emergency; using it slightly faster than planned is a ticket for tomorrow. This produces fewer, more meaningful alerts.

Quick check

Your SLO is 99.9% of requests succeed over 30 days. You serve 10 million requests. How many can fail before the SLO is missed?