Blue/green deployment with micro services and DNS Currently, we have on our test environment an ECS Cluster with micro services deployed. All micro services are talking to each other through Route53 DNS CNAMEs like service1.company.com, service2.company.com, etc.

Here is a simplified schema of the infra:


The ALB listens on port 80 and everything works fine.

Now comes the troubles: I'm trying to build a blue/green deployment infra.

I basically know how to do it (HAProxies, 2x ALBs, 2x ECS Clusters). What I want to acheive can be seen https://www.youtube.com/watch?v=KJOORneBTHI

I'm stuck with the fact that we are using CNAMEs for our micro services communications.


So on the blue part:


CNAME service1.company.com -> ALBBlue


On the green part:


CNAME service1.company.com -> ALBGreen

But that's something I cannot do of course.

How can I do?
You should have 3 names when you're willing to do a blue/green deployment.

Two set of names, one for blue, one for green, which will works as is, and a production entrypoint which will point to either the blue name or green name.

The point of a blue/green deployment is to be able to test the full deploy before switching the clients entry point, so your services calls themselves don't have to use the entry point name itself.