Canary Release vs Feature Flag
People think a canary release is the same as a feature flag, since both can start with 5% of users, and it is not. A canary sends some users to a new version of the whole app, on its own servers. A flag is a switch inside the code that turns one feature on for some users. A canary tests a deploy. A flag tests a feature.
Canary Release
Give a new version to a few users first, then to more and more.
A canary release sends the new version to a small share of users first, like 5 percent. The team watches errors and speed for that group. If all looks fine, the share grows step by step until everyone has it. If errors rise, the canary is pulled and only a few users were hurt. The name comes from canaries that miners once took underground to warn of bad air.
Feature Flag
A switch in your code. It turns a feature on or off with no deploy.
A feature flag is an on and off switch in your code that hides or shows a feature. The new code ships switched off. You can then turn it on for your team, then for 10 percent of users, then everyone. If it goes wrong, you flip it off in seconds. Old flags should be removed, or the code fills up with dead switches.
In one line
- Canary Release
- Give a new version to a few users first, then to more and more.
- Feature Flag
- A switch in your code. It turns a feature on or off with no deploy.