3

My team and I are trying to come up with the best way to implement blue/green for AWS ECS but we can't seem to definitively answer one question about application load balancers.

So far, the method that seems to meet our goals the most is by deploying a blue service and a green service into separate target groups and updating the listener on our application load balancer. However, we have a few longer-running transactions and according to this article:

https://aws.amazon.com/blogs/compute/bluegreen-deployments-with-amazon-ecs/

This method of blue/green does not gracefully drain connections. However, I read a post recently by another AWS engineer that contradicts that, and claims that modifying the listener only affects new incoming connections and therefore does drain gracefully.

Can anyone shed light on what actually happens when I modify the listener for an ELB?

2 Answers 2

1

You should have ELB as part of your stack, ie one ELB for blue stack and one ELB for green stack.

That way you can run a complete suit of acceptance testing against the new ELB and once happy replace the ELB name in DNS. That won’t affect your long running sessions as they will retain their connections to the old ELB even if the DNS changes.

Hope that helps :)

0

AWS documentation on Application Load Balancers states that when you deregister a target, its connections are drained. What you could do is deregister targets within your Target Group in order to gracefully drain connections. Of course this isn't as ideal as selecting between multiple Target Groups.

Remember that you also cannot have multiple listeners within the same ELB with the same port protocol.

As another user stated in their answer, you should have separate ELBs in your deployment and just flip flop between them in Route53. This way you can easily use Routing Policies to send only a portion of the traffic to appropriate ELB/Target Group (say 80% to blue, 20% to green).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .