Canary Releases Explained
A canary release is a strategy similar to blue-green deployment where you slowly distribute an update to a small subset of users before it goes live to the entire infrastructure.
A canary release is a strategy similar to blue-green deployment where you slowly distribute an update to a small subset of users before it goes live to the entire infrastructure. It's a best practice for continuous deployment and continuous delivery which reduces the risk of releasing a new software version.
The term canary release was coined by coal miners bringing a canary with them while mining. Since canaries have a lower tolerance for carbon monoxide and toxic gases, if the bird stayed alive it meant they were safe. However, if the canary died it was an early warning to workers that they should leave the coal mine before the toxic gas level impacted them.
Luckily, this technique is no longer used. However, the term canary release stuck around. In software development, canary deployment is a new idea replacing the old-fashioned approach of testing with an actual bird. It lets a pre-selected group of users identify bugs and breaks in a new feature for you before it goes to a wider audience. With the information you collect from this first group of users, you can then strengthen your feature and make sure it’s ready for a wider audience.
Easily Rollout & Rollback Features
Canary tests can be done granularly at the feature level using feature flags to send a percentage of end users to the new version of the experience. In this way, you can avoid risking a full release of the new version of the experience on your site as it is tested.
With a canary deployment the first step is to show your new feature or new service to a small percentage of your real user base. This strategy means end-users will see different versions of your page. Some will see the original one, and the users in the canary release will see the new canary version. Using a platform with advanced targeting capabilities (like DevCycle) allows you to select this group as a percentage of overall traffic, users with a particular characteristic (like those who opted into beta releases), or both.
Once the feature in the canary launch performs well and meets business metrics, you can continue showing the new version to more and more end-users in gradual stages until 100% of your traffic sees the new feature. If something goes wrong, you can roll back the feature.
This is beneficial for release engineering since your development team can catch any bugs or issues early on when only a small percentage of users have access to the new feature. This allows you to make changes before showing it to more of your users.
Safely Deploy Product Feature Testing Quickly
By using a canary process, you can test how the new release of your feature performs in a real environment with real users. By only showing it to a small number of users, it minimizes any potential negative impact.
Using this approach, you can see how the new software version performs in a small live group. This is much better than testing new code in a staging environment since you're using live users, who will often do unexpected things.
Gather Early Feedback
Canary releases aren't just about bugs. They are also a very useful technique for gathering early feedback on a new feature from a trusted group of users. Granting this select group early access in production provides an easy way for them to go try it out without any special setup.
To make this process even easier, DevCycle provides a first-class way for users to opt themselves in to features that they want to try out.
Conclusion
Canary testing is a very powerful way to test new features, identifying bugs and gathering feedback from specific groups of users. DevCycle makes it easy to employ this technique by allowing for advanced targeting by user properties and rollout percentages, tracking metrics about the feature's performance, and providing a built-in way to manage an opt-in early access program.