[ECS] [Enhancement]: Improve concurrency of EFS volume plugin
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
ECS uses a Docker volume plugin for handling mounting and unmounting of EFS volumes for ECS tasks. Currently the volume plugin [acquires a global lock](https://github.com/aws/amazon-ecs-agent/blob/3d608ab0709f1d7be280ee60ce385abf127d857f/ecs-init/volumes/ecs_volume_plugin.go#L105-L106) when processing any request which means that only one request can be processed at a time. If a volume operation is taking longer than usual then no new requests can be processed by the plugin which can result in new task starts timing out.
**Which service(s) is this request for?**
ECS
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
Tasks can fail to start due to volume plugin being stuck performing a volume operation for another task. This can happen due to a transient network issue causing EFS mount/unmount to take longer than usual, for example.
**Are you currently working around this issue?**
A user has to wait for task start to timeout and then start another new task.
**Additional context**
**Attachments**
Contributor guide
Research direction
Start with ecs-init/volumes/ecs_volume_plugin.go, especially the global lock referenced around lines 105-106, and trace how volume requests are processed. Define how concurrent mount and unmount requests should behave when one operation is slow. Done means a slow EFS volume operation no longer prevents independent requests from being processed and causing task starts to time out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, go
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100