Cloud Parts

Rolling, blue-green or canary?

DimensionRolling deploymentsBlue-green deploymentsCanary releases
In one lineReplace instances a batch at a timeBuild a second environment, then switch all traffic to itGive the new version a small share of traffic, then widen it
Extra capacityNone to one batch, depending on surge settingsA full second copy during the release (ECS warns it may double resource use)A few extra instances, or none if the platform splits traffic between versions
Rollback speedSlow: another rollout, batch by batchSeconds: switch the router back, while the old side is still runningFast: set the canary’s weight to 0
Versions live at onceTwo, mixed, for the length of the rolloutOne serving traffic; both running until the old side is scaled downTwo, side by side, for the whole rollout
Blast radius of a bad releaseEach batch that passes health checks; a bug that health checks miss reaches everyoneEveryone, from the moment of the switch until you switch backOnly the canary’s share, if you catch it before widening
What it needsSeveral instances, health checks or readiness probes, backward-compatible changesRoom for two environments, a switchable router or DNS, schema changes split into expand and contractWeighted routing, good metrics compared against the stable version, enough traffic for a signal
Best forEveryday releases of stateless services; the default strategy of a Kubernetes DeploymentReleases that need instant rollback or can’t run mixed for longHigh-traffic services where a regression must reach as few users as possible
Built intoKubernetes Deployments, ECS, EC2 Auto Scaling instance refresh, VM Scale SetsECS, CodeDeploy, App Service slots, Argo RolloutsLambda aliases, API Gateway, Cloud Run, CodeDeploy, ECS, Argo Rollouts, Flagger

Rule of thumb

Start with rolling deployments; they are the default for a reason and cost nothing extra. Add blue-green when a slow rollback would hurt more than paying for a second environment, and canaries when you have the traffic and the metrics to judge a new version on a slice of users. They combine: Amazon ECS canary deployments shift traffic between a blue and a green revision, and many teams canary first and then roll the rest. All three keep two versions alive for a while, so database changes still need expand and contract.

Sources