1

Considering this scenario:

  1. An Auto-Scaling Group (ASG) representing the blue cluster is running a web application behind a load-balancer
  2. Another ASG representing the green cluster is deployed with a new version of the web application, connected to the same load-balancer. But because this green cluster is not ready, it'll return HTTP 503 (Temporarily Unavailable). Because of the 503 return code, the load-balancer will keep routing all traffic to the blue environment and ignore the green one.
  3. The green cluster will run an automatic migration of the data to the new version (which is done by the application code itself).
  4. After the migration is done, the green cluster will tell the blue one to return 503 and start returning HTTP 200.
  5. The load balancer should start routing traffic to the green cluster now.

Is it possible to set-up AWS to have two ASGs (representing blue and green) behind the same load balancer, so that the applications running on the ASG can use HTTP codes to control which cluster (blue or green) is receiving traffic, but without the ASG killing machines?

I know that CodeDeploy can help here, but I'm looking for a vendor-agnostic solution that works across AWS, Azure and any traditional (on-premise) load-balancer.

Dennis Doomen
  • 8,368
  • 1
  • 32
  • 44

0 Answers0