4.3.3. Deployment Strategies: Blue/Green, Canary, and Linear
💡 First Principle: Deployment strategies manage the risk of releasing a new model version. The safer the strategy, the slower the rollout—and the more infrastructure you maintain simultaneously. The exam tests whether you can select the right strategy based on the risk tolerance described in the scenario.
| Strategy | How It Works | Risk Level | Rollback Speed | Cost |
|---|---|---|---|---|
| Blue/Green | New version deployed on separate fleet; traffic switched all at once | Low (instant rollback) | Instant (switch back) | 2× infrastructure during transition |
| Canary | Small % of traffic to new version; gradually increase if healthy | Very low | Fast (shift back) | 1.x× infrastructure |
| Linear | Traffic shifted in equal increments on a schedule | Low | Moderate | 1.x× infrastructure |
| All-at-once | Replace immediately | Highest | Slow (redeploy old) | 1× infrastructure |
In SageMaker, deployment strategies are implemented through production variants. You create a new variant with the updated model, assign traffic weights (e.g., 90% old, 10% new), monitor, and gradually shift traffic. CloudWatch alarms can trigger automatic rollback if the new variant's error rate exceeds a threshold.
⚠️ Exam Trap: "Blue/green" and "canary" are the two strategies most frequently tested. Blue/green is for when you want to validate the new version in production without gradual migration—you switch all traffic at once but can instantly switch back. Canary is for when you want to validate with real traffic incrementally. If the question says "instant rollback capability," it's blue/green. If it says "gradual traffic shifting with monitoring," it's canary.
Reflection Question: A financial services company is deploying a new credit scoring model. Regulatory requirements mandate that any model change must be validated against production traffic before full rollout. Which deployment strategy meets this requirement?