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

已提問 4 年前檢視次數 342 次
2 個答案
0
已接受的答案

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.

已回答 4 年前
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?

已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南