Closed shuber closed 3 years ago
I'd suggest running two stacks, one spot and one non-spot. The issue with spot fleet is that (as of last time I looked) there wasn't a way to scale it based on need.
@lox I think that changed somewhat recently: https://aws.amazon.com/blogs/aws/new-auto-scaling-for-ec2-spot-fleets/
Oh I totally forgot about that, apologies. Happened whilst I was on holidays :)
In that case, I'm on it.
Ok, am starting to dev on this now. Of course the complexity is that each region has slightly different spot instances available.
+1
Can I help with anything?
+1. This would be great for us also, being able to choose several instance types around the same performance threshold will help us avoid spot price fluctuations.
Starting work on this in ##269
For anyone who wants to give this a shot manually (outside of Cloudformation): make a new Spot Fleet request, copy the config from Buildkite's ASG Launch Configuration, then hook the Spot Fleet into the same auto-scaling events. Turn off the ASG. Done.
Only wrinkle so far is that the number of agents per instance isn't aware of the number of vCPUs, as far as I know.
just checking in on this :)
Update: After being unable to utilize the steps above, I believe we have a temporary way to scale across multiple instance types using these following steps.
1) Create a Launch Template.
2) Update Launch Template to not use spot Instances
3) Update the Autoscaling Group
Launch Template
.With the multi-instance type functionality exposed through Launch Templates and Auto Scale groups allowing instance requests to span on-demand and spot, I don’t think there’s a need to integrate EC2 Fleets directly anymore 🥳
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet.html
We ran into issues today when the spot price for the instance type that we're using skyrocketed. We ended up just spinning up a separate stack with an alternative instance type in the meantime. It would be cool to be able to specify a few different instance types and let spot fleet handle issues like these.