I have an AWS ASG and a controller script which in crone normalizes desired boundaries for it.
Each time controller calculates intended capacity based on some gathered conditions. Yet controller itself doesn't have any intermediate state storage to track the changes so every single iteration it is scaling ASG to resolved target demand (regardless it could be the same as an actual ASG state)
Is there any vital cons of such approach
- could this make any harm to ASG stability or something?
- could node instance be rescheduled (an existing one dropped but a new one created) due to redundant requests if the demand is not changed
- Is there some api calls limit that could be exceeded with that?
- Are such api calls charged by AWS
- maybe any other caveats
Or maybe theres more convenient command or flag for this (--if-changed or something)
I'm scaling with such a command
aws autoscaling update-auto-scaling-group --region us-east-2 \
--auto-scaling-group-name ${ASG_NAME} \
--min-size "${WORKERS_MIN}" \
--max-size "${WORKERS_MAX}"
Thx.