Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoSpotting should prefer to terminate on-demand instance from the AZ with the most on-demand instances running #412

Open
gabegorelick opened this issue Jan 31, 2020 · 1 comment

Comments

@gabegorelick
Copy link
Contributor

Github issue

Issue type

  • Feature Idea

Summary

AutoSpotting can maintain a minimum number or percentage of on-demand instances per autoscaling group. But there's no way to force a minimum number of on-demand instances per Availability Zone. This means that all your on-demand instances could end up in the same AZ (please correct me if I'm wrong). It seems safer to distribute these instances evenly across the available AZs.

Looking at the code, getAnyUnprotectedOnDemandInstance() selects the first on-demand instance that's not protected, without taking into account how many instances would remain in the AZ. It seems like that function could be amended to select an on-demand instance from the AZ with the most on-demand instances running.

Steps to reproduce

I haven't been able to reproduce this, but that could just be because I've been lucky.

@cristim
Copy link
Member

cristim commented Feb 1, 2020

Great suggestion, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants