1 Answer
- Newest
- Most votes
- Most comments
0
This depends on your setup
- If the ASG is using a MixedInstancePolicy, and you're changing the percent from 100% OnDemand to 100% spot (or any other changes), then yes, AutoScaling will proactively rebalance. You could avoid this by enabling scale-in protection on the instances, but they won't be able to be terminated for any graceful scale-in. So you'd need to manually manage cycling them out when they're idle
- If there's no MixedInstancePolicy, and you're just updating the launch template or launch config to use spot, then no change will immediately happen. The ASG will just use the new settings when launching new instances in the future
Make sure your application is setup in a way to handle spot. Spot capacity is best effort (by definition, its EC2s spare capacity). This means your instances might get terminated with 2 minutes of warning from spot reclaiming them, or you might have times when no spot capacity is available and you'd get launch failures. To reduce capacity issues, use as many instance types and AZs as possible.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago