[ecs] Step Scaling policy does not create all steps
See original GitHub issueI’m using the scaleOnMetric
method of the FargateService construct. My requirements need 2 policies.
construct.scaling.scaleOnMetric('scale-up-policy', {
scalingSteps: [
{
lower: 65,
change: +2,
},
{
lower: 85,
change: +3,
},
],
metric: construct.service.metricCpuUtilization({
statistic: 'Maximum',
period: cdk.Duration.minutes(1),
}),
cooldown: cdk.Duration.minutes(2),
});
construct.scaling.scaleOnMetric('scale-down-policy', {
scalingSteps: [
{
upper: 50,
change: -1,
},
{
upper: 40,
change: -2,
},
],
metric: construct.service.metricCpuUtilization({
statistic: 'Average',
}),
});
However it never creates the 65 step. It only creates >85 step.
Reproduction Steps
- Create a FargateService
- Add autoscaling
- Make step scaling policies as outlined above
What did you expect to happen?
I should have 2 alarms created with the actions:
-
low alarm
- remove 1 task < 50% CPU
- remove 2 tasks < 40 % CPU
-
high alarm
- add 2 tasks > 65% CPU
- add 3 tasks > 85% CPU
What actually happened?
Environment
- CLI Version : 1.61.1
- Framework Version: 1.61.1
- Node.js Version: v14.8.0
- OS : mac os
- Language (Version): typescript
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Step scaling policies - Amazon Elastic Container Service
When you create a step scaling policy, you specify one or more step adjustments that automatically scale the number of instances dynamically based...
Read more >AWS step scaling adding more tasks than configured
A couple of things. Its not going to trigger all 3 of the steps and add 6. It will pick a single step...
Read more >Configuring AWS Auto Scaling | Crosswalk - Pulumi
AWS Auto Scaling can be used to build scaling plans for resources including Amazon EC2 instances and Spot Fleets, and Amazon ECS clusters...
Read more >Configure Amazon ECS Service Auto Scaling on Fargate
Step Scaling Policy. For step scaling policies, we create and manage the CloudWatch alarms that trigger the scaling process. We can create ......
Read more >Auto Scaling:Manage scaling rules - Alibaba Cloud
You can create simple scaling rules, step scaling rules, ... If you do not configure the Cooldown Time parameter of the scaling rule, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for fixing this @ruancomelli 🎉
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.