Overview of adding instances all at once in a MIG

This document describes the different methods that you can use to create all of the virtual machine (VM) instances that you require in a managed instance group (MIG) at the same time. By default, a MIG creates each instance individually. If you have specific workloads that requires all instances to be available before the job starts, then the individual instances creation can lead to partial provisioning. You can choose to create instances all at once so that the MIG creates the requested number of instances only when the resources become available. This approach also helps you avoid charges for partial capacity.

You can use one of the following capabilities in a MIG to add instances all at once:

  • Bulk mode: You set the MIG's target size and the MIG creates those instances all at once when the capacity becomes available. In the bulk mode, the MIG stays at zero instances until it is able to obtain the full capacity.

  • Resize requests: You create a resize request in a MIG by specifying the number of instances that you need. The MIG creates the requested instances all at once and increases the target size by the number of instances created. You can create more than one resize request in a MIG.

The following sections help you to determine which method is suitable for your workload to create your instances all at once.

To learn about other ways to add or remove instances in your MIG, see Add and remove VMs in a MIG.

Comparison of bulk mode and resize request

The following table outlines the differences between using bulk mode or creating a resize requests. In most cases, we recommend that you choose bulk mode, unless you need to manage multiple parallel requests to create instances all at once or resize a MIG that already contains instances.

Feature Bulk mode Resize request
Workloads Suitable for workloads that require a specific number of instances. Suitable for capacity pool orchestration that requires the ability to make multiple requests to create instances all at once.
Benefits
  • Ease of use
  • Terraform compatible
  • Observability at MIG level
Ability to make multiple independent requests to add instances to a MIG of any size.
All at once instance creation On MIG creation or when resizing an existing MIG from zero instances. Only in an existing MIG of any size.
Configuration Set the target size mode to BULK and then set the target size to the required number of instances. Create a resize request in which you specify the number of instances.
Concurrent requests Concurrent requests are not possible as you specify the number of instances by setting the target size. Concurrent requests are possible by creating different resize requests in a MIG.
Observability View the bulk operation details in the MIG details. View the details of a specific resize request or list all resize requests in a MIG.

What's next