Deployment Patterns for ML: Why Blue/Green Fails for Models
Blue/green is a deploy pattern for code, where the failure mode is crashes. Models need a different one because their failure mode is silent quality drift. This lesson covers the shadow → canary → interleaved/A/B → ramped pattern and when each step is the right call.
The deploy patterns engineering teams have spent two decades refining for code — blue/green, canary, feature flags — were designed around a specific failure mode: the new code crashes or returns errors, and you roll back. ML changes don't fail that way. ML changes fail by being subtly worse on a slice of traffic that nobody notices for three weeks, by the time the team has shipped two more model versions on top. Applying blue/green to ML is like applying a fire alarm to flood detection — the right alarm for the wrong failure.
The Quality-Aware Rollout Ladder is the four-step progression designed around the silent-quality-drift failure mode. Shadow, canary, interleaving or A/B, ramped with holdback. Each step catches a class of failure that the previous step couldn't, and the order matters — shadow catches gross failures before any user sees them, canary catches quality regressions on small traffic, interleaving or A/B measures whether the change is actually better, and the permanent holdback measures whether the improvement persists at retention timescale. Skipping a step is rarely catastrophic, but compounding skipped steps is how ML platforms drift into a state where no one trusts the model changes anyone ships.
The Regression Surface
Shadow, canary, A/B, and ramped aren't a sequence — they're a coverage map over a five-dimensional regression surface, and which dimension a rollout step actually covers is what determines whether you need that step for a given change. The Staff move is to refuse the 'always run shadow then canary' default and instead name which dimensions the change touches, then run only the steps that cover those dimensions. Skipping a step doesn't just save time; it leaves dimensions uncovered, and the cost of leaving them uncovered is the cost of the regression class they catch.
- 1Dimension 1 — Data shiftThe input distribution changed (upstream schema, new content class, seasonal). Coverage: always-on Layer 1 observability + shadow mode. Canary and A/B alone won't catch a data shift that affects all variants equally. The under-monitored dimension; most teams catch this only after Tier 3 accuracy degrades.
- 2Dimension 2 — Model shiftThe model's outputs structurally differ — calibration drift, output distribution change, slice-specific behavior. Coverage: shadow (if output distribution monitoring exists), canary (if per-class quality monitoring exists). Aggregate accuracy hides this because the shift is usually slice-specific.
- 3Dimension 3 — Integration shiftDownstream consumers see a different contract — output schema, latency profile, caching behavior. Coverage: shadow catches most, canary catches integration-load effects. The dimension most often missed during 'we just changed the model' deploys; the source of the 'right model, broken downstream' incident class.
- 4Dimension 4 — Performance shiftLatency, throughput, cost-per-request. Coverage: shadow at production-equivalent load, canary at real production load. Quantization, model-size changes, and serving-infra updates land here. A/B is the wrong instrument because variance in serving latency dominates the A/B signal at small traffic.
- 5Dimension 5 — Business shiftThe system functions but the business metric moved the wrong way. Coverage: only A/B and long-term holdback. This is the most expensive dimension because it's the slowest to detect — retention-timescale effects take months and require a permanent holdback group. The dimension every team underinvests in because the operational cost of maintaining the holdback is real.
- 6How to apply: name the dimensions, then pick the stepsEvery change touches a subset of the five dimensions. A config-only change: dimension 4 maybe, 1-3 and 5 untouched — skip shadow, canary only. A new feature in the pipeline: 1, 2, 3 — full shadow and canary mandatory, A/B for the 5 confirmation. A new model architecture: all 5 — full ladder with extended A/B and permanent holdback. The default 'always run shadow then canary then A/B' wastes engineering time on dimensions the change doesn't touch and under-invests on the ones it does.
Apply the Regression Surface to any model deployment and to any review of an existing rollout policy. The diagnostic question is 'which dimensions does this change touch?' — the answer determines which rollout steps are mandatory and which are optional. Teams that run the full ladder on every change waste engineering time; teams that run only canary skip the dimensions only shadow catches. The right answer is dimension-aware step selection, not a fixed sequence.
Senior: 'Always run shadow then canary then A/B.' Staff: 'This change is a quantization update — it touches dimensions 2 and 4 but not 1, 3, or 5. So mandatory: shadow with output distribution monitoring and load-equivalent latency comparison. Optional: canary if we want production-load confirmation. Not needed: A/B against business metric — quantization doesn't change predictions enough to move retention measurably in a 2-week A/B, and we'd burn experimentation capacity on a measurement that won't reach significance. The full ladder is the wrong instrument here.'
Your team ships a new recsys ranking model. Walk me through the rollout.
Operational reality probe. The interviewer wants to see whether you have the Ladder mental model or whether you'll default to blue/green.
Shadow then canary then A/B then ramp. Standard pattern.
Same sequence with timing: shadow for 2-3 days, canary at 5% for 24-48 hours, A/B at 50/50 for 2 weeks, then ramp. Each step has a specific check.
Depends on the change. A new ranker touches model behavior and likely performance, so I'd run shadow, canary, A/B, and keep a permanent holdback. If this were a config-only change touching just one dimension of the regression surface — say a re-rank policy update — I'd skip shadow and go straight to canary. The default 'always run the full ladder' burns engineering time on dimensions the change doesn't touch.
Before the rollout I want to name which dimensions of the regression surface this change actually touches. A new ranker touches model (2), almost certainly performance (4), probably business (5), possibly integration (3) if it changes output format, rarely data (1). So the mandatory steps are shadow with per-class output distribution monitoring (covers 2 and 4), canary with quality dashboards (confirms 2 and adds 3), A/B with business metric and permanent holdback (covers 5). The order matters because each step's blind spot is the next step's job — A/B alone can't catch a calibration drift that affects all variants equally; only shadow's distribution comparison can. The pattern: rollout steps are coverage tools, and the diagnostic question is 'what does each one actually cover that the others don't?' Same shape as the Latency Anatomy decomposition from Lesson 2.1 — refuse the single-instrument framing, name the surface, pick the instruments that cover it.
Named the rollout as coverage over a regression surface (not a sequence), specified which dimensions a recsys change touches and why, identified the per-step blind spot that the next step covers, and connected it to the surface-decomposition pattern from earlier lessons. The L7 move is treating the rollout ladder as a multi-instrument diagnostic, not a default procedure.
Someone proposes deploying a new model directly to ≥25% of traffic.
Stop. The Ladder's lower steps catch a class of failure that ≥25% deployment cannot. Going to 25% without shadow and canary trades 21% of users against the cost of 3 days of slow rollout.
Experimentation Platform (XP) and Quasi-Experimentation
Netflix's Tech Blog has published multiple posts on their experimentation infrastructure, including how they decide which experimentation method to use for which class of change. They explicitly distinguish between rollout patterns based on what dimension of regression is being tested — model changes get one pattern, recommendation changes another, infrastructure changes a third. This dimension-aware approach matches the Regression Surface framework from this lesson: the rollout pattern follows from what the change touches.
Practice this. Time yourself.
You have 12 minutes. A team wants to roll out a new ranker that 'looked great in offline eval — 5% better on the primary metric.' They propose going directly to 100%. Walk them through the Ladder, naming what each step would catch that they're proposing to skip. Then propose the timeline they should commit to. Write 4 paragraphs: (1) the failure modes a 100%-direct rollout would expose them to, (2) the catch-cost per Ladder step, (3) the timeline, (4) the observability prerequisite.
Self-assessment rubric
| Dimension | Weak | Passing | Strong | Staff bar |
|---|---|---|---|---|
| Direct-rollout failure modes | Said 'they might have a regression.' | Named 2-3 specific failure modes. | Named: model loading errors, latency regression, output distribution shift, offline-online metric divergence (the recurring failure mode from Lesson 3.1). | Same plus: named that 'looked great in offline' is the canonical pre-incident signal, because offline metrics overstate online performance routinely for structural reasons. |
| Catch-cost per step | Said each step 'catches problems.' | Per-step catch with one example. | Per-step catch with specific failure class and 'what would have happened on direct rollout' counterfactual. | Same plus: explicit cost-benefit per step. Shadow costs 3 days and catches gross failures at zero risk. Canary costs 2 days and catches quality regressions on 2% of traffic instead of 100%. Each step is justified as insurance with a price tag. |
| Timeline commitment | Vague 'a few weeks.' | Total timeline of ~3 weeks. | Per-step duration: 3 days shadow, 2 days canary, 14 days A/B, then ramp. | Per-step duration AND the criteria for advancing to the next step (e.g., 'advance from canary if quality metric within 1% of current production and no per-class regression detected'). |
| Observability prerequisite | Did not name. | Said 'we need monitoring.' | Named per-version quality metrics as the prerequisite for the Ladder to work. | Per-version observability AND distribution-shift detection AND quality-regression alerting at the per-class level. Without these, the Ladder is theater. |
Reveal model solution
Common failures
- ✗Compressed the timeline to 'a few days' to please the team's urgency. The Ladder's duration is the cost of insurance; compressing it is volunteering for risk you don't have to take.
- ✗Did not connect to per-version observability. Without it, the Ladder steps are theater.
- ✗Treated the 5% offline lift as evidence of safety. Offline metrics overstate online performance routinely.
- ✗Did not propose the permanent holdback. Without it, retention effects are unmeasurable.
The Quality-Aware Rollout Checklist
Step 1 — Shadow (Days 0-3)
- ☐New model serving real production traffic in parallel; outputs logged but not served.
- ☐Monitor: model loads correctly, p99 latency vs current production, output distribution KL divergence on labeled set.
- ☐Advance criterion: latency within 10%, KL divergence < threshold, no errors.
Step 2 — Canary (Days 3-5)
- ☐New model serves 2% of traffic, ideally to low-stakes population.
- ☐Monitor: per-version quality metrics, per-input-class regression, error rate.
- ☐Advance criterion: quality within 1% of current AND no per-class regression beyond noise threshold.
Step 3 — A/B (Days 5-19)
- ☐50/50 split. Primary metric and guardrails measured.
- ☐Willingness-to-trade ratio between primary and guardrails pre-negotiated with product before A/B starts.
- ☐Advance criterion: primary metric improvement statistically significant AND guardrails within ratio.
Step 4 — Ramped + holdback (Days 19+)
- ☐Ramp to 100% in stages (10% → 25% → 50% → 100% over a week).
- ☐Permanent holdback (1-5% of users) retained on old model for long-term comparison.
- ☐Holdback is an ongoing operational commitment; assign owner.
Prerequisite — per-version observability
- ☐Every prediction tagged with model_version.
- ☐Per-version quality dashboards at same fidelity as latency.
- ☐Distribution-shift alerts on input features per version.
- ☐Per-input-class quality breakdowns visible without ad-hoc queries.
Large e-commerce platform. Recommendation ranker team had a clean rollout discipline — shadow, canary, A/B, ramp — for two years. A new tech lead joined and proposed compressing rollouts to ship faster. The proposed compression: skip shadow when 'offline metrics look great' (defined as >3% lift on primary metric).
Six weeks after the compression policy went into effect, a new ranker shipped through skip-shadow → canary at 5% → straight to 50% A/B. Canary monitoring caught nothing visible. The A/B showed the new ranker was 2% better on aggregate. Three weeks into the A/B, an enterprise customer reported that their product detail pages were sometimes showing related products from a completely different category. Investigation revealed the new ranker had a subtle output schema change that downstream caching had been silently dropping for 8% of slates. Shadow would have caught this in 24 hours by comparing output distributions. The compression policy cost roughly two weeks of investigation, a customer escalation, and a full rollback.
The post-incident review identified that the skip-shadow policy had been justified as 'we're confident in our offline metrics.' The metrics didn't lie; the offline pipeline didn't measure schema compatibility because it had no reason to. The failure mode was exactly the kind shadow exists to catch — invisible to quality metrics, visible only to output-distribution monitoring. The tech lead's 'ship faster' policy had removed the step that catches the cheapest failures cheapest.
When the tech lead proposed the compression: 'Each Ladder step exists to catch a specific class of failure that the next step cannot catch as cheaply. Shadow catches schema, loading, latency, distribution-shift failures at zero user risk and 3 days of compute. Canary catches quality regressions at 2% user risk. Skipping shadow saves 3 days and trades zero-user-risk insurance for 2%-user-risk insurance on the same class of failure. The math doesn't work — we're paying with users instead of compute. The compression I'd support is in A/B duration when the primary metric moves fast (recsys engagement signals stabilize in 7-10 days); shadow is the wrong step to compress.'
Each step of the Quality-Aware Rollout Ladder catches a different class of failure at a different cost. Compressing the wrong step trades a cheap failure category for an expensive one. The Staff move in 'ship faster' conversations is to name which step compresses safely (usually A/B duration when metrics stabilize quickly) and which step is non-negotiable (usually shadow, because the failures it catches are invisible elsewhere). Treating the Ladder as a fixed pipeline misses where the real flexibility lives.