Canary releases keep the production safe

Table of Contents

How can Canary Releases keep the Production Safe?

Not sure if the new version/feature would work unerringly in the production environment? Or whether the users would like the new feature you developed? Then this article is for you. Regardless of the immense testing in lower environments, there is always a chance of bugs in the production environment. Canary releases can help pro-actively correct these bugs and prevent errors from happening in your production environment.

What is a canary release?

A canary release is a technique to moderate and mitigate the risks related to the introduction of a new version in your application by cautiously rolling out the changes to a small subset of users before introducing it to the entire platform and making it available to all the users. The term “canary release” comes from the well-known phrase “canary in a coal mine,” which originated from when coal miners used canaries to speculate the presence of toxic gas in the coal mines. Similarly, canary releases can help speculate the effects of introducing a new version in your application.

How can a canary release keep the production safe?

When doing a canary release, the new version is only available for a very small subset of users, generally 1-5%. This is achieved by diverting a small portion of the traffic to the new version while routing the rest to the old version. Monitoring metrics such as CPU, Memory, Disk, etc., on the traffic forwarded to the canary version is essential. Simultaneously, collecting user feedback is also crucial. The users’ feedback and monitoring can help fix bugs and obstructive changes that the new version has introduced. Also, simplifying the decision-making process regarding the introduction of the new version is possible. If the canary version demonstrates stability, receives positive feedback from users, and performs satisfactorily, then gradually shifting traffic to the new version and phasing out the old version becomes feasible.

Canary release requirements.

A canary release requires both versions of the application to run in parallel and a mechanism that can divert the traffic in the desired ratio. The routing mechanism should be programmable to support the incremental shift of traffic from the old version to the new version. IBM developed CanaryAdvisor, which allows users to continuously monitor the baseline and canary versions of a microservice application by collecting values from system performance counters and application logs.. Most cloud-deployment services support mechanisms to implement canary releases. You can leverage these cloud services and can set up your canary release within a few clicks.

Organizations following canary release strategy

Some leading organizations that actively use the canary release pattern include:

    1. Netflix
    2. Facebook
    3. Google

 

By: