问题
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?
回答1:
I have written an essay on this topic here: http://blog.itaysk.com/2017/11/20/deployment-strategies-defined
In my opinion the difference is whether the new version is applied by replacing instances in the existing setup (in the case of rolling upgrade), or a completely isolated setup is created for the new version (in the case of Blue/Green). In my opinion Blue/Green is the safest strategy and is better in most cases for production deployments. Read the post for a detailed comparison.
回答2:
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.
来源:https://stackoverflow.com/questions/42358118/blue-green-deployments-vs-rolling-deployments