I need help in setting up autoscaling based on network throughput.
Our front instances are placed inside an autoscaling group. We want the number of instances to increase as a function of network throughput in the whole autoscaling group. i.e. Once a threshold is reached, add another instance.
Right now, our setup is based on this tutorial:
- A Cloudwatch metric composed of a new metric called
Network Total
that equals the sum ofNetworkIn
(AutoScalingGroup), andNetworkOut
(AutoScalingGroup). - This metric is supposed to be in Gbit/s, but the y axis in the metric plot shows 'No Unit'.
- Our thresholds - taken from this analysis - are set on Bytes/s, given that CloudWatch metrics measure in Bytes. So, for a t3.small, 0.13 Gbit/s is 16.250.000 Bytes/s (Google Calculator)
- The "Instance increase" scheduling policy activates once
NetworkTotal
has reached 80% of its total throughput. In the t3.small case, it's 80% of 0.13 Gbit/s (0.104 Gbit/s) during 1 minute.
I suspect these calculations are wrong given that our current traffic is way higher than the threshold. The issue might be either on the conversion from Gbit/s to Bytes/s, or in the way we set up the alarm.
Of course any other approach is welcome :)
Thanks in advance.