Unhealthy instance in Application Load Balancer with 2 instances in target group

Hi,
I am new to AWS.
By following the DEMO, I created an ALB and added 2 instances (A and B) in target group.
I deliberately shutdown instance B to understand if all traffic goes to A.
I brought instance B back again, but still the traffic is not going to B now. The target group says the instance B is unhealthy however the instance B is up and running. How to fix this so that the LB distributes traffic equally between both instances A and B.?

Hi All, the issue got fixed.
It was due to nginx service not starting after stop and start of the instance.
After starting the service, the target group became healthy, and traffic got equally distributed.

The configuration of the target group leads you to know what is unhealthy. In this case it would have been configured to make an HTTP call to the nginx server running on the instance ad will expect a 200 response to consider it healthy. As you found, if the server on the instance isn’t started, then the health check will fail and the instance may be recycled depending on configuration regarding a failed health check.

1 Like