Manually rebalance a regional MIG

A regional managed instance group (MIG) is not balanced if the difference in the number of VMs between two zones is 2 or more VMs. A regional MIG can fall out of balance if you disable proactive instance redistribution and then delete or abandon instances to cause an uneven distribution across zones.

If your group is not balanced and you want to re-enable proactive instance distribution, you must first manually rebalance your group to achieve an even distribution of instances across zones.

Manually rebalance by deleting VMs or resizing the group

You can manually rebalance your group to achieve an even distribution of instances across zones by deleting VMs from zones with more instances or by resizing to add instances to zones with fewer VMs until the distribution is even.

When you resize a MIG that has proactive instance redistribution turned off, the group still opportunistically converges toward balance, treating each resize operation as an opportunity to balance the group:

  • When the group grows, the group always tries to add VMs to the zones with the smallest number of VMs.
  • When the group shrinks, the group always removes VMs from the zones with the largest number of VMs.
Example of manually resizing a group to achieve even redistribution

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月15日 UTC.