What is a Canary Deployment?
Just in case you are not familiar with the term and the practice, Canary Deployments are one of the two most popular ways (Blue/Green Deployments are the other one) of deploying new functionality in a CI/CD and DevOps process.
Canary Deployment processes are typically used under the following circumstances:
- The environment is so large that it is impossible to maintain two entirely separate instances of the environment. Since only one instance of the production environment exists, “testing” of new functionality has to be done in production.
- The rate of change is so high with multiple teams releasing new functionality multiple times a day that flipping the entire environment between two instances is impractical.
Canary deployments are done by deploying a small number of instances of the new service into production and watching them closely (these small instances are the canaries). If the canary does well, the other instances of the service are promoted to the same level as the canary. If they canary does not do well, then the instances running the canary are typically terminated, and replaced by instances running the existing production version. Then everyone holds their breath, some people pray, and again everyone just hopes that it works. The DevOps and Development teams then go back and try to figure out what went wrong and the process tried again once everyone believes that the issues have been addressed.
Why Do Canary Deployments Fail?
Canary Deployments fail for pretty much the same reasons that deployments of new functionality in software have failed since the start of the modern software industry:
- A clear understanding does not exist between the business constituents for the software and the technical team as to what the new release should do. So when it goes into production, the business constituents try to use it, and determine that it does not meet their needs.
- Verification that all of the previously existing functionality (regression testing) is not comprehensive enough (it never actually covers the entire waterfront, now does it?), and things that used to work, no longer do.
- Verification of the new functionality in the release or update turns out to have been incomplete and all of the new functionality is either not present, or does not work as expected.
SafeDeploy Eliminates Canary Deployment Failures
SafeDeploy takes a unique approach to helping DevOps and CI/CD teams eliminate problems with Canary Deploys. SafeDeploy captures the entire activity stream of the application while it is in production. That activity stream is then “played back” against the new instance of the application (the Canary in this case) which verifies that all of the functionality that existed and worked in the previous instance of the application, now works in the instance that includes the Canaries. This eliminates the need for regression testing, and eliminates all of the problems associated with incomplete regression testing.
SafeDeploy’s Role in the Canary Deployment Process