Unit 10 of 12 · about 3 hours · derive
Quality, availability, latency and error SLIs, SLOs and error budgets
Throughput without an SLO counts failures as output. Budgets turn latency, errors and quality into one decision currency: ship or harden.
You'll be able to
- Define quality, availability, latency and error SLIs with windows and measurement points.
- Set tiered SLOs with error budgets, and state what consumes budget and what happens when it empties.
- Compute goodput (SLO-meeting, accepted-quality work) distinct from raw throughput.
Covers
Read
In this order, only the parts listed
0 of 5 done
- Latency and throughput metrics done rightHands-On LLM Serving and Optimization - Chapters 3 and 4, serving system design
Chapter 4, Measuring Performance in LLM Serving (printed pp. 149-155): Latency Metrics with
E2E latency = TTFT + ITL x (N - 1); Throughput Metrics on why RPS is workload-sensitive and TPS counts output tokens only and inflates under short inputs; Best Practices (trade-off, latency goals, decompose, simulate real traffic, one knob at a time) - Degradation monitoringMachine Learning Systems, Volume 2 - Inference at Scale and Serving Fault Tolerance
Graceful Degradation, Degradation monitoring and alerting: Table 17 action map (fallback share above 5 minutes warns, default-feature share above 50% is critical, shed-rate growth triggers capacity review, primary-versus-fallback gap past 1 hour escalates) (page read 2026-10-14)
- Deployment health across regionsMachine Learning Systems, Volume 2 - Inference at Scale and Serving Fault Tolerance
Autoscaling and Global Infrastructure, Global model deployment: Table 48 Global Deployment Health Metrics (error below 0.1%, P99 within target and below twice single-region, quality within bounds across regions) (page read 2026-10-14)
- AI Systems tiered QoS gatesAI Systems Performance Engineering - Production Inference Labs
early_rejection.pyQoSControllertiers: TTFT SLO 200, 500 and 1000ms with TPOT 30, 50 and 100ms per token and max concurrency 50, 100 and 200 for premium, standard and free;dynamo_config.yamlearly-rejection and cache-hit-ratio QoS blockUse the tier numbers as worked examples of SLO shape, not as your SLOs. Derive thresholds from your workload and the ch16 alert bands.
- vLLM error and quality countersvLLM Production Metrics
General Metrics:
vllm:request_successbyfinished_reason,vllm:corrupted_requestsfor NaN-logit generations,vllm:num_preemptions, andvllm:e2e_request_latency_secondsas the latency-SLO histogram
Focus on
- Latency decomposes as . SLO each piece: queue-heavy TTFT and decode-heavy ITL fail for different reasons and page different owners.
- Goodput is : raw token throughput discounted by the in-SLO fraction and the accepted-quality fraction. Retried, shed and over-SLO tokens are cost, not output.
- Budgets are tiered because users are: premium buys 200ms TTFT with tight errors, free buys 1000ms with best effort. One fleet-wide SLO either over-delivers to free or starves premium.
- TPS flatters short inputs and uniform batches; RPS flatters short requests. SLOs pin distributions (p50/p95/p99) on fixed workload mixes so neither metric can be gamed by reshaping traffic.
Common mistakes · 3
- SLOing the mean. Means hide the p99 that users feel, and near saturation queueing delay grows like with bursts landing in the tail first.
- Counting aborted and preempted requests as successes.
vllm:request_successsplits byfinished_reason; aborts are cancellations and preemptions are scheduler work, and both leave goodput. - Treating quality as latency's afterthought. NaN logits, template skew and quantization drift all pass latency SLOs while failing users; sample outputs against acceptance checks as a first-class SLI.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.A request generates 9 tokens with TTFT 0.4s and ITL 0.05s. What is its E2E latency?Answer
s. TTFT covers the first token; each of the remaining 8 pays one ITL.
2.Throughput reads 1000 tokens/s but 5% of requests breach TTFT SLO and 2% fail quality checks. What is goodput?Answer
About tokens/s. The over-SLO and rejected-quality shares are cost, not useful work.
3.Why do premium and free tiers need different TTFT SLOs instead of one fleet SLO?Answer
One SLO either wastes capacity over-delivering to free traffic or starves premium of its 200ms guarantee. Tiered SLOs with separate concurrency caps let each class buy its own latency.
4.The error budget empties two weeks into the quarter. What changes operationally?Answer
Feature rollouts and risky config changes freeze; engineering time goes to reliability (capacity, rollback speed, flake removal) until burn stops and budget recovers.
Practice
- AI Systems ch17: tiered QoS gates
Port
early_rejection.pyQoSControllertiers into your gateway and demonstrate, under one pressure burst, a free-tier request rejected while a premium request passes with TTFT inside 200msDerive the tier thresholds from your unit-9 load trace, not from the file defaults. Record budget burn per tier during the burst.
You're done when
Your trace yields SLIs, tiered SLOs, budget burn and goodput from the same raw records, with no metric comparable across different workloads.
Only when you can do this without notes.
Leads to
Notes
Resources · 4 for this unit, 9 more in the section
- Hands-On LLM Serving and Optimization - Chapters 3 and 4, serving system designChi Wang and Peiheng Hu (O'Reilly) · required
Read Chapter 3 (an online service from scratch, batching with streaming, multi-model trade-offs) and the enterprise-architecture part of Chapter 4. Convert the designs into explicit request, model-lifecycle and failure state machines.
- vLLM Production MetricsvLLM Project · required
Define every selected queue, cache, phase and request metric, check histogram buckets and measure exporter overhead. Add model version, cancellation, rejection, quality sample and tenant-safe trace fields in the surrounding service.
- Machine Learning Systems, Volume 2 - Inference at Scale and Serving Fault ToleranceHarvard (Vijay Janapa Reddi) · required
Read "Load Balancing and Request Routing", "Multi-Tenancy and Isolation" and "Autoscaling and Global Infrastructure" in Inference at Scale, then "Serving Fault Tolerance" and "Graceful Degradation" in the Fault Tolerance chapter.
- AI Systems Performance Engineering - Production Inference LabsChris Fregly · required
Use Chapter 16 monitoring, cache health, capacity planning and load-test utilities, then Chapter 17 routing only if distributed. Add process death, overload and bad-version cases that the performance pairs do not cover.
Also in this section
- vLLM Online Serving, Architecture and Production MetricsvLLM Project · primary
Trace the API server, engine core, scheduler, KV manager and model runner, then map documented metrics to your SLIs. The link is pinned to v0.31.0; add the auth, tenant, quality and rollout controls the engine leaves to you.
- Inference Engineering - Chapter 7, ProductionPhilip Kiely (Baseten Books) · support
Read Chapter 7 for containers, autoscaling, cold starts, routing and queueing, zero-downtime deployment, cost estimation and client-side streaming. Skip the vendor section at its end.
- Gateway API Inference ExtensionKubernetes SIG Network · required
Study model-aware routing, endpoint selection and operational integration. Use it for architecture and an optional local deployment only after the service passes lifecycle and failure tests without Kubernetes.
- SGLang documentation - Production MetricsSGLang Project · support
Compare its metric names and phase boundaries with vLLM's, so your dashboards do not depend on one engine's vocabulary.
- 100 Days of LLM Inference - Days 22 to 26Elizabeth Thomas · support
Use the container, autoscaling, routing, capacity and zero-downtime notebooks as small operational simulations. Replace calendar order and fixed scale targets with the stage checkpoint and your hardware limits.
- AI Infrastructure Engineer Learning - Project 103 LLM DeploymentAI Infra Curriculum · support
Use its Docker, API, monitoring, Kubernetes and cost files as scaffolding only. Check its resource assumptions against your own model and GPU, and rerun any benchmark before reusing a result.
- LLM Inference Systems Laboratory - Operations and FailureRoadmap-Final · support
Complete production gateway, isolation, telemetry, canary, drain, rollback and fault campaigns. Store first-cause timelines and revise runbooks from observed blind spots.
- OpenAI API Reference - streaming, auth, rate limits and request IDsOpenAI · reference
Read the chat streaming event shape with the
[DONE]terminator, bearer auth, rate-limit headers, andx-request-idwith caller-suppliedX-Client-Request-Id. vLLM is the implementation under test; use this only for the contract it claims compatibility with. - vLLM Multimodal Inputs - media validation, fetch policy and cache identityvLLM Project · reference
Read Online Serving for image, video and audio inputs:
--allowed-media-domains, fetch timeouts,--limit-mm-per-prompt, local-media path restriction, and media UUIDs for cache identity. The link is pinned to v0.31.0.