mediumDevOps EngineerTechnology
What are blue-green, canary, and rolling deployment strategies? When would you use each?
Posted 18/04/2026
by Mehedy Hasan Ador
Question Details
At a company running 50+ microservices:
> "Our Friday deployments keep causing Saturday incidents. We need a safer deployment strategy. What are the options and trade-offs?"
> "Our Friday deployments keep causing Saturday incidents. We need a safer deployment strategy. What are the options and trade-offs?"
Suggested Solution
Deployment Strategies
1. Rolling Update (Default in Kubernetes)
Old pods gradually replaced by new pods
[v1][v1][v1] → [v1][v1][v2] → [v1][v2][v2] → [v2][v2][v2]
✅ Zero downtime, simple
❌ Old and new versions run simultaneously during rollout
❌ Can't easily rollback if v2 has a data migration issue
2. Blue-Green Deployment
Blue (current): [v1][v1][v1] ← all traffic
Green (new): [v2][v2][v2] ← no traffic, being tested
Switch traffic: Blue → Green (instant)
If issues: Switch back: Green → Blue (instant rollback)
✅ Instant switch and rollback
✅ Full testing before switch
❌ Requires 2x infrastructure
❌ Database migrations need backward compatibility
3. Canary Deployment
[v1][v1][v1][v2]
80% traffic ↑↑↑ 20% ↑
Monitor metrics for 5-30 minutes:
- Error rate normal? → Increase v2 to 50% → 100%
- Error rate spike? → Route all traffic back to v1
✅ Real user testing with blast radius limited
✅ Gradual confidence building
❌ Requires traffic splitting (Istio, load balancer)
❌ More complex setup
4. Feature Flags (safest)
// Deploy v2 code with flag OFF
if (featureFlags.isEnabled("new-checkout", user.id)) {
return newCheckout(cart);
}
return legacyCheckout(cart);
// Enable for 1% of users → 5% → 25% → 100%
// Kill switch: disable flag = instant "rollback" without redeployment
Decision Matrix
Start with: Feature flags + rolling updates. Add canary when you have monitoring mature enough to auto-detect issues.