-
Notifications
You must be signed in to change notification settings - Fork 4.1k
feat(ecs-patterns): enable Backlog per instance scaling in QueueProcessingFargateService #34202
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
I was getting a error from the Code build job complaining about the version mismatch in the I have followed the integration test guideline to generate the snapshot, which outputted the version to 43.0.0
I have updated the version manually to 42.0.0 in the Please let me know if its fine, or any other way to fix this issue |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue #34072
Closes #34072.
Reason for this change
AWS Documentation recommends a Backlog per instance scaling strategy for Queue based workloads Scale SQS queue using custom metric
Currently QueueProcessingFargateService does not natively support this type of target tracking scaling strategy. The only options currently are to depend on CPU Based Scaling or scaling based on SQS metric called ApproximateNumberOfMessagesVisible.
This PR aims to add the necessary scaling strategy to QueueProcessingFargateService which will allow the service to scale based on the backlog per instance.
Note: ContainerInsights must be enabled on the cluster to publish the metric
RunningTaskCount
Description of changes
MathExpression
inTargetTrackingScalingPolicy
underaws-applicationauatoscaling
enableBacklogPerInstanceBasedScaling
andbacklogPerInstanceTargetValue
properties for enabling and defining the Backlog scalingconfigureAutoscalingForService
method to work with the above properties to enable the scaling strategy inQueueProcessingServiceBase
. Used Official documentation for scaling strategy implementationDescribe any new or updated permissions being added
N/A – no new permissions are introduced in this change.
Description of how you validated changes
packages/aws-cdk-lib/aws-applicationautoscaling/test/target-tracking.test.ts
packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts
packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-backlog-per-instance-scaling.ts
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license