til icon indicating copy to clipboard operation
til copied to clipboard

Explain about Spot Instances/Spot VMs

Open xluffy opened this issue 1 year ago • 0 comments

Spot instances are sort of like cheap, same-day flights that become available due to last-minute cancellations or unsold inventory. Airlines often reduce prices significantly to fill these empty seats quickly, before the flight takes off.

In the case of compute instances, cloud providers offer unused on-demand computing resources at much lower prices compared to on-demand instances — up to 90% off — as a way to make use of their excess capacity.

You simply set a bid price for the Spot instance — the maximum you’re willing to pay per hour — and if the Spot price (the current price in the spot market) is below your bid price, the instance runs.

However, Spot instances can be reclaimed by the cloud provider with only a two-minute notice if the demand for regular-priced, on-demand instances increases, potentially interrupting your application.

Spot instances and flight tickets both present a chance to acquire something (computing power for the former, and flight tickets for the latter) at a reduced cost. However, there's a level of uncertainty and risk involved — Spot instances might be reclaimed if the market price rises above your bid, and last-minute flight tickets might vanish if someone else purchases them before you.

The two most common situations interruptions occur are when:

  • There's a surge in demand for on-demand or reserved instances
  • Spot prices rise above the bid (less likely now)

xluffy avatar Feb 19 '24 02:02 xluffy