Deployment Strategies (Blue-Green, Canary, Rolling)
Part of the AWS Roadmap
In short
Deploying shouldn't mean 'pray and refresh'. The right strategy lets you release in the middle of the day, spot problems with a few users first, and roll back in seconds.
Rolling deployments replace servers or tasks a few at a time, blue-green switches traffic from the old environment to a new one, and canary sends a small share of traffic to the new version first. On AWS these map to ECS deployments, CodeDeploy, ALB weighted target groups and Lambda aliases.

Think of it like this
A new dosa on the menu
A restaurant adds a cheese masala dosa. Wise owners serve it to two or three regular tables first and watch their faces. If they love it, more tables get it. If not, it quietly disappears. That's a canary release: try the new version on a few, then widen.
Watch it happen
A rolling update across 6 servers
1/5Six servers all run v1 behind the load balancer.
The big ideas
What you need to know
Rolling
Replace instances a few at a time. Uses no extra servers, but old and new versions run side by side for a while.
Blue-green
Run a full new environment (green) next to the old (blue), then switch all traffic at once. Rollback is just switching back.
Canary
Send a small slice, say 5%, of traffic to the new version. Watch error rates and latency, then increase step by step.
Mind the database
Old and new code may share one database. Make schema changes backward compatible so both versions keep working.
See it in code
Walk through the code
1upstream api_stable { server 10.0.1.11:3000; server 10.0.1.12:3000; }2upstream api_canary { server 10.0.1.21:3000; }3 4split_clients "$remote_addr" $api_pool {5 10% api_canary;6 * api_stable;7}8 9server {10 listen 80;11 location / {12 proxy_pass http://$api_pool;13 }14}1/3Two pools: the stable version on two servers, and the canary on one.
This lives in nginx's http block. Real canaries usually also watch metrics and roll back automatically, using tools like Argo Rollouts or a cloud load balancer's weighted routing.
Save yourself the pain
Common mistakes
Oops
Doing a canary but not watching any metrics, then promoting it on a timer.
Do this instead
Decide success numbers first, like error rate and p95 latency, and promote only when the canary meets them.
Oops
Dropping a database column in the same release that stops using it.
Do this instead
Split it up: release code that no longer needs the column, then remove the column in a later release.
Your mission
Run your own canary
Quick check
Which strategy lets you switch 100% of traffic back to the old version almost instantly, at the cost of running two full environments?
Go deeper
- 1Run a rolling update on an ECS service and watch tasks get replaced.
- 2Use ALB weighted target groups to send 10% of traffic to a new version.
- 3Write a rollback plan for each strategy.
Also part of these roadmaps
More topics at this stop
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.