Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

why to use managed instance groups

I could not clearly understand why would managed instance group create new instances when the CPU uses are higher, if the starter script is taking more resources for one instance then generating one more will not resolve the issue but will aggravate it , isn’t it? and VMs are not like multithreading where multiple threads together can finish the job early by parallelization . So can you give me a real life example where using a managed instance group can be applied.

2 Answers

The managed instance group (MIG) can autoscale to add VMs as necessary when the workload demands it. The resources required for a single instance are kept down by the use of load balancing. MIGs work with load balancing services to distribute traffic across all of the instances in the group. Use cases include website frontends (MIGs can work across regions as well), intensive image processing, or long-running batch computations (for a stateful example).

Manage Instance Groups – deploy copies of the same VM instance template and if set to autoscale will scale to the maximum quota set.  If someone misconfigured a start up script that consumed CPU resources.  Then yes, that would could cause a scaling event that would eventually trigger all available instances to be running.

However, misconfigurations aside, as Joseph mentioned MIGs work great when a small web server does one thing like serve web requests. Calculating the scaling metrics for number of request might be very difficult for new application.  Until you have that metric, scaling by CPU allows a path forward to keep user response high, while also keep cost lower by running fewer machines during slow periods.   It provides a way to AutoScale before defined metrics are known.

Hope that helps,

KK

Smita Kumari

This makes it very clear , Thanks !

Karlos Knox

my pleasure, Keep on learning GCP and KBA – Keep Being Awesome 🙂

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?