Elastic Beanstalk is not scaling as expected on Request Count metric


I want my Elastic beanstalk to scale on request count but after running some testing script it donot scale as expected also my load balancer is not responding real time traffic. It takes long to reflect number. My current scaling configurations of beanstalk are

Elastic beanstalk configurations for auto scaling

2 Answers

Hi Sultan,

Adjust Thresholds:

  • Lower the upper threshold to trigger scaling earlier. Consider setting it below 2000 requests.

Reduce Cooldown Period:

  • Decrease the scaling cooldown (currently 300 seconds) to allow faster scaling responses.

Check Load Balancer Configuration:

  • Ensure the load balancer is configured correctly for real-time traffic distribution and health checks.

Test with Lower Load:

  • Gradually increase the load in your testing script to monitor scaling behavior and adjust configurations accordingly.

Referral Documentation link : https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-autoscaling-triggers.html

profile picture
answered a month ago

hi There could be a few reasons why your Elastic Beanstalk environment isn't scaling as expected based on request count and your load balancer isn't reflecting real-time traffic

Scaling Issue:

Trigger Metric: Double-check your scaling trigger configuration. Ensure "Request Count" is selected as the scaling metric. You can use CloudWatch to verify the request count metric is being reported correctly for your environment.

Trigger Type: Make sure the trigger type is set to "Average" for the load balancer. This ensures scaling happens when the average request count across all instances reaches the threshold. Using "Sum" might only trigger scaling when the total requests reach the limit, even if individual instances are overloaded.

Cooldown Period: Verify your scaling configuration has a cooldown period set appropriately. This prevents excessive scaling up/down due to temporary spikes.

Health Checks: Ensure your Elastic Beanstalk environment health checks are functioning. If instances are unhealthy, they won't be included in scaling decisions, even if request count is high.

Load Balancer Delay:

Metrics Collection: Load balancers might have a slight delay in reflecting real-time traffic. This is normal due to the collection and aggregation process. The delay shouldn't be significant, though.

Health Checks: Similar to Elastic Beanstalk environments, ensure your load balancer health checks are functioning properly. Unhealthy instances behind the balancer won't be routed traffic, causing delays in reflecting real-time load.

Here are some helpful resources for further troubleshooting:

AWS Documentation on Scaling Triggers: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-autoscaling-triggers.html

Troubleshooting Scaling Issues in Beanstalk: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html

profile picture
answered a month ago
reviewed 24 days 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