What is a canary release and what are some of the benefits?
A canary release is a technique used to mitigate the risk associated with rolling out new code and functionality to everyone by making the new release only available to a small group of end users. Due to the smaller size of the user group, the impact of the new release is relatively small. If it's determined that bugs exist or that the new functionality or new design isn't well received then it's easy to rollback.
For a canary release, a completely new and separate production environment is created along side the existing production system. The existing production system is the baseline. Then a small percentage of users (or user sessions) can be routed to the new canary release environment to validate the new software.
Since no code is ever released to the production environment, code also never has to be backed out. Instead, entire environments are removed and baseline environments continue to function as normal.
In addition to easy rollback, canary releases can also be used for A/B split testing of software versions and low-risk performance testing. The selection of the right user group depends upon the teams goals. Sometimes a company will use internal employees. Other times a specific demographic of users can be selected from the general population based on location, age, or some other characteristic. Regardless of how the canary user group is selected, the users run independently on the new infrastructure running the newest software release.
Once the canary release has been proven to be stable and delivering the expected results the remaining users/sessions are routed to the new environment and the baseline environment is taken offline. However, the baseline environment is retained for a period of time just in case a rollback is needed at a later date. If there are issues with the canary release then the traffic canary use group is simply routed back to to the baseline environment.
This technique was named after the well known phrase "canary in a coal mine" which originated from when coal miners used canaries as an early detection system for identifying the presence of dangerous levels of toxic gas. Similarly, canary releases are early detection and feedback systems for software.
posted @ Sunday, May 13, 2018 7:52 PM by Chris Adams