40
votes

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?

2
Rolling deployments are staggered. Blue/green is a sudden switch after canary testing.Matt Schuchard
That's my understanding as well, but if you watch the AWS video by the solution architects their solutions for blue/green aren't sudden and are gradual hence my question.n00b
You have to realize a lot of this is opinion and theory. The idea for both of these is that you minimize production downtime for an application. You should make sure you are always able to "see the forest for the trees" here. Get the idea of how both of these work and then adapt them to best fit your environment.Matt Schuchard

2 Answers

47
votes

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.

43
votes

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.