Lower elbv2 target group draining timeout for ECS services
See original GitHub issueThe default registration delay timeout of elbv2 target group is 300s which is way too long for some simple web applications and user will wait at least 5min when they cdk deploy
to kickoff the service rolling update.
see discussion here https://twitter.com/pahudnet/status/1185232660081197056
Use Case
Users need lower draining timeout and faster ECS service rolling update experience.
Proposed Solution
Option 1
To provide a new optional drainingTimeout
property for all *LoadBalanced*Service
classes. If customer specify the new drainingTimeout
duration, CDK update the target group attribute accordingly. Otherwaise, it remains the default 300s
.
For example
const webSvc = new ecsPatterns.ApplicationLoadBalancedEc2Service(this, 'webSvc', {
cluster,
taskDefinition,
desiredCount: 3,
drainingTimeout: Duration.seconds(30),
})
Option 2
To provide new ECS patters for “fast API / web server with no long connections” without surfacing the implementation details.
Other
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:7 (5 by maintainers)
I understand that, but people in non-common situations can still adjust the timeout (and there should be a discoverable, convenient API for it via a
Duration
property!).We should be optimizing for the common case, that helps the most people.
Here’s the workaround for this issue: https://github.com/aws/aws-cdk/issues/4015#issuecomment-553007260