Is there a effective way how to set-up rule in AWS auto-scaling group to terminate instances which are under given % of CPU ?
We are using autoscaling for bunch of EC2 instances - quite intensive computations over the night so CPUs are burning or doing nothing (if incoming task queue is empty).
Monitoring rules allows you to monitor average CPU (for whole group) but we have quite often few instances which are finished and there's nothing much to do (if incoming task queue is empty).
Example :
- Rule #1 : scale down if average CPU < 50%
Rule #2 : scale up if average CPU > 80%
15 instances running in total :
- 12 instances fully loaded CPU average +- 70%
- 3 instances idle : CPU average +- 10 %
Average CPU for whole group : 58 % - this will not trigger 'scale down' rule, is there a way how to optimize rules within auto-scaling group to deal with this problem ?
Thank you
