advanced29 min studyLesson 28 in Engineering

SLOs and incident response

Define user-centered reliability, calculate error-budget burn, and respond to incidents with evidence and reversible mitigation.

On this page

What you’ll understand

  • Specify eligible and good events for an AI service objective.
  • Calculate an error budget and its burn rate without mixing units.
  • Use tail latency and incident evidence to prioritize mitigation.

A server can return HTTP 200 while delivering a useless answer after the user has left. An infrastructure service can report a healthy average while one tenant waits thirty seconds. Reliability should describe a user's successful interaction. A service-level indicator measures that outcome; a service-level objective chooses an acceptable target and window. Incident response then protects that outcome under uncertainty rather than optimizing the appearance of a dashboard.

Define what counts before drawing a percentage

An SLI needs a population, a definition of good, and a measurement location. For an interactive inference endpoint, eligible requests might exclude authenticated load tests but include real requests rejected by overload. A good request might complete without a server error, begin streaming within a target, and satisfy an inter-token latency limit. Define cancellation treatment carefully: users abandoning a slow response should not conveniently disappear from the denominator. Instrument as close to user experience as practical.

Quality and operational availability need distinct indicators. A fluent but incorrect answer can be operationally successful under a latency SLI while failing a task-quality evaluation. Track versioned evaluation results and safety requirements separately rather than claiming a latency objective proves answer quality. Slice operational indicators by region, tenant class, request size, and model version to find concentrated harm, while protecting low-volume users from noisy statistics and avoiding labels that create unbounded monitoring cardinality.

SLI⁡=NgoodNeligible,E=(1−S)Neligible\operatorname{SLI}=\frac{N_{\mathrm{good}}}{N_{\mathrm{eligible}}},\qquad E=(1-S)N_{\mathrm{eligible}}
S is the objective as a fraction and E is the allowed bad-event count for the same window. This is a request-based budget, not automatically a number of downtime minutes; no eligible traffic makes the ratio undefined rather than perfect.↔ Scroll wide equations horizontally.

Use error budgets to decide when action matters

An objective below 100% permits a bounded amount of failure. The budget turns that allowance into a policy discussion: what engineering changes when reliability is being consumed too quickly? Teams might slow risky rollouts, prioritize capacity, or fix a dominant failure class. Agree on the policy with product and operations in advance. Budget exhaustion is evidence for action under that policy, not a universal instruction to stop every kind of work regardless of cause or urgency.

Burn rate compares the observed bad-event fraction with the allowed fraction. A burn of ten consumes budget ten times as fast as uniform consumption would. Multiwindow alerts can distinguish a severe current incident from a noisy short spike or a slow sustained leak. Match denominator definitions and inspect traffic changes: a request-weighted budget is consumed faster during heavy traffic even if the wall-clock duration is short. Protect against missing telemetry being interpreted as zero errors.

b=rbad1−S,texhaust≈Tbb=\frac{r_{\mathrm{bad}}}{1-S},\qquad t_{\mathrm{exhaust}}\approx\frac{T}{b}
b is dimensionless; T is the budget window duration. The exhaustion-time estimate assumes a full remaining budget, steady traffic relative to that window, and a sustained current bad fraction. Use remaining bad-event counts for a partially spent or traffic-varying budget.↔ Scroll wide equations horizontally.

Control the incident before explaining every cause

Tail latency grows sharply near saturation. In an ideal stable M/M/1 queue, mean residence time is 1/(μ−λ)1/(\mu-\lambda), not merely service time 1/μ1/\mu. Real inference has variable request lengths, batching, and bursty arrivals, so that formula is an intuition with explicit assumptions, not a production percentile predictor. Measure histogram-based percentiles or distributions; averaging p99 values from instances does not generally produce the fleet p99. Distinguish queueing, prefill, decode, and dependency time when investigating latency.

During an incident, assign coordination and communication roles, establish a timeline, and choose a reversible mitigation tied to a hypothesis. Roll back a suspect release, limit expensive requests, or move traffic only if the receiving capacity is ready. Preserve evidence without dumping secrets into logs. After recovery, examine contributing conditions, detection gaps, and the actions that would reduce recurrence or blast radius. An action item needs an owner and a measurable outcome; blaming the last person who deployed explains little about system resilience.

Calculate a request-based incident budget

A service targets 99.9% good requests over a 30-day window containing 12 million eligible requests. During an incident, 2% of requests are bad. Assume traffic is steady for the illustrative burn-time calculation.

  1. The allowed bad fraction is 0.001. Multiply by 12,000,000 eligible requests to get a 12,000-request error budget.

  2. The current burn rate is 0.02/0.001 = 20. This is twenty times the uniform allowed consumption rate.

  3. Starting with a full budget and steady traffic, 30 days/20 gives 1.5 days to exhaustion if that condition continues. This is not an appropriate reason to wait before mitigating a serious incident.

  4. If 9,000 errors were already spent, only 3,000 remain. At the same traffic and error rates, remaining time is one quarter of 1.5 days, or nine hours.

The result

The incident burns budget at 20×. The usable response depends on remaining event counts, traffic, user impact, and the team's agreed policy.

Explore the model

Interactive lab

Interactive lab · queue

See why saturation harms waiting time

Bring arrival rate λ toward service rate μ. Inspect the fluid backlog separately from the M/M/1 mean-residence readout, which assumes Poisson arrivals, exponential service, one server, and stability. Neither readout predicts production p99 latency or model quality.

See why saturation harms waiting timeFluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Current readings: Fluid backlog: 4; Net rate · λ − μ: −1 /s; M/M/1 mean residence: 1 s. All parameters are adjustable with the labeled controls below.02.557.51001.534.56Elapsed time · sFluid backlogλ < μ
Fluid backlogCurrent time
Fluid backlog
4
Net rate · λ − μ
−1 /s
M/M/1 mean residence
1 s
t = 0 s

Fluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forSmall capacity margins can produce large waiting-time penalties; user-facing SLIs reveal the effect.

Check your understanding

A 99.9% request-based objective has one million eligible requests. Which statement is correct?

Try it yourself

An objective is 99.5%; the current bad-event rate is 3%. Find burn rate. In an ideal M/M/1 model with μ = 100 requests/s, compare mean residence at λ = 50 and λ = 95 requests/s.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Divide by the allowed fraction 0.005. For the queue, subtract arrival from service before taking the reciprocal.

Compare with the solution

Burn rate is 0.03/0.005 = 6. Mean residence is 1/(100 − 50) = 0.02 s at 50 requests/s, and 1/(100 − 95) = 0.2 s at 95 requests/s. That tenfold increase illustrates saturation sensitivity under the model's assumptions; it is a mean, not a p99 prediction.

Take it with you

  • Define good events, eligible events, and the measurement window explicitly.
  • Error-budget burn connects user impact to an agreed engineering policy.
  • Mitigate with evidence, protect capacity margins, and learn from contributing conditions.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.