-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Feature Request: Configurable minimumHealthyPercent and maximumHealthyPercent for ECS Service Hotswap #29618
Description
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:
| minimumHealthyPercent: 0, |
It could be modified to accept these parameters from the user's CDK stack configuration.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.117.0
Environment details (OS name and version, etc.)
Darwin Kernel Version 23.3.0