Canary birds were once used as an alert system by British coal miners for warning about toxic gases in mines. The birds were kept in the mines and if the gases started reaching dangerous levels, the canary bird would die after inhaling them. As the human threshold for toxic gases was higher than the canary, the bird’s death signalled the danger, prompting the evacuation of the mine.
In a similar way, a small subset of users are used as an early warning system to flag any issues in the latest release having new features or bug fixes, before those features become accessible to the entire user community. Canary Release is a practice that allows partial rollout of new features to a limited audience while currently functioning software is still available to everyone else.
Canary Release testing strategies are gaining importance, especially as organizations are moving towards micro services architectures, agile processes and Continuous Integration/Deployment. It is an excellent method to reduce the risk of a software defect impacting the entire user base and bringing the software release to a standstill
Canary release reduces the risks to a great extent by:
Canary release allows testing of new features in parallel. Since these features are available to a fraction of the actual number of users, the impact is minimal in case things go south.
Different organisations customize and tailor Canary Releases to fit their organization goals. Some such instances are stated below:
A separate production environment is used for Canary testing keeping the existing production environment as the baseline. Maximum users of the software continue using the existing baseline production environment, but a subset of users are directed to the test environment once the changes are implemented. The subset of users then “test” the modified software, thus serving the purpose of a Canary. Any issues in this version are flagged and appropriate action is taken. The baseline environment continues to function in parallel.
Once the Canary release stabilizes and meets the quality requirements, the remaining users are redirected to the new environment and the baseline environment is archived for stipulated time frame, in case it is needed for a rollback at a later date.
In a non micro services environment, canary deployments are applicable to an entire application, thus limiting its actual utility. Any new/modified feature cannot be immediately tested against real world traffic until the full build is created.
Take a look at the following figure for a better understanding. Team B made some changes to the service they were working on, but in order to release that particular service to production, the application as a whole has to be built(with no other changes, except service B), and then released to production.
Micro services architecture takes care of this issue.
Micro services architecture aid in faster release cycles and can easily scale up to meet the market demands. This obviously leads to the need of having a robust CI/CD process in place. Different components/services may have different release cycles. But the net result should be a seamlessly functioning end product.
Individual services can upgrade, test and release their versions without impacting the functioning of an entire software. It also gives the flexibility of maintaining and controlling the versions for the individual services.
Canary releases aid the development teams in releasing micro services/functions effectively in the real environment.
Webomates has a gating mechanism for various environments used for production and testing.
Our CI/CD toolchain triggers following process:
Once the setup is operational, the Webomates canary module tracks issues faced by canary users. This is done on the basis of predefined rules.
The results of Canary testing are reported back and appropriate actions are taken as per the results.
If you are interested in learning more about the services offered by Webomates then please click here and schedule a demo, or reach out to us at info@webomates.com. You can also avail a free trial by clicking here.
Tags: Canary Testing
Test Smarter, Not Harder: Get Your Free Trial Today!
Start Free Trial
Leave a Reply