We are in the Era of rapidly creating software and changing the features often based on Customers need and Deploying it into the Production. Every organization follows their unique way of deploying the application to the Production. Mostly their concerns are about Deploying the bug free code. In this article, we will discuss the difference and pros and cons of the various Deployment Strategies which are followed by various organizations. Also, from the end of this Canary vs Blue-Green vs Rolling Deployment comparison, you will know which one is most suitable for your Organization.
Before all, let’s see how normal deployment happens.
When you deploy the new version or feature on the target environment. It might get success or fail in terms of Feature functionality, Security, or durability.
The Above image shows that the cluster of servers is receiving the new package in the new deployment altogether. In this event, either all the nodes will succeed or fail. Also, we cannot avoid downtime. So, Some of the Standard deployment or release strategies are been followed by the organization. We will discuss what are the major deployment method or strategies are followed by the organization and the pros and cons of the Canary vs Blue-Green vs Rolling Deployment and compare each other.
Unlike the normal deployment, Canary Deployment follows the strategy that releases the feature or new versions into the target servers incrementally to the subset of users. This deployment will happen in incremental phases. And the subset of users will act as the Testers/validators who will verify the release.
The above image assumes the application is in Version V1.0 and the new release or the deployment deploys V2.0. This deployment happens in four phases. In phase 1, the Release will happen in 25% of the nodes in the cluster and that will be tested by the Set of users. Then, in Phase 2, 50% of nodes will receive the V2.0 and Phase 3- 75%, and finally in phase 4- 100% of nodes will receive the new version. This is how Canary Deployment works.
Pros of Canary Deployment
Cons of Canary Deployment
We have already discussed about the Blue-Green Deployment in our previous article.
DigitalVarys.com : Blue Green Deployment
Blue and Green mean two identical Production environments ……
However, here is a simple explanation of what is blue-green deployment. Blue and Green mean two identical Production environments. Which mean, we will have two identical production environment. One is Blue or staging environment, and another is Green or Production environment, and among those, one will serve the end-user at a time.
In the above image, we have two identical clusters and on which Green one will act as Production and Blue one will act as a Staging environment. The new feature will be released on the Green environment first and then after testing succeeds, the Blue environment will be pointed to Public and the Green environment will receive the same Update.
Pros of Blue-Green Deployment
Cons of Blue-Green Deployment.
Rolling Deployment is like Canary Deployment. But the difference is, in the rolling deployment, we update the newer version into a single/defended number of instances.
As mentioned in the above image, Rolling Deployment releases the update in one by one process. Which means, the Deployment is happening in the first two instance and then, incrementally next two instance vice versa. So, testing will be carried out in each batch of release.
Pros of Rolling Deployment
Cons of Rolling Deployment
How to choose a Deployment Strategies.
After analyzing the working mechanism of the above deployment strategies, Canary Deployment will be suitable for mission-critical Web applications. Blue-Green Deployment can be done for the customer base where they have less business impact. Rolling deployment is useful for the cluster which is having a smaller number of nodes.
In this article, we discussed some strategies for Continuous Delivery. Especially, Canary vs Blue-Green vs Rolling Deployment with Pros and Cons of each Deployment strategies. In our upcoming tutorials, we will discuss How to Implement the Canary Deployment on Kubernetes (or similar platforms like OpenShift, Tanzu, Rancher, and more.) Stay tuned and subscribe DigitalVarys for more articles and study materials on DevOps, Agile, DevSecOps, and App Development.
Experienced DevSecOps Practitioner, Tech Blogger, Expertise in Designing Solutions in Public and Private Cloud. Opensource Community Contributor.