'AWS Load Balancers taking twenty minutes or more to recognise a newly added instance is healthy

At my current place of work we have a number of services that are running on Elastic Beanstalk. Deploying new versions to these Elastic Beanstalk services can sometimes take the best part of an hour.

Looking at the Elastic Beanstalk events page you can see it takes almost 25 minutes for a new instance to be detected as healthy and added.

ElasticBeanstalkEventsOutput

When I check the instances in the EC2 console and also via the Auto Scaling Group they appear to be healthy. When I check to see what the load balancer is doing it shows the new instance as being out of service. From observation it appears to be the load balancer's tardiness in recognising the new instances as being healthy that is responsible for the delay. LoadBalancerView.

Does anyone know why this could be?

I appreciate this is a rather open question and the short answer is to upgrade these services to use ECS but as that isn't going to happen in the next few months it would be nice to at least know why it's taking so long.

These are the Health Check settings on the load balancer. enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source