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.

How do I know what limit price to set so that my bid is allocated immediately?

The Price Chart page displays the most recent spot prices for all instance types. These spot prices are determined by the highest losing spot bid, meaning that you may need to bid well above this price for your bid to be instantly successful.

In the case that you need to provision compute immediately and reserved compute is unavailable, Foundry recommends setting the limit price for your bid at your next best alternative for on-demand compute (this could be the AWS or GCP on-demand price, for example). This ensures that your bid will be allocated unless the spot price exceeds these alternatives for on-demand compute (which has never occured).

Foundry never displays the lowest winning price to ensure a fair auction and to encourage setting truthful limit prices.

Does Foundry always have spot capacity available?

Yes. Unlike traditional clouds, Foundry always maintains dedicated spot capacity in every region. This ensures that you can always spin up some amount of spot compute on short notice.

My limit price is higher than the current spot price for the instance type I requested, but my bid still isn't allocated.

This typically occurs when your bid requests multiple instances, and after allocating all bids with higher limit prices, fewer instances remain than the quantity your bid is requesting.

For example, if after allocating all bids with a higher limit price, three instances remain, and your bid requests four instances, Foundry will be unable to allocate your bid and will move to allocate the next-highest bid requesting three instances or fewer. In this scenario, the spot price would be set below your bid's limit price, but your bid would not be allocated.

Last updated