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

Documentation clarification: what happens if no spot instances are available? #1296

Open
JacobEvelyn opened this issue Feb 28, 2024 · 2 comments

Comments

@JacobEvelyn
Copy link

Describe the bug
In this documentation, I see this under OnDemandPercentage:

Default is 100% OnDemand - reduce this to use some Spot Instances when they're available and cheaper than the OnDemand price.

This implies that if no spot instances are available, we'll fall back to on-demand—even with OnDemandPercentage configured to 0.

However, I also see this issue, which says that if no spot instances are available it will continue trying indefinitely. However, that issue is several years old and I'm not sure if it's still accurate.

Which is correct?

Expected behavior
Clearer documentation about what happens when no spot instances are available and the OnDemandPercentage has already been met (or is 0).

To be clear, my desired behavior is that it falls back to on-demand and doesn't continue trying spot indefinitely.

@moskyb
Copy link
Contributor

moskyb commented Mar 6, 2024

g'day @JacobEvelyn! hopefully i can try to clear this up a little:

first off, at time of writing the elastic stack will never fall back from spot to ondemand - this is a tricky thing to do in EC2, as AWS really doesn't want to cause capacity crunches. it is technically feasible to do it, but it would require a lot of custom scaling logic.

to clarify the docs a little, the way this setting works is that the percentage of spot instances is best-effort - ie, dependent on pricing/availability etc - and the percentage of ondemand instances is guaranteed.

as an example, if i had an elastic stack with a desired count of 10 and an OnDemandPercentage of 70, if there are spot instances available, i'll have 7 on-demand instances and 3 spot instances in the elastic stack ASG. If no spot instances are available, we'll just have the 7 on-demand instances and no spot instances.

i hope this answers your question - let me know if you have any followups.

@JacobEvelyn
Copy link
Author

Thanks @moskyb! If there's a way to clarify that in the docs that would be helpful.

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