Gradual exposure
A canary deployment rolls out a new version to a small fraction of users first. You watch how it behaves, and only if the metrics stay healthy do you gradually shift more traffic to it. The name comes from canaries used to detect danger early.
How it works
- Deploy the new version alongside the old one.
- Route a small percentage of traffic, for example five percent, to the new version.
- Monitor error rates, latency, and business metrics.
- Increase the percentage in steps until the new version handles all traffic.
Automatic analysis and rollback
Mature setups run automated canary analysis, comparing the canary metrics against the stable version. If error rates spike, the system halts the rollout and shifts traffic back, limiting the blast radius to the small group that was exposed.
Canary vs blue green
- Blue green an all at once switch between two environments.
- Canary a gradual percentage shift with continuous monitoring.
Canary trades a slower rollout for finer control and a smaller blast radius if something breaks.
Key idea
A canary deployment exposes a new version to a small slice of traffic first and expands only if metrics stay healthy, limiting blast radius through gradual, monitored rollout.