'Blue Green Deployments vs Rolling Deployments?
What's the difference between a blue/green deployment and a rolling deployment? I always thought that a blue/green deployment was a sudden switch of traffic from the old version to the new version immediately.
This talk about Blue/Green deployment on AWS shows various different strategies to implement a blue/green deployment, but they also seem to match the definition of a rolling deployment.
Is a blue/green deployment a subset of rolling deployments?
Solution 1:[1]
In Blue Green Deployment, you have TWO complete environments.
One is Blue environment which is running and the Green environment to which you want to upgrade. Once you swap the environment from blue to green, the traffic is directed to your new green environment. You can delete or save your old blue environment for backup until the green environment is stable.
In Rolling Deployment, you have only ONE complete environment.
Once you start upgrading your environment. The code is deployed in the subset of instances of the same environment and moves to another subset after completion.
So both are different in various factors and you need to choose the deployment model based on the scenario. Blue/green deployment is not a subset of rolling deployments.
Solution 2:[2]
Blue-Green Deployment:
There are two environments, Blue environment which is "old" and contains one or more applications(instances or containers) and Green environment which is "new" and contains one or more applications(instances or containers).
Then, 100% traffic is quickly switched from Blue environment to Green environment at once as shown below:
This image above is from https://www.encora.com/insights/zero-downtime-deployment-techniques-blue-green-deployments originally created by the company "Encora"
This image above is from https://avikdas.com/2020/06/30/scalability-concepts-zero-downtime-deployments.html originally created by Avik Das
In addition, there is Canary Deployment which is gradual way of Blue-Green Deployment. In this case of Canary Deployment, 100% traffic is gradually switched from Blue environment to Green environment taking a longer time(30 minutes, hours, or days) than Blue-Green Deployment as shown below:
This image above is from https://www.encora.com/insights/zero-downtime-deployment-techniques-canary-deployments originally created by the company "Encora"
Rolling Deployment:
There is one environment which contains one or more "old" applications(instances or containers).
Then, one by one, one or more "old" applications(instances or containers) are replaced with one or more "new" applications(instances or containers) as shown below:
This image above is from https://avikdas.com/2020/06/30/scalability-concepts-zero-downtime-deployments.html originally created by Avik Das
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sarat Chandra |
| Solution 2 | Kai - Kazuya Ito |
