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: ECS Cluster for micro services

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?

1 Answer 1


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.

  • But how to make the micro services point to each other in the same Cluster? I cannot tell the micro services that they are on the blue/green by modifying their URL (service1.blue.company.com/service1.green.company.com)
    – Kaymaz
    Commented Sep 17, 2018 at 8:50
  • Why can't you use blue/green names on each cluster ?
    – Tensibai
    Commented Sep 17, 2018 at 8:51
  • So it means the micro services must know in which "env" they are. That doesn't seem right to me. I must be missing something
    – Kaymaz
    Commented Sep 17, 2018 at 8:52
  • That's just a variable you give to your services, as well as any credential, db location, whatever which is cluster dependent.
    – Tensibai
    Commented Sep 17, 2018 at 8:53
  • Ok so I would have blue.company.com, green.company.com and a third one?
    – Kaymaz
    Commented Sep 17, 2018 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.