system-design · intermediate

SLIs, SLOs, and Error Budgets — Measure Reliability Like a Product

Start here

Teams argue endlessly about whether the service is “stable enough” until they share numbers tied to user experience.

Three linked ideas solve that:

  1. Service Level Indicator (SLI) — a carefully defined measurement of success from the user’s point of view.
  2. Service Level Objective (SLO) — a target for that measurement over a time window (for example 99.9% over 28 days).
  3. Error budget — the amount of allowed failure implied by the SLO. When the budget is spent, the team prioritizes reliability over risky launches.
You should care because SLOs turn reliability from a vibe into a **shared product decision**: how fast may we ship versus how often may we fail?

This lesson builds on availability and latency vs throughput. It does not require you to work as a Site Reliability Engineer (SRE) already.

What you will learn

  1. Define SLI, SLO, and error budget in plain English.
  2. Pick user-centric indicators instead of vanity CPU charts.
  3. Set a target and window, then compute the budget.
  4. Use burn rates and alerts that fire before the month is ruined.
  5. Work a complete checkout example with numbers.
  6. Connect budgets to release policy without becoming a pure freeze cult.
  7. Avoid averages that hide painful tails.

What you should know first

TopicWhy
AvailabilitySLOs often encode availability targets
ReliabilityCorrectness and durability still matter
Latency vs throughputLatency SLIs need percentiles, not only means
Basic metrics/logsYou will choose signals you can actually measure

Words you need before we begin

TermPlain English
SLIThe metric definition: what counts as a good event.
SLOThe goal: SLI must stay above (or below) a threshold for a window.
SLAService Level Agreement — contractual promise, often with penalties; stricter process than internal SLOs.
Error budget100% − SLO worth of failures allowed in the window (conceptually).
Good event / bad eventUnits you count (requests, sessions, jobs) classified by the SLI rule.
Time windowRolling or calendar period for the SLO (for example 28 days).
Burn rateHow fast you are consuming budget relative to the plan.
Tail latencySlow outliers (p95/p99) that dominate user pain.
ToilManual, repetitive ops work that scales with service size.

Simple story: the city bus promise

A bus company publishes:

“95% of buses depart within 5 minutes of the schedule, measured over each calendar month.”
**Where the analogy stops:** software multiplies partial failure, multi-tenant noise, and deploy-driven regressions. A bus rarely ships a bad config to 100% of vehicles in one click—your platform can.

The problem without SLIs and SLOs

Opinion-based reliability

Engineering says “we were fine.” Support says “checkout is broken every Monday.” Leadership hears two stories and picks the louder one.

Metric theater

Dashboards full of CPU, memory, and request counts. None answer: did the user complete the job they came for?

Feature freeze only after disaster

Teams ship until a major outage forces a panic freeze. There is no graduated response when reliability is eroding.

SLOs create a shared dial: green budget → normal change; burning budget → slow down and harden.

Step-by-step explanation

Step 1 — Choose a user journey, not a machine

Bad SLI: “CPU < 70%.”
Users do not buy CPU headroom.

Better SLI candidates:

Step 2 — Write the SLI as a fraction

Common form:

\[
\text{SLI} = \frac{\text{good events}}{\text{valid events}}
\]

You must define valid:

Example checkout SLI:
Among authenticated checkout attempts that passed client-side validation, the fraction that returned HTTP 2xx with an orderId within 300ms at the API edge or completed successfully under 300ms—pick one precise definition and stick to it.

For a first lesson, use:

good = response is 2xx, body contains orderId, and server duration ≤ 300ms valid = requests to POST /checkout that are authenticated and not load-test tagged

Step 3 — Set an SLO with a window

Examples:

Higher nines sound brave and cost real engineering. 99.9% allows about **0.1%** failures. In 1,000,000 checkouts that is **1,000** bad events per window—not zero.

Step 4 — Compute the error budget

If SLO = 99.9% over 28 days and you expect 2,000,000 valid checkouts:

That **2,000** is the error budget in event units. Every outage spends it.

Step 5 — Alert on burn, not only on “SLO failed at month end”

If you only page when the 28-day SLO is already breached, you learn too late.

Burn alerts ask: at the current failure rate, will we exhaust the budget too quickly?

Simple intuition: a one-hour outage that spends a huge fraction of monthly budget should page immediately, even if the 28-day number still looks “okay” for a few days.

Step 6 — Attach a policy to the budget

Examples of policy (customize to culture):

Budget stateChange policy
Healthy (>50% remaining, not fast-burning)Normal releases
WarmExtra review on risky changes; prefer smaller batches
Exhausted / fast burnReliability work prioritised; freeze non-essential launches

This is not punishment. It is explicit product prioritisation.

Step 7 — Separate SLOs from SLAs

Do not publish your tightest engineering stretch goal as a customer refund contract without legal review.

Visual mental model

flowchart TB
  U[User journeys] --> SLI[SLI definitions]
  SLI --> SLO[SLO targets + windows]
  SLO --> EB[Error budget]
  EB --> Policy[Release and priority policy]
  Policy --> Work[Features vs reliability work]
  Work --> U
  SLI --> Alert[Burn alerts]
  Alert --> Policy

Learning question: If the budget is empty, what should happen to a non-critical redesign launch?

Caption: SLIs measure; SLOs target; budgets decide pace.

Complete worked example: notes app sync API

Starting situation

A notes app sync API (POST /sync) must feel reliable for freelancers who write during client meetings.

Product promise (marketing, not yet engineering): “your notes are basically always available.”

Constraints

Decisions

ItemChoice
SLIFraction of valid POST /sync that return 2xx within 500ms
SLO99.9% over rolling 28 days
Budget0.1% × 5e6 = 5,000 bad events allowed
Fast-burn alertPage if budget burn implies exhaustion in < 2 days
Slow-burn alertTicket if projected to exhaust within the window
PolicyIf budget < 20% remaining, only security + reliability + already-in-flight launches

Execution notes

  1. Instrument SLI at the edge with consistent labels (valid=true/false).
  2. Build a dashboard: current SLI, budget remaining, recent burn.
  3. Run a game day: kill a DB replica; confirm burn alert fires.
  4. Write the policy in the team handbook so product managers see it before quarter planning.

Failure behavior

A bad deploy causes 2% failure for 30 minutes at peak (high QPS). Budget spent in that half hour may equal days of normal noise. Policy: rollback first, then post-incident, then reliability tasks before the next feature train.

Outcome

The team ships fewer “optional” migrations during warm budget weeks and stops arguing from anecdote. Limitations: the SLI ignores client bugs and offline mobile queues—those need separate product metrics.

How it works in production

Ownership

Good operations

Anti-patterns

Failure modes

ModeWhat goes wrongMitigation
Wrong SLIOptimising a metric users do not feelMap SLI to a journey test
Average latency SLIHides p99 painUse threshold success or percentile objectives carefully
Too many SLOsAlert fatigue, no actionStart with 1–3 critical journeys
No policyNumbers without decisionsWrite budget → action table
Gaming the SLIExcluding failures until greenTransparent valid-event rules; audit excludes
Month-end only reviewLearning after users sufferedBurn alerts during the window

Trade-offs

ChoiceBenefitCost
Stricter SLOHigher user trustMore engineering cost, slower feature pace
Looser SLOFaster iterationMore visible failures
Many fine-grained SLIsDiagnostic powerComplexity
Single golden SLIClarityMay miss secondary journeys
Hard freeze on budget emptyProtects reliabilityCan block critical business needs if policy is naive

Compare with related concepts

ConceptRelationship
AvailabilityOften expressed as an SLO on successful responses
SLAExternal contract; usually looser than internal SLO
APM dashboardsTools; SLOs are the product agreement
Error budgets vs incident severitySeverity triages now; budgets manage chronic risk over time

Common misunderstandings

  1. “SLO means zero downtime.”
An SLO of 99.9% **explicitly allows** some failure. Zero is not a target you can honestly operate without extreme cost.
  1. “We have metrics, so we have SLOs.”
Metrics are data. SLOs are **targets + windows + consequences**.
  1. “Burning budget means people failed.”
Budgets exist to be spent thoughtfully. A planned risky migration may spend budget on purpose.
  1. “99.99% is always better.”
Each extra nine is often much more expensive. Choose from user need and dependency reality.
  1. “Latency averages are fine.”
Users feel tails. Prefer success fractions under a latency threshold or explicit tail objectives.

Check your understanding

  1. Define SLI, SLO, and error budget without acronyms.
  2. Why is “CPU low” a weak SLI for checkout?
  3. If SLO is 99.9% and you have 1,000,000 valid events, roughly how many failures are budgeted?
  4. What is a burn alert for?
  5. How does an SLA differ from an SLO?

Practice

  1. Write an SLI for “user can open their most recent note.”
  2. Pick 99% vs 99.9% for a hobby blog vs a payments API; justify.
  3. Draft a three-row budget policy table for your team.
  4. Given 10,000 bad events allowed and an incident that caused 4,000, what conversations should happen next week?
  5. Critique this SLO: “Average latency under 200ms.”

Revision summary

Glossary

TermDefinition
SLIQuantitative measure of one aspect of service level.
SLOTarget value or range for an SLI over time.
Error budgetAllowed unreliability derived from the SLO.
Burn rateSpeed of budget consumption versus budgeted pace.
SLACustomer-facing agreement, often commercial.

Abbreviations and terminology

What to learn next

  1. Availability — nines and downtime math.
  2. Observability and DORA — signals and delivery metrics.
  3. Incident command — when burn becomes an incident.
  4. Production readiness reviews — ship gates.
  5. Tail latency and load shedding — protect SLIs under load.

FAQ from first-time learners

Q: Who sets the SLO number?
A: Product and engineering together. Engineering explains cost; product explains user need.

Q: Do internal tools need SLOs?
A: If people depend on them to ship, yes—often looser than customer-facing paths.

Q: What if dependencies cannot support our SLO?
A: Your SLO cannot exceed what dependencies realistically allow without isolation, caching, or graceful degradation. Design or renegotiate.

Track: Reliability and Operations

Series: Reliability & SRE Practice

  1. Availability — Nines, Error Budgets, and Redundancy
  2. SLIs, SLOs, and Error Budgets — Measure Reliability Like a Product (this guide)
  3. Capacity Planning for Backend Services
  4. Tail Latency and Load Shedding — Surviving Peak Traffic Overload
  5. Production-Readiness Reviews (PRRs)
  6. Incident Command for Backend Teams

All series

By Shubham Jain

All articles · Study paths

Shubham Jain · Learning Lab