Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "cooldown" parameter for QueueProcessingServiceBaseProps in aws-ecs-patterns lib #8298

Closed
astafev opened this issue Jun 1, 2020 · 3 comments · Fixed by #28730
Closed
Assignees
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library feature/pattern Feature requests related to high level L3 pattern libraries feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p2

Comments

@astafev
Copy link

astafev commented Jun 1, 2020

At the moment in the constructor of QueueProcessingFargateService scaling steps can be defined, but cooldown parameter from autoscaling cannot:

this.service = new ecsPatterns.QueueProcessingFargateService(this, 'Service', {
      scalingSteps: [{...}, {...}],
      ....
    });

Proposed Solution

As far as I can see, the parameter should be provided here: https://github.com/aws/aws-cdk/blob/master/packages/@aws-cdk/aws-ecs-patterns/lib/base/queue-processing-service-base.ts#L270 in a similar fashion as scalingSteps.

Other

  • I see that the behavior can be modified by extending QueueProcessingFargateService and overriding configureAutoscalingForService, but I believe that if scalingSteps is defined in the config, cooldown should be defined as well.
  • While reading the code of the component QueueProcessingServiceBase, I found out that it has CpuScaling defined which cannot be affected anyhow by configuration, I believe it also should be modifiable. For my use case, scaling based on the queue size is enough.

This is a 🚀 Feature Request

@astafev astafev added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 1, 2020
@SomayaB SomayaB added the @aws-cdk/aws-ecs-patterns Related to ecs-patterns library label Jun 2, 2020
@SoManyHs SoManyHs added good first issue Related to contributions. See CONTRIBUTING.md p2 and removed needs-triage This issue or PR still needs to be triaged. labels Jun 15, 2020
@ericzbeard ericzbeard added the feature/pattern Feature requests related to high level L3 pattern libraries label Apr 2, 2021
@fitzchak
Copy link

fitzchak commented May 5, 2021

I would like to add to this feature request a support for different cooldown value for scaling up and scaling down.

The reason for the need of a bigger value for cooldown period for scaling down of QueueProcessingFargateService as when the task is taking long to complete and I set scaling down to 0 if there are no messages in the queue, the running tasks will be killed upon scaling down unless I have an option to configure longer period of scaling down.

@phishy
Copy link

phishy commented Feb 17, 2022

Oh yeah, just hit this wall. I would love for the policy to at least be exposed as a property so we can modify it, if not in the constructor.

@aaythapa aaythapa self-assigned this Jan 11, 2024
@mergify mergify bot closed this as completed in #28730 Jan 18, 2024
mergify bot pushed a commit that referenced this issue Jan 18, 2024
…rops (#28730)

Add an optional `Cooldown` parameter that allows users to define the grace period after a scaling activity. Default will be `undefined` to maintain compatibility. 


Closes #8298.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library feature/pattern Feature requests related to high level L3 pattern libraries feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p2
Projects
None yet
9 participants