0
votes

I have a Elastic Beanstalk enviroment that works perfectly when I configure the capacity as a single instance. The SpringBoot app respond without problems on the port 8083, for example when I make a POST petition like "http://54.162.95.157:8083/login" (54.162.95.157 that is the public ip of ec2 instance). But when I change the Beanstalk environment to a balanced load, the environment stops working. The POST request now I do it to the DNS of the load balancer, for example "http://awseb-e-m-AWSEBLoa-VVP8D98KT5SX-219136517.us-east-1.elb.amazonaws.com:80/login" but it fails.. I get a 503 Service Unavailable: Back-end server is at capacity as Response. My question is, how to correctly configure a load balancer in this case? or How to move from a single instance to a load balancer and make this work?

The load balancer configuration:

enter image description here

1
Did you look at the health check option for the load balancer. It might be the case that when the Load Balancer is asking for the health of the instance your application server is not responding. Look at the logs on the server.firecast
check firewall rules, ssh to instance and check your service working like curl -iL 127.0.0.1:8083NeverBe

1 Answers

0
votes

The problem occurs because the load balancer of aws only sends traffic to the instance that is healthy, otherwise it does not, therefore I had to configure the way I want the health of my instances to be checked. In this way the problem was solved.