Send the new version to a small slice of users first, and grow it only if it looks healthy.
A canary release sends the new version to a small share of real users first (say 1%). You compare it with the old version. If it looks healthy, you give it more traffic. If not, you pull it back.
Tests cannot find every bug. Some only show with real users, real data and real load. A canary release accepts this and limits the damage: the new version runs next to the old one, and only a small part of the traffic goes to it.
A canary release has three parts. First, a traffic split (1%, then 5%, 25%, 50%, 100%). Second, analysis: compare the canary with the old version on error rate, latency and business numbers (for example, orders per minute). Third, a decision: promote to the next step, hold, or roll back. Many teams automate this decision.
| Method | How it works | Good and bad |
|---|---|---|
| Percentage of requests | A weight at the load balancer sends 5% of requests to the canary | Simple. The same user can bounce between versions. |
| Sticky by user | A stable hash of the user id decides who is in the canary | Each user sees one version. Needs a user id (or cookie). |
| By region or data centre | Release to one small region first | Good for catching regional problems. The slice may not be typical. |
| Internal users first | Employees get the new version before customers (dogfooding) | Very safe, but staff do not behave like real users. |
| By customer type | Free users or low-risk accounts first | Protects the biggest customers. Slice may differ from the rest. |
| Signal | Why it matters |
|---|---|
| Error rate (5xx, exceptions) | The clearest sign of a bug |
| Latency (p95, p99) | A new version may work but be slow |
| Resource use (CPU, memory) | Leaks and heavy code show here first |
| Business metrics (orders, sign-ups) | A release can be technically healthy but break the checkout flow |
| Logs and traces | Explain why something changed |
The new version has a bug that fails about 4% of requests (illustrative). The old version has about 0.5% errors and 120 ms p95 latency (illustrative).
A simplified model. The error rates, latencies and request counts are illustrative, with fixed small changes at each stage so every run is the same. Real canaries compare the canary and the old version at the same time, with enough traffic to be sure the difference is not just noise.
| Term | Meaning in easy words |
|---|---|
| Canary | The new version that serves only a small share of users at first |
| Baseline | The current stable version that the canary is compared with |
| Traffic split / weight | The share of requests sent to each version |
| Blast radius | How many users a bad change can affect |
| Promotion | Moving the canary to a larger share of traffic |
| Rollback | Sending all traffic back to the old version |
| Canary analysis | Comparing the canary and baseline signals to decide |
| SLO / threshold | A limit that decides pass or fail (for example, errors above 1%) |
| Progressive delivery | Releasing in steps, with checks between them |
| Sticky routing | The same user is always sent to the same version |
| Dogfooding | Using the new version inside the company first |
| Choice | We gain | We lose |
|---|---|---|
| Smaller first slice | A smaller blast radius | Less data, so a longer wait for a clear answer |
| Larger first slice | Faster, clearer signals | More users hit a bug |
| More stages | More chances to catch a problem | A longer release |
| Automatic promotion | Fast and no human needed | A bad rule can promote a bad version |
| Manual approval | A person decides | Slow, and easy to forget |
| Canary instead of blue-green | Gradual exposure and lower cost | Rollback and monitoring need more care |