I have setup EC2 Autoscale policies along CPU monitors and it's working well.
I have occasional bursts that triggers autoscale and more servers are added.
If the servers are experiencing a burst that endures 30 minutes and two more instances are added to help with the current jobs I'd like to keep them around for 59 minutes (since I paid for 1 hour) instead of them being terminated when scaling down is triggered.
So basically I want to move the checks around the one hour mark from start and see if they are still needed, otherwise shut down. Should I play with cooldown or grace-period?
Here are the current rules (alarms not shown), as you can see I'm using the new
OldestInstance termination policy.
as-create-auto-scaling-group MyASGroup \ --availability-zones us-east-1c \ --launch-configuration MyLaunchConfig \ --grace-period 300 \ --health-check-type ELB \ --min-size 1 \ --max-size 3 \ --desired-capacity 1 \ --load-balancers MyELB \ --termination-policies "OldestInstance" \ --tag ... as-put-scaling-policy ScaleUp \ --type ChangeInCapacity \ --auto-scaling-group MyASGroup \ --adjustment=1 \ --cooldown 300 as-put-scaling-policy ScaleDown \ --type ChangeInCapacity \ --auto-scaling-group MyASGroup \ --adjustment=-1 \ --cooldown 300
Is such thing possible? Thanks.