aws / aws/containers-roadmap

[ECS] [request]: Smarter capacity provider selection when multiple are present

Open
#1,718 0 comments 2 reactions 0 assignees View on GitHub
ECS Proposed
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**
Improve the cluster auto scaling algorithm when multiple capacity providers are specified. Specifically, allow CAS to bypass the regular capacity provider selection logic in order to pick the provider that's most appropriate for the tasks being provisioned.

**Which service(s) is this request for?**
ECS cluster auto scaling

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
Would like to be able to have multiple ASGs connected to a single ECS cluster. Each ASG is configured to have different size instances. Certain infrequent tasks have larger resource requirements and need to run on the ASG with larger instances. Most tasks can run on smaller instances. Currently the capacity provider is picked using weights irrespective of whether the task being provisioned could ever successfully run on it.

**Are you currently working around this issue?**
Currently just using a single larger ASG capacity provider. This results in spinning up larger instances than necessary, but that is sometimes mitigated by multiple tasks on the same instance.
Could also explicitly choose the capacity provider to use when provisioning a task, but that adds complication to the code which launches tasks.

**Additional context**
This is more relevant with a low task creation volume since higher volumes will tend to just pack more tasks onto an instance.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or implementation entry points are named. Start by locating ECS cluster auto scaling's capacity-provider selection logic and documenting how weights currently interact with task resource requirements; done should mean selecting a provider capable of running each task while preserving the existing multi-provider behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.