Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Conversation

@cbankston
Copy link
Contributor

DesiredCapacity does not correctly represent the current state of an ECS cluster, so I've replaced it with the clusters activeInstanceCount.

Some problems with DesiredCapacity are:

  1. It includes instances that are in the Draining state, causing the ASG to appear bigger than it actually is.
  2. When DesiredCapacity is updated it takes time to fulfil the request, causing the script to misunderstand the number of instances currently powering the ECS cluster.

DesiredCapacity does not correctly represent the current state of an ECS
cluster, so I've replaced it with the clusters activeInstanceCount.

Some problems with DesiredCapacity are:
1) It includes instances that are in the Draining state, causing the
ASG to appear bigger than it actually is.
2) When DesiredCapacity is updated it takes time to fulfil the request,
causing the script to misunderstand the number of instances currently
powering the ECS cluster.
@cbankston
Copy link
Contributor Author

This should resolve some of the edge cases that could have caused #6 , however, there may be additional edge cases that could cause an issue.

For example, I am not sure how a clusters reservation metrics are affected when an instance is in the draining state, still running tasks, and the tasks have not yet been started on other hosts.

@cbankston
Copy link
Contributor Author

I'll have to improve this after #7 is merged because of the new code that would be added.

@oytuntez
Copy link

oytuntez commented Dec 2, 2018

Hey! Do you need any assistance to merge PR #6 and #7? I think we will simply take the code changes and apply them in our Lambda function. We are also using a smaller cluster.

@cbankston
Copy link
Contributor Author

cbankston commented Dec 3, 2018

@oytuntez I've merged everything into the fork that my job is using if you want to see the full changes:
https://github.com/id90t/ecscale

@oytuntez
Copy link

oytuntez commented Dec 3, 2018

Thanks @cbankston! I also did the same over the weekend... :)
https://github.com/oytuntez/ecscale

I have a couple more updates on the script, but I couldn't commit them yet.

@omerxx omerxx merged commit 54c18c2 into omerxx:master Jan 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants