Feature Request: Configurable minimumHealthyPercent and maximumHealthyPercent for ECS Service Hotswap #29618
Labels
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
Currently, when using the --hotswap flag for deploying ECS services, the minimumHealthyPercent is hardcoded to 0, which can be disruptive for services with interdependencies. This can result in downtime as the current tasks are stopped before the new ones are fully up and running. To improve the flexibility of hotswap deployments, allowing users to set the minimumHealthyPercent and maximumHealthyPercent parameters would be beneficial.
Use Case
We aim to speed up deployment times in our development environment by using the hotswap feature. However, our services have dependencies on each other, and the current hotswap behavior is too disruptive. We want to keep the current tasks running until the new ones are fully operational. Configuring minimumHealthyPercent and maximumHealthyPercent would give us the control needed to ensure smoother transitions during deployments.
Proposed Solution
Modify the ECS service hotswap implementation to accept minimumHealthyPercent and maximumHealthyPercent as configurable parameters, with default values of 0 and 200, respectively. These parameters should be exposed in the CDK, allowing users to override them as needed.
For example, the current implementation at:
aws-cdk/packages/aws-cdk/lib/api/hotswap/ecs-services.ts
Line 108 in 0fee99b
It could be modified to accept these parameters from the user's CDK stack configuration.
Other Information
No response
Acknowledgements
CDK version used
2.117.0
Environment details (OS name and version, etc.)
Darwin Kernel Version 23.3.0
The text was updated successfully, but these errors were encountered: