Preemptive VMs and Custom VMs

Introduction to short-lived VMs.

In the last lesson, we have seen multiple compute services. We have not seen any practical implementation but reading about the services will give you a brief idea about them. This will help you while doing the labs in the upcoming sections.

Preemptive VM

Earlier, in the Compute engine section, we talked about short-lived VMs for bulk processing. Preemptive VMs are also known as short-lived VMs. Because these VMs live for only 24 hours and then these are destroyed.

When you want to process a heavy task that needs some extra computing power for a short period of time, a short-lived VM is the best choice. If the job takes more than 24 hours, you need to store the state of your job in some persistent disk to resume it using another preemptive VM after 24 hours.

The preemptive instance or VM costs 80% less than the regular VMs and also provides flat rates.

The use-case of Preemptive VMs is heavy batch processing jobs. Refer to this real world casestudy.

Creating a preemptive VM is the same as creating a regular virtual machine. We just need to set the yes/no flag for Preemptibility while creating a machine.

Get hands-on with 1400+ tech skills courses.