Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elastic Beanstalk NetworkOut auto scaling

I have an Elastic Beanstalk app running on t2.medium with autoscaling enabled. EB automatically sets a default autoscale trigger of 6,000,000 bytes over a 5 minute period on NetworkOut. We have a meeting app, so many people load the page at the same time, this causes a spike of NetworkOut data for probably a 10 minute period.

The only place I can get info on what the bandwidth of a t2.medium instance is here:

EC2 instance types's exact network performance?

This says 250-300 MBit/s, which over 5 minutes is a much larger amount of data (~9Gb, unless my calculations are wrong).

I possibly incorrectly assumed EB would set a sensible figure for autoscaling but this seems miles out. Do you think it's safe to increase the autoscaling trigger to something closer to the available bandwidth?

like image 639
Si-N Avatar asked Aug 16 '17 10:08

Si-N


People also ask

Does Elastic Beanstalk automatically scale?

Your AWS Elastic Beanstalk environment includes an Auto Scaling group that manages the Amazon EC2 instances in your environment. In a single-instance environment, the Auto Scaling group ensures that there is always one instance running.

How do I turn off Auto Scaling in Elastic Beanstalk?

On the Automatic scaling tab, under Dynamic scaling policies, select the check box in the top right corner of the desired scaling policy. Scroll to the top of the Dynamic scaling policies section, and choose Actions, Disable.

Can CloudWatch trigger Auto Scaling?

The Auto Scaling action isn't enabled for the CloudWatch alarm, which prevents the scaling policy from being invoked. The scaling policy in the Auto Scaling group is disabled. A disabled policy prevents the group from being evaluated.

How do you trigger Auto Scaling?

Configuring Auto Scaling triggersIn the navigation pane, choose Environments, and then choose the name of your environment from the list. If you have many environments, use the search bar to filter the environment list. In the navigation pane, choose Configuration. In the Capacity configuration category, choose Edit.


1 Answers

The default NetworkOut alarms are kind of silly - the <2,000,000 one in particular, since it often leads to frequent termination/rebuild of low-use instances.

I believe, however, what the >6,000,000 alarm is alerting on is that outgoing bandwidth from your instance(s) has exceeded 6Mbit/min for five consecutive minutes. That's still well below the maximum bandwidth in the SO post you linked, but not quite as egregious as 6MBit total for five minutes.

Regardless, there's no right or wrong answer - every application is going to have different alarm criteria. I would suggest that you gradually increase the alarm threshold while monitoring your instance's performance until you find an appropriate level that provides a good user experience with over-alerting.

like image 176
Brian Avatar answered Sep 27 '22 21:09

Brian