Rollouts, Canaries, and Rollbacks
Goal
Release a new service or model gradually, compare it with clear gates, and roll back when critical quality or reliability rules fail.
Change a little traffic first
Imagine a school cafeteria changing a recipe. Serving the new recipe to every student at once makes a mistake expensive. A safer test is to use the new recipe at one counter, keep the old recipe at the others, and compare clear results before expanding it.
A production AI change has the same problem even when the API looks unchanged. A new model, quantization format, runtime, batch rule, or container can change quality, memory, latency, or errors.
A rollout controls how much traffic sees the new version. A gradual rollout sends only part of the traffic first so you can compare the candidate with the known version, called the baseline.
Define canary evidence and release gates
A canary is that small early release. For example, 5% of eligible traffic might use the candidate while the rest stays on the baseline. Record which requests used which version so their metrics stay separate. The percentage is a deployment choice, not a universal rule.
Write release gates before seeing candidate results. Examples are zero critical authorization failures, a maximum error rate, a minimum task-success rate, a p95 latency limit, and a minimum memory reserve. Predefined gates make it harder to excuse a bad result after the fact.
candidate traffic: 5%
critical authorization failures: 0 required
p95 latency: must stay below the declared limit
if a gate fails → route future traffic back to baseline
Rollback is not undo
Kubernetes Deployments are one example of gradual replacement and rollback. The broader rule is simple: releases should be observable and reversible.
A rollback changes future deployment and routing. It does not undo every side effect the candidate already caused. External writes need their own idempotency and reconciliation rules.
Compare representative steady-state traffic
Warm-up can distort comparisons. A new replica may still be loading, compiling, or filling caches. Do not use a few cold requests as steady-state evidence unless startup time is the thing you are measuring.
The canary traffic should also resemble the traffic you care about. If the first 1% is unusual, its result may not predict a full rollout.
A safe release combines pre-release tests, exact candidate identity, limited exposure, comparable telemetry, explicit gates, and a tested rollback action.