Skip to content
BENIBIX Learn

Spot Instance

Infrastructure☁️ Virtualization & CloudCloud Cost Management

Also known as Spot Instances, Spot VM, Preemptible VM, Azure Spot Virtual Machine

A spare cloud server sold very cheap. The cloud can take it back at short notice.

Think of it like

Think of it like a cheap seat at a show. You must give it up if someone who paid full price comes.

Example

AWS says spot can cost up to 90% less, and it warns two minutes before taking a server back. Azure warns 30 seconds ahead. Lucy saves each video frame as it is done, so a lost server costs her one frame.

Why it matters

It is the cheapest way to rent a lot of computing. Work that can be cut short gets done for a small part of the price.

Definition

A spot instance is a spare cloud server rented at a deep discount. Clouds sell their unused machines this way. When the cloud needs a machine back, it takes it after a short warning. Some clouds warn two minutes ahead, and some only seconds. So spot servers suit work that can stop and start again. Batch jobs, tests and video renders are good fits.

Example code

console
$ curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/spot/instance-action
{"action": "terminate", "time": "2026-11-18T08:22:00Z"}
On AWS, a spot server can ask if it is about to be taken back. This answer gives the time it will be shut down.
Spot asks for no promise at all. The price of the deepest discount is that the server can go.

Common mistake

Running a database or a checkout page on spot servers. When the server is taken back, the work stops and data can be lost.

Key takeaways

  1. 1
    Spare machines. Unused machines, sold cheap.
  2. 2
    Can vanish. Taken back after a short warning.
  3. 3
    Built to stop. Only for work that can restart.

Compare

Learn it properly