SLIs, SLOs & error budgets

In one sentence

An SLI measures what users feel, an SLO sets its target, and the gap to 100% is an error budget you spend on change; alert on how fast you burn it, not on raw errors.

Analogy: A monthly data plan: 0.1% unreliability is your allowance. Spend it on risky launches if you like, but if you burn half in the first week, you slow down before you hit the cap.

The SLI feeds one budget that drives two decisions: who gets paged now, and whether the team ships or stabilizes this month.

How it works

  • An SLI is good events over valid events, measured near the user, not in app logs.
  • Keep the SLA looser than the SLO, so you hear the alarm before you pay penalties.
  • The error budget at 99.9% is ~43 min per 30 days: ship while it lasts, freeze risky launches once spent.
  • Page on burn rate: 14.4× for 1 h spends 2% of the budget, emptying it in ~2 days.
  • LLM SLIs go beyond uptime: TTFT p95, a quality rate like sampled groundedness, and cost per request.

Check yourself

Answer to mark it learned; your answers aren't scored.

Your LLM chat SLO dashboard is green at 99.95% success, yet tickets about empty and truncated answers keep rising. The SLI counts HTTP 200 responses at the app server. What do you change first?

Go deeper

Utilization vs latency Interactive lab
Full explanation

Three terms:

  • SLI (indicator): a measured ratio of good events to valid events, e.g. "% of requests answered successfully in under 2 s". Measure it near the user (load balancer or client), not in app logs.
  • SLO (objective): the target for that SLI over a window, e.g. "99.9% over a rolling 30 days". Owned by the team.
  • SLA (agreement): a contract with penalties such as service credits. Always looser than the SLO, so you hear the alarm before you pay.

The error budget is 1 − SLO: 99.9% over 30 days allows 0.1% bad requests, or ~43 minutes of full outage. It makes reliability a rule: budget left → ship; budget spent → freeze risky launches and fix reliability. 100% is the wrong target: users on a ~99%-reliable phone network can't tell 99.99% from 99.999%.

Burn-rate alerts page on how fast you spend it. Burn rate 1 empties it exactly at day 30; 14.4× sustained for 1 h spends 2% of it and would empty it in ~2 days. Pair a long and a short window so the page fires fast and clears once fixed.

LLM SLIs go beyond uptime: TTFT p95 (Latency metrics: TTFT, TPOT, throughput), success rate (no 5xx, timeout or invalid JSON), a quality rate such as groundedness from sampled LLM-as-a-judge scoring, and cost per request.

Code Multiwindow burn-rate alerts in Prometheus
yamlMultiwindow burn-rate alerts in Prometheus
# SLO: 99.9% of chat requests are good (valid answer AND TTFT < 2 s) over 30 days.
# Budget = 0.001, so burn rate = error_ratio / 0.001.
# The app increments chat_valid_total on every request and
# chat_good_total only when it met both conditions.
groups:
  - name: chat-slo
    rules:
      - record: chat:error_ratio:rate5m
        expr: 1 - sum(rate(chat_good_total[5m])) / sum(rate(chat_valid_total[5m]))
      - record: chat:error_ratio:rate30m
        expr: 1 - sum(rate(chat_good_total[30m])) / sum(rate(chat_valid_total[30m]))
      - record: chat:error_ratio:rate1h
        expr: 1 - sum(rate(chat_good_total[1h])) / sum(rate(chat_valid_total[1h]))
      - record: chat:error_ratio:rate6h
        expr: 1 - sum(rate(chat_good_total[6h])) / sum(rate(chat_valid_total[6h]))

      - alert: ChatSLOFastBurn      # 2% of the monthly budget in 1 h
        expr: (chat:error_ratio:rate1h > 14.4 * 0.001) and (chat:error_ratio:rate5m > 14.4 * 0.001)
        labels: { severity: page }
      - alert: ChatSLOSlowBurn      # 5% of the budget in 6 h
        expr: (chat:error_ratio:rate6h > 6 * 0.001) and (chat:error_ratio:rate30m > 6 * 0.001)
        labels: { severity: page }
      # Short window (5m, 30m) = the alert resets minutes after the fix.
      # Add a ticket at 1x over 3 days (short window 6h) for slow leaks.
Real example

A RAG assistant handles 1M requests a month with an SLO of 99.5% good (success and TTFT under 2 s): a budget of 5,000 bad requests. A provider degradation fails 30% of calls, a 60× burn rate. The fast-burn alert (14.4× over 1 h, confirmed over 5 min) pages ~15 minutes in, and on-call shifts traffic to the fallback model at minute 25. Cost: ~170 bad requests, ~3.5% of the budget, so launches continue. A second SLO, 98% of sampled answers passing a groundedness judge, tracks whether the fallback's answers stay grounded.

Trade-offs +3 · −3

+ You gain

  • Turns "is it reliable enough?" into a number that product and engineering agreed on in advance.
  • Error budgets settle the speed-vs-stability fight with a rule instead of a meeting.
  • Burn-rate alerts page on user impact, with far fewer false pages than static thresholds.

− You pay

  • Choosing SLIs is hard; the wrong SLI makes the team optimize the wrong thing.
  • Low-traffic services make ratios noisy: 1 failure in 50 requests is already 2%.
  • LLM quality SLIs rely on sampled judges, which are slower, noisier and cost money.

Use it when

Any user-facing service, and every LLM feature past prototype. Also to reason about dependencies: know the availability your model API actually delivers before promising yours.

Avoid it when

Prototypes with no users, or as a dashboard of 40 metrics. If missing the SLO would change no decision, it isn't an SLO.

Numbers to know 4
  • Error budget per 30 days: 99% ≈ 7.2 h, 99.9% ≈ 43 min, 99.99% ≈ 4.3 min.
  • SRE Workbook defaults: page at 14.4× over 1 h (2% of budget) and 6× over 6 h (5%); ticket at 1× over 3 days (10%).
  • At a 14.4× burn rate, a 30-day budget is gone in ~2 days (30 / 14.4 ≈ 2.1).
  • Serial dependencies multiply: a 99.9% service on a 99.5% LLM API is ≈ 99.4% available without a fallback.
Common pitfalls 4
  • Setting the SLO equal to the SLA: the first time you miss it, you also pay. Keep the SLO tighter.
  • Measuring only in the app server: crashes, load balancer errors and client timeouts never reach those logs.
  • Counting HTTP 200 as success for LLMs: empty, truncated or invalid-JSON answers are failures too.
  • Alerting on "error rate above 1% for 5 min": pages on blips and misses slow burns.
Interview questions 3

Answer out loud first, then reveal.

Define SLIs and SLOs for an LLM chat assistant.Show answer

I pick a few SLIs users actually feel. Availability: the share of requests that return a valid, complete answer, counting timeouts and malformed output as bad. Latency: TTFT p95 under about 1.5 s, since with streaming that's what users perceive. Quality: the share of sampled answers passing a groundedness judge, on a longer window because judges are noisy. Plus cost per request as a budget SLO. I set targets from current performance and what dependencies allow: on a 99.5% model API, I can't promise 99.9% without a fallback.

Your error budget is gone halfway through the month. What happens?Show answer

The error budget policy kicks in, one we agreed with product in advance so it isn't negotiated mid-incident. Risky launches freeze, except fixes and security patches, and the team works the top causes from the postmortems. If one dependency burned most of the budget, the action may be a fallback or a renegotiated SLO rather than a code freeze. And if we keep blowing budgets while users don't complain, the SLO is probably too strict, so I'd lower it.

Why burn-rate alerts instead of "error rate above 1%"?Show answer

A fixed threshold ignores time. Two percent errors for five minutes barely touches a monthly budget yet wakes someone at 3 a.m.; half a percent for days quietly drains it and never pages. Burn rate measures how fast the budget is going: 14.4× over an hour means 2% of the month is gone, which is worth waking up for. I pair each long window with a short one, 1 h with 5 min, so the alert fires quickly and resets soon after the fix.