Spot bids
Pay as you go for preemptible instances.
Spot instances are preemptible instances from Foundry's unreserved capacity, allocated through a blind second-price auction.
You can often leverage spot compute to:
Decrease the cost of workloads that can tolerate delays or preemptions, such as batch jobs.
Horizontally scale capacity for less predictable workloads like live inference.
Run short, critical workloads when reserved capacity is unavailable.
Unlike traditional clouds, Foundry always maintains a pool of dedicated spot capacity in each region. This ensures you always have the ability to provision some amount of spot compute on short notice; however, Foundry always recommends making reservations for critical workloads whenever possible to maximize your price predictability and avoid the risk of preemption.
Creating a spot bid
You can request spot instances by creating a spot bid specifying an instance type, a region, a required quantity of instances, and a per-instance limit price.
After submitting your bid, it becomes an open bid. The spot auction evaluates all open bids every 2 minutes to determine allocation. Your bid will remain open until it is successful or you terminate it.
Whenever the current spot price for your requested instances is lower than your limit price and enough capacity is available, your bid is Allocated
, and your requested instances are provisioned. While your instances are provisioned, you are billed at the current spot price (which will be less than or equal to your limit price). Your instances remain provisioned until you cancel your bid or the spot price exceeds your limit price.
For additional details on how spot prices are set, read Spot auction mechanics.
Once you submit a spot bid, it cannot be altered. To change parts of your bid, such as the limit price, SSH keys, or storage, you must cancel your bid and submit a new one.
Accessing running spot instances
Connection details for your running spot instances can be found on the Instances tab.
SSH keys cannot be added after submitting a bid. Only the SSH keys selected when creating your bid can be used to access your instances.
Preemption
Preemption occurs when the spot price for your requested instances exceeds the limit price you set in your bid. When your bid is preempted, you will receive a 5-minute notice, and the status of your bid and its associated instances will change to Preempting
. After 5 minutes, your instances will be shut down, and the status of your bid will revert to Open bid
. Your bid will automatically be allocated again when the market adjusts such that your bid is successful. To prevent your bid from being
When your bid is preempted, your instances are shut down, but the boot disks for your instances are preserved until you terminate your bid. This allows you to implement logic to automatically restart your workload should your bid be allocated again in the future. This guide provides an overview of implementing a systemd
service to run scripts on subsequent startups after preemption or relocation.
FAQs & troubleshooting
To learn the nuances of the Foundry spot auction, read Spot auction mechanics.
Last updated