Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
398 views
in Technique[技术] by (71.8m points)

amazon web services - In AWS - difference between Immutable and Blue/Green deployments?

Per AWS documentation, I get the impression that Immutable and Blue/Green are the same thing, just a different name. In both cases you are creating an entirely new set of servers and transitioning to those servers at the final step of deployment.

Perhaps there are some fine details that differentiate these two. But if so fine, what is the point of making them distinct when they are practically the same thing?

Per AWS docs: (source: https://docs.aws.amazon.com/whitepapers/latest/practicing-continuous-integration-continuous-delivery/immutable-and-bluegreen-deployment.html)

The immutable pattern specifies a deployment of application code by starting an entirely new set of servers with a new configuration or version of application code. This pattern leverages the cloud capability that new server resources are created with simple API calls.

The blue/green deployment strategy is a type of immutable deployment which also requires creation of another environment. Once the new environment is up and passed all tests, traffic is shifted to this new deployment. Crucially the old environment, that is, the “blue” environment, is kept idle in case a rollback is needed.

The "crucially" sentence makes it sound like that is the differentiating factor but in immutable deployments you can keep the old instances in their target group idle post deployment too, if you wanted.

question from:https://stackoverflow.com/questions/65925489/in-aws-difference-between-immutable-and-blue-green-deployments

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

they are executed differently, in a few words without too much details:

immutable: in the same environment (so under the same load balancer) a new autoscaling group is created alongside with the old one. Since the first new instance is created it starts to serve traffic. When the new instances are all healthy the old ones are switched off.

blue/green: a new environment is created from scratch (so another load balancer). The switch is performed at DNS level routing the traffic from the OLD to the NEW when the new environment is ready and healthy.

The main difference is that in the immutable update, the new instances serve traffic alongside the old ones, while in the blue/green this doesn't happen (you have an instant complete switch from old to new).

So, in certain cases, for example:

  • if you application depends on some configuration that has to change from the old version to the new one
  • the new version cannot run at the same time of the old one because of application constraints
  • "you want to update an environment to an incompatible platform version" (taken from the AWS doc)

you have to use the blue/green strategy.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...