[ECS/Fargate] [Feature Request]: Standby for ECS Tasks
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
**Tell us about your request**
Add support for temporarily pausing requests from being sent from a Load Balancer to a running ECS Task. This would be similar to the "Standby" feature of an Autoscaling Group in EC2.
**Which service(s) is this request for?**
ECS & Fargate
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
I want to troubleshoot / do maintenance on running Tasks on ECS without affecting live traffic. The obvious way to stop requests to a task would be to deregister the container from the target group, but ECS will immediately register it again.
An example would be taking a heap dump of a misbehaving Java service with a multi-gigabyte heap. While the heap dump is being created the service can be unavailable for several minutes, which affects incoming requests. These failures will also quickly mark the Task as unhealthy and the container might be killed by ECS even before the heap dump completes.
**Are you currently working around this issue?**
Deregister the target from the target group, again and again, as ECS re-registers it. ECS will not kill the Task unless the target group reports it as unhealthy which means maintenance can be done as long as the target is deregistered each time before the healthcheck can mark it as unhealthy.
I made a script to help in these situations: [whack-a-target.py](https://gist.github.com/xose/9992fbe75c481d6832cbb561704c53df)
Contributor guide
Assessment
This issue has not been assessed yet.