Elastic Beanstalk Load Balancer few minutes down time when adding instance

0

Hi,

We host our whole platform on Elastic Beanstalk and currently have a problem when our API is getting stressed and scaling out with the help of the Load Balancer and adding a new instance.
It seems like when that happens that the load balancer is not trafficking any requests to the instances and just gives an error when trying to reach it. It takes around 5-10 minutes before we can use the API which is quite stressful.

Is there anything we can do to minimize the down town with the load balancer scaling or are we doing something wrong?

It might be important to note that our API is using a classic load balancer while our Frontend is using a application load balancer.

thanks in advance.

best regards

Edited by: codingcow on Jul 8, 2020 3:36 AM

asked 2 years ago33 views
2 Answers
0
Accepted Answer

Take a look at the settings your load balancer is using to determine heathy/unhealthy. You can adjust these down to require fewer requests (or less time) to determine if an instance is healthy.

Make sure the URL/endpoint for your health check is available (returns a 200 response) as soon as your app is ready to use.

The Health tab in the beanstalk console will describe what is happening with the new instances, usually "Checking instance health". Minimizing the work you have to do when a new instance is started can make this shorter. Or using a larger instance size can help too since startup is rather CPU intensive. Or if you are downloading a bunch of stuff at startup (like yum/rpm packages), make sure these are located in the same AWS Region to ensure fast retrieval.

answered 2 years ago
0

Thanks for the answer, we would try to look into it when we are back on Monday.

it just puzzles me that the current instance is not getting any requests. It makes sense that the new instance is building and would be available in a short time for the LB but why would the current instance not get any requests, the LB should know that the current instance is up and running, am I missing something?

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions