Unit 5 of 12 · about 4 hours · explain, implement

Compatibility checks, canary and blue-green rollout, and rollback

Most serving outages ship as version skew, not bad weights: a new template, a changed default or a half-rolled fleet. Rollout discipline is the reliability control.

You'll be able to

  • Write the compatibility checklist (model, tokenizer, chat template, sampling config, engine version) that gates any rollout.
  • Run a staged canary with automatic rollback on error and p99 gates.
  • Explain when blue-green beats canary and what the extra GPUs cost.

Covers

Model, tokenizer, template and configuration compatibilityCanary, blue-green and rollback workflows
1

Read

In this order, only the parts listed

0 of 4 done

  1. Zero-downtime deploymentInference Engineering - Chapter 7, Production

    Section 7.4.1 (printed pp. 200 to 201): blue-green with full cutover and its 2x cost, the four-step canary (build, small live slice, monitor or revert, ramp), and the minimum-replica queue warning for the new pool

  2. Day 26 blue-green, canary and drain notebook100 Days of LLM Inference - Days 22 to 26

    Part 1 BlueGreenDeployment shifting 10% to 50% to 100%; Part 2 CanaryDeployment over [0.01, 0.05, 0.10, 0.25, 0.50, 1.00] with gates error below twice 0.005 and p99 below 1.5 times 500ms, Scenario A advancing and Scenario B rolling back at 5% (Scenario B adds Gaussian noise to its nominal p99s, so the stored run prints 397, 417 and 815ms); Part 4 GracefulShutdown drain demo

  3. vLLM template and tokenizer compatibility surfacesvLLM Online Serving, Architecture and Production Metrics

    Chat Template: --chat-template and --chat-template-content-format, with chat requests erroring when no template exists; Tokenize APIs: /tokenizer_info; Basic APIs: /version for pinning the engine beside the model

  4. Version synchronization during rolloutsMachine Learning Systems, Volume 2 - Inference at Scale and Serving Fault Tolerance

    Autoscaling and Global Infrastructure, Global inference infrastructure: the model synchronization and version consistency paragraph (push, pull and hybrid propagation, the brief inconsistency window during rollouts); Global model deployment: each region expansion is a gate that halts the rollout (page read 2026-10-14)

    Read the version-sync paragraphs only. Multi-region failover design belongs to the distributed section.

2

Focus on

  • Compatibility is a tuple: weights, tokenizer, chat template, sampling defaults and engine version. Changing one element without the rest is a new system, and the canary must compare full tuples.
  • Canary gates need both errors and tails: the day26 gates (error below twice baseline, p99 below 1.5 times baseline) catch the regression scenario that pure error rates miss.
  • The new pool needs real capacity from step one. A canary sized at default minimum replicas queues immediately, and the queue looks like a model regression.
  • Blue-green buys instant rollback with a full duplicate fleet held for the overlap window. Canary buys cheap gradual proof across small traffic steps. Pick by blast radius, not by fashion.
Common mistakes · 3
  • Rolling back weights but not the template. A chat-template change alters every prompt rendering; rollback must restore the full tuple.
  • Judging a canary on error rate alone. The day26 Scenario B keeps errors flat while p99 nearly doubles; without the tail gate it promotes.
  • Assuming identical latency means identical behavior across a tokenizer change. Token IDs shift under the same text, so compare /tokenizer_info and sampled outputs, not just TTFT.
3

Try it yourself

Closed-book, before checking anything

Rerun the day26 canary scenarios from a blank notebook: the healthy build advances 1% to 100%, while the p99 regression (nominal 820ms, printed 815ms, against a 500ms baseline at the 5% step) rolls back to 0%. Write out both gate evaluations by hand.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Scenario B shows p99 820ms at the 5% step against a 500ms baseline with flat errors. Promote or roll back?Answer

    Roll back to 0%. The p99 gate allows at most 1.5 times 500ms (750ms); 820ms exceeds it even though errors stay under twice baseline.

  2. 2.Why is blue-green called unsuited for large inference despite its instant rollback?Answer

    It needs a full duplicate fleet before traffic cuts over: at 100-GPU scale, another 100 GPUs. Canary plus autoscaling proves the same build with far less extra capacity.

  3. 3.A rollout keeps weights fixed but updates the chat template. Which compatibility check fires first?Answer

    The template-version check: rendered prompts change, so prompt token IDs and behavior shift with identical weights. Pin and canary the template with the weights.

  4. 4.When is brief cross-region version inconsistency acceptable?Answer

    When all regions pin versions, the window is bounded, and no region advances until the prior one holds healthy. Strict workloads pin routing instead of tolerating the window.

5

Practice

  • 100 Days day26: canary scenarios and drain

    Part 2 CanaryDeployment Scenarios A and B with the error and p99 gates; Part 4 GracefulShutdown with drain_timeout=60 over 25 requests

    Rerun both scenarios, then change one gate at a time and record which change flips Scenario B. Finish by draining the old pool after promotion.

You're done when

You can hand-evaluate both canary gates on fresh numbers, and your rollback checklist restores weights, template, config and routing together.

Only when you can do this without notes.

Leads to

Notes

Resources · 4 for this unit, 9 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.

  • 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.

  • 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.

  • 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, and x-request-id with caller-supplied X-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.