Canary Deployment Is not Enough — Discover the Power of Canary Release!

Beau
5 min readMay 14, 2024

Introduction

This article will discuss the differences between Canary Release and Canary Deployment with following topics:

  1. What are Canary Deployment and Canary Release

2. Stop Using Canary Deployment for Canary Release

3. Who is Using Each Tool

4. What Kind of Tools Should You Use

What are Canary Deployment and Canary Release

If you ask ChatGpt4 or Google, you will get the following answers:

Canary deployment is a strategy used in software deployment where a new version of an application is rolled out to a small subset of users before making it available to the entire user base. This approach allows developers and operations teams to test the new release in a production environment with real traffic, but limits the exposure to a small group of users. The term “canary” comes from the historical use of canary birds in coal mines to detect toxic gases; similarly, the deployment serves as an early indicator of potential problems with the new version of the software without affecting all users.

Canary release is a software deployment method used to minimize the risk of introducing a new software version in the production environment. This strategy involves releasing the new version to a small percentage of users before rolling it out to the entire user base. The goal of a canary release is to test the stability and performance of the new version under real-world conditions with actual users, but on a limited scale.

The conception are very similar and it’s easy to get confused. I find this explanation always make it clear for the main difference:

  • One deployment can includes multiple new features, each feature should be able to be released independently.
  • Canary Deployment is for deploying a new version of application.
  • Canary Release is for releasing features in an application.
  • Different teams are responsible for each method.

Stop Using Canary Deployment for Canary Release

Canary Deployment is a great technology for deploying a new version of application. However, It’s for deployment but not for release. Modern software development is moving to a feature-based development model. It’s important to release each new feature independently.

Feature flag technology enable teams to decouple feature release from code deployment. You can deploy the new version of application, then release the new features independently.

Picture above comes from Andy Dote

The Most Ridiculous Canary Release I’ve Ever Seen

Suppose we have 5 new features, and we are mostly confident about 4 of them, but unsure about the last one. So, we create two branches: one for the 4 features and another for the 4 features plus the last one. We create build packages for each branch.

  • First, we incrementally deploy the build package with the 4 features to the production environment.
  • At the same time, we incrementally deploy the build package with “4 features + the last one” to the production environment.
  • Once everything is done without any issues, we merge the two branches and deploy the new version of the application.

When asked how to handle two uncertain features, the answer is to create a separate branch for each uncertain feature.

What I saw was that the team was using a complex Canary Deployment for Canary Release. This is a very common mistake.

The Right Way to Do Canary Release

As I mentioned above, using feature flag to decouple feature release from code deployment is the right way to do Canary Release.

  1. Use feature flags to control the release of each feature.
  2. Deploy your code whenever you want, and release the feature when you’re ready.
  3. Testing in Production, Progressively Rollout and Monitor the performance of each feature.

Who is Using Each Tool

Canary Deployment is widely used by DevOps or Ops teams. They focus more on site reliability and resource consumption of the infrastructure. They need to ensure that the new version does not:

  1. Threaten the safety of the system.
  2. Cause network latency and throughput anomalies.
  3. Lead to over consumption of resources.
  4. Impact system stability.
  5. And so on.

Canary Release is widely used by Development and Product teams. They are more concerned with application bugs, user experience, and business value. They need to ensure that new features do not:

  1. Contain bugs.
  2. Negatively impact user experience.
  3. Detract from business value.
  4. Delay the release of other features.
  5. And so on.

What Kind of Tools Should You Use

Many DevOps tools or Orchestrators support Canary Deployment, such as:

  1. Kubernetes
  2. Istio, a kubernetes extended tool that support canary deployment.
  3. Spinnaker
  4. ArgoCD
  5. And so on.

For Canary Release, you can use the following tools:

  1. LaunchDarkly
  2. Featbit
  3. Unleash
  4. Flagsmith
  5. DevCycle
  6. And so on.

You should choose your tools based on your needs and the size of your team. Aim to make the entire software delivery pipeline as smooth as possible.

  • Minimize the reconfiguration process and make it as automatic as possible. For example, add a staging environment and allow the CD tool to deploy to this staging environment automatically. Then, switch to the production environment through an approval trigger.
  • Reduce the need for cross-functional collaboration; do not require engineers to perform product and business tasks. For example, enable product managers to adjust the rollout percentage themselves, without needing any engineer’s help or approval.

I prefer using open source tools, because they are more flexible and can be customized to meet your needs. Today, open source providers also provide enterprise versions with more features and support. I wrote another article about top open source feature flags tool.

Conclusion

Understanding the differences between Canary Deployment and Canary Release is important for modern software development. Canary Deployment is for deploying a new version of application, while Canary Release is for releasing features in an application. Using feature flag technology to decouple feature release from code deployment is the right way to do Canary Release. This approach allows teams to release new features independently and test them in production before rolling them out to the entire user base. By using the right tools and practices, teams can minimize the risk of introducing new features and ensure a smooth and successful release process.

Combine two technologies together, you can achieve a smooth and successful release process.

Originally published at https://www.featbit.co.

--

--

Beau

Full-stack Engineer (From Javascript, C# to Cloud, DevOps)