Reputation: 7349
I'm using boto3 to apply custom application autoscaling policies to two HTTP endpoints, which increases instance counts for each. These policies are triggered based on the size of a single queue. For example, both endpoints have alerts that trigger scale-out when the queue gets larger than 1000. Currently, both endpoints begin scaling as soon as this alarm goes High.
Endpoint #1 takes 3 mins to complete scale-out, while endpoint #2 takes 7 mins to complete scale-out. The issue is that endpoint #1 sends data to endpoint #2, so I need endpoint #2 to finish scaling out before endpoint #1.
So, I'm trying to find a way to add a time delay to endpoint #1's scale-out. It looks like the scale_out_cooldown
parameter only adds a time delay between scaling events, but not at initial triggering as I'd like. Is there a way to delay the initial scale-out event triggered by the alarm for a set period of seconds?
Upvotes: 0
Views: 313
Reputation: 853
Add delay to initial AWS application autoscaling scale-out is not possible right now by this way. Remember that the alarm exists so that at the moment it is triggered the autoscaling is executed, then one plays with the parameters of the alarm to find the ideal moment to scale in or scale out. I recommend that you separate the autoscaling process of your 2 endpoints, for example that the alarm triggers a lambda that executes the autoscaling of the first endpoint and then after 2 or 3 minutes it executes the autoscaling for your second endpoint.
Upvotes: 0