0
votes

I have one scale in simple policy in my autoscaling group which is based on CPU Utilization. The policy looks like:

Execute :
When CPUUtilization < 50 for 5 consecutive periods of 60 seconds 
Action : 
Remove 10 percent of group
Cooldown time:
600 seconds before allowing another scaling activity

Now I would like to add a more aggressive simple policy, saying if CPUUtilization is less than 35 for 5 minutes, remove 20% of the group.

The goal is

When 35 < CPU Utilization < 50 for 5 minutes, remove 10% of the group

When CPU Utilization < 35 for 5 minutes, remove 20% of the group

The problem is I cannot use scaling policy with steps since the cooldown time is not supported which could make my asg scaling in until the min instances.

And if I have both simple policies, they are obviously conflict. I don't really know which policy will be triggered first if it reachs CPUUtilization < 35.

Does anyone have a workaround of this one? Thanks.

1
Can you please share what goal are you trying to achieve? - Kunal Pradhan
@KunalPradhan goal is added in the question. Thanks. - Liu

1 Answers

0
votes

You would certainly need to use Scaling Policy with Steps to be able to specify multiple rules for the scaling policy. While it doesn't allow the specification of a Cooldown period, it should work fine. I recommend you try it and monitor/test the system.

By the way, you have a very aggressive policy. It is not typically a good idea to scale-in based upon only 5 minutes of data. Amazon EC2 is charged in hourly increments, so you might be thrashing (adding and removing instances very quickly), which is not economical. It is typically recommended to scale-out quickly (to respond to user demand) but scale-in slowly (since there's really no rush).