Soru

Zorluk: OrtaManaging Compute Engine Resources

A cloud administrator is managing an internal web service hosted on a Compute Engine Managed Instance Group (MIG). During temporary traffic spikes, the application suffers performance degradation because the MIG's autoscaler scales out too late and immediately scales in as soon as CPU load drops briefly, resulting in rapid instance thrashing. Upon reviewing the configuration, the administrator observes that target CPU utilization is set to 95%95\% with a scale-in stabilization period of 00 seconds. Which configuration change to the autoscaling policy should the administrator make to stabilize the instance group in accordance with Google-recommended best practices?

  1. Lower the target CPU utilization threshold to a moderate level such as 60%60\%-70%70\% and configure a non-zero scale-in stabilization period.Cevap
  2. B
    Set the target CPU utilization to 100%100\% and reduce the minimum instance count to 00 to allow maximum scaling range.
  3. C
    Migrate the Managed Instance Group template to use Spot VMs so Compute Engine automatically manages capacity spikes without triggering autoscaler metrics.
  4. D
    Grant the project Owner primitive IAM role to the Compute Engine service account to remove API throttling limits during scaling operations.

Cevap

Lower the target CPU utilization threshold to a moderate level such as 60%-70% and configure a non-zero scale-in stabilization period.
The correct action is to lower the target CPU utilization threshold and establish a non-zero scale-in stabilization period. Google Cloud recommends keeping CPU utilization targets moderate (e.g., 60%-80%) so that existing instances can handle load increases while new instances boot up. Adding a scale-in stabilization period ensures the autoscaler evaluates sustained metrics rather than reacting immediately to short-term dips in load, thereby preventing instance thrashing.

Adım Adım Çözüm

1
Analyze the autoscaling symptoms
Identified instance thrashing and delayed scale-out response due to aggressive metric targets (95% CPU threshold and 0-second stabilization).
An overly high target CPU utilization threshold leaves insufficient capacity buffer for traffic bursts, while a 0-second scale-in stabilization period immediately terminates instances when CPU drops briefly.
2
Apply Google Cloud MIG autoscaling best practices
Adjust target CPU utilization to 60%-70% and set a stabilization period (e.g., 300 seconds).
Lowering the target ensures the MIG triggers scale-out early enough to absorb incoming demand. The scale-in stabilization period forces the autoscaler to evaluate historic load over a window before scaling down, eliminating thrashing.

Anahtar Kavram

Managed Instance Group (MIG) Autoscaling Metrics & Stabilization
Bu soruyu puanla