What You'll Learn
Compare the top deployment strategies used in DevOps: Recreate, Rolling Update, Blue-Green, and Canary releases. Learn when to use each and how they impact uptime and risk.
Deployment Strategy Overview
Deploying a new version of an application to production is risky. Deployment strategies are patterns that help mitigate this risk, balancing downtime, user impact, and infrastructure costs.
Rolling Update
Gradually replaces instances of the previous version with instances of the new version. The default strategy in Kubernetes.
Blue-Green Deployment
Two identical environments run simultaneously. Blue runs V1 (live). Green runs V2 (testing). Once Green is verified, the load balancer is instantly flipped to route traffic to Green.
Canary Release
Route a small percentage of live traffic (e.g., 5%) to the new V2. Monitor error rates. If successful, gradually increase traffic until 100%.
95% V1 / 5% V2
Recreate (High Downtime)
Terminate all old instances, then spin up all new instances. Guaranteed downtime.
Summary: Which one to choose?
| Strategy | Downtime | Cost | Rollback Time |
|---|---|---|---|
| Recreate | High | Low | Slow |
| Rolling | Zero | Low | Medium |
| Blue-Green | Zero | High (2x) | Instant |
| Canary | Zero | Low | Instant |