1

I have an Elastic Beanstalk app running on Docker set up with autoscaling. When another instance is added to my environment as a result of autoscaling, it will 502 while the instance goes through the deployment process. If I ssh into the relevant box, I can see (via docker ps) that docker is in the process of setting itself up.

How can I prevent my load balancer from directing traffic to the instance until after the instance deployment has actually completed? I found this potentially related question on SuperUser, but I think my health check URL is set-up properly -- I have it set-up to point at the root of the domain, which definitely 502s when I navigate to it in my browser, so I suspect that's not the cause of my problem.

Alex Alifimoff
  • 1,850
  • 2
  • 17
  • 34
  • Can you share how your health check is setup? Specifically, what protocol/port is it set to use? – Brian Dec 04 '17 at 18:26
  • Where exactly should I be looking for this? In Elastic Beanstalk config or in the EC2 panel Load Balancer config? My listener is set up to use HTTP on port 80 for the latter, but I can't find any protocol/port info in the Elastic Beanstalk panel itself. – Alex Alifimoff Dec 04 '17 at 19:03
  • Sorry I was unclear - I meant in the EC2 console, under Load Balancers. I suspected that perhaps the health check was using TCP, but if it's using HTTP on port 80 then that should be correctly mimicing your manual browser test (unless you're forcing SSL?) One other thought - when you get a 502 in your browser, are you going to the ELB (yourdomain.com) or the new instance itself (ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.com)? You want the latter. – Brian Dec 04 '17 at 20:34

0 Answers0