Quick take: Blue-green gives instant cutover. Canary gives gradual risk exposure. Rolling updates are the simplest but the slowest to detect failure. The right strategy depends on how fast you can recover and how much risk you can take.
An online retailer deployed a new checkout flow with a rolling update. When the new version started failing, 30% of users were already affected before the rollback completed. Switching to canary deployments meant only 5% of users saw the new version first, and metrics triggered an automatic rollback in under two minutes.
The problem it solves
Every deployment can fail. Deployment strategies control how many users are exposed to a bad release and how quickly you can recover.
Core concepts
| Strategy | How it works | Risk |
|---|---|---|
| Rolling update | Replaces old instances gradually with new ones. | Medium; failure affects a growing share. |
| Blue-green | Runs two identical environments; switches traffic instantly. | Low; cutover is fast, rollback is instant. |
| Canary | Routes a small percentage of traffic to the new version first. | Low; exposure grows only if metrics are good. |
Architecture
How it works
Canary deployments send a small percentage of traffic to the new version while monitoring error rate, latency and business metrics. If metrics stay healthy, traffic increases. If not, traffic is rolled back.
Blue-green keeps two full environments. After testing green, traffic switches over. If problems arise, you switch back.
Real-world scenario
The retailer used canary for customer-facing services and blue-green for internal admin tools. Database changes were deployed separately with backward compatibility so both old and new versions could run safely.
Advantages
- Canary: limits blast radius and enables data-driven promotion.
- Blue-green: instant rollback, simple mental model.
- Rolling: simplest to implement, no extra capacity needed.
Disadvantages
- Canary: requires metrics and tooling to judge health.
- Blue-green: doubles infrastructure cost.
- Rolling: slower to detect and recover from failure.
When to use it (and when not)
Use canary for high-traffic services. Use blue-green when you need instant rollback and can afford duplicate capacity. Use rolling for low-risk internal services.
Do not use canary without good metrics. Do not use blue-green for stateful systems without careful data handling.
Best practices
- Automate health checks and rollback decisions.
- Keep database changes backward compatible.
- Use feature flags as a complement to deployment strategies.
- Monitor business metrics, not just technical ones.
- Practice rollbacks so they are fast and reliable.
Deployment strategy is risk management. Choose the one that matches your tolerance and tooling.