This repository was archived by the owner on Jul 3, 2023. It is now read-only.
[WIP] [roll-ami] drain old instances before terminating:#104
Merged
achille-roussel merged 4 commits intomasterfrom Mar 29, 2017
Merged
[WIP] [roll-ami] drain old instances before terminating:#104achille-roussel merged 4 commits intomasterfrom
achille-roussel merged 4 commits intomasterfrom
Conversation
- Put old instances in DRAINING state before terminating them, allowing ECS to drain connections and move tasks.
achille-roussel
approved these changes
Mar 9, 2017
Contributor
achille-roussel
left a comment
There was a problem hiding this comment.
I was dreaming this day would come, nice addition!
|
|
||
| draining_instances = copy.copy(old_instances) | ||
| while draining_instances: | ||
| time.sleep(1) |
Contributor
There was a problem hiding this comment.
Should we wait a little longer (like 5s) to avoid hammering the ECS API, AWS has ridiculously low rate limits on a lot of their endpoints.
- Poll ECS Container Instance state every 5 seconds instead of 1 second
Contributor
|
This is working like a charm! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
allowing ECS to drain connections and move tasks.