Unit 11 of 12 · about 5 hours · implement, measure
Worker, dependency, cache and bad-rollout failure injection
Recovery is a tested path, not a hoped-for property. Each failure class needs a drill that proves detection, bounded blast radius and clean rejoin.
You'll be able to
- Kill a worker process under load and show bounded detection, reroute and recovery with no cross-request corruption.
- Inject dependency delay and cache disablement and show the degradation ladder engaging instead of total failure.
- Ship a bad model or configuration version and roll it back on canary gates without corrupting request or KV state.
Covers
Read
In this order, only the parts listed
0 of 4 done
- Serving fault toleranceMachine Learning Systems, Volume 2 - Inference at Scale and Serving Fault Tolerance
Serving Fault Tolerance: Stateless vs. stateful serving with Table 12, Health checking with liveness plus readiness plus inference correctness, Table 13 stateful failover approaches, Table 14 serving recovery invariants, and Model-specific serving fault tolerance with the KV box (70B, 80 layers, 8 KV heads, 128K context at 128 dim BF16 near 43GB per conversation) (page read 2026-10-14)
- Graceful degradationMachine Learning Systems, Volume 2 - Inference at Scale and Serving Fault Tolerance
Graceful Degradation: Definition 1.4 with the pre-engineered fallback requirement, Table 15 degradation dimensions, the Model fallback cascade (307M at 88% down to 5.4M at 75% then cached), Table 16 feature ladder, and Listing 1 trigger rules (page read 2026-10-14)
- vLLM disruption and corruption surfacesvLLM Online Serving, Architecture and Production Metrics
Server in development mode (
VLLM_SERVER_DEV_MODE=1, never for production): Cache Management APIs (/reset_prefix_cache,/reset_mm_cache,/reset_encoder_cache) marked as able to disrupt service, and/abort_requestsunder Weight Transfer APIs for in-flight abort; the Production Metrics page listsvllm:corrupted_requestsfor NaN-logit requests - Day 25 failover experiment100 Days of LLM Inference - Days 22 to 26
Try These Experiments 2: fail over 30% of one region and measure redirect plus latency against the active-active versus active-passive discussion
Run it as a paper drill on your topology first. Real multi-region failover waits for the distributed section.
Focus on
- A kill proves nothing without traffic: the drill must exercise detection (probe thresholds), action (routing away) and state (session and KV fate). Stateless workers rejoin in milliseconds; stateful LLM sessions regenerate over seconds to minutes.
- A 43GB conversation KV cannot fail over in milliseconds. Budget the loss honestly: accept regeneration, checkpoint high-value sessions, replicate only what the product contract demands, and keep shared prefixes separate from session state.
- Degradation is a ladder built before the incident: smaller model, default features, cached content, then shed load. Each rung needs a measured quality cost and a trigger rule, or operators will not pull it.
- The NaN-logit counter only exists when
VLLM_COMPUTE_NANS_IN_LOGITSis set, and the cache-reset endpoints disrupt service by design. Silent GPU degradation is caught by the deep inference-health probe, not by process liveness.
Common mistakes · 3
- Testing failover with an idle standby and no load. Detection latency, queue transfer and KV rebuild only appear under traffic; idle drills certify the easy half.
- Reaching for
/reset_prefix_cacheto simulate degradation in a shared server. It disrupts every tenant's cache by design; scope cache drills to a sacrificial instance. - Treating a restarted worker as a recovered session. The process is back but conversation KV is gone; clients must see a declared state-loss path, not silent context amnesia.
Try it yourself
Closed-book, before checking anything
gpu_memory_utilization so both fit on your GPU, or run the survivor as a stub) and a steady burst running, SIGKILL one engine mid-burst. Show the health check marking it unhealthy within its thresholds, traffic moving to the survivor, in-flight requests on the dead worker reported failed rather than hung, and clean rejoin after restart.Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.Why does killing an LLM worker hurt more than killing a stateless classifier replica?Answer
The classifier holds no per-request state, so any replica retries in milliseconds. The LLM worker holds KV cache and session context (tens of GB), which must regenerate over seconds to minutes or restore from a checkpoint.
2.Dependency latency triples. Which degradation rung fires first, and what proves it worked?Answer
Feature fallback first (cached or default features per the MLSys feature degradation tiers), then model fallback, then shedding. The degradation action map proves it: fallback share, default-feature share and shed rate each stay inside their alert bands.
3.A bad config ships to 5% and p99 doubles with flat errors. Which prior unit's machinery stops it?Answer
The canary tail gate (p99 below 1.5 times baseline) rolls it back, and rollback restores the full tuple: weights, template, config and routing.
4.The process is alive but outputs are garbage after a GPU fault. Which probe catches it?Answer
Only the deep inference-health probe with a known input and sane-output bounds. Liveness and readiness both pass while the model computes nonsense.
You're done when
Each failure class has a drill with detection time, blast radius and recovery evidence, and no drill corrupts another tenant's requests or cache.
Only when you can do this without notes.
Leads to
Notes
Resources · 3 for this unit, 10 more in the 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.
- 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.
- 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.
Also in this 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.
- 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.
- 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.
- 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.