Soru

Zorluk: OrtaManaging Compute Engine Resources

An organization runs an internal financial analytics service on Google Compute Engine. During peak reporting hours, incoming queue requests cause processing backlogs that are not effectively captured by CPU utilization metrics alone. Additionally, during sudden lulls in incoming traffic, the Managed Instance Group (MIG) rapidly reduces instance count, causing active analytics tasks to fail before completing. The cloud engineer must configure the MIG to scale dynamically based on task backlog while ensuring running jobs finish cleanly during scale-down events. Which TWO actions should the engineer take to achieve this objective?

  1. Configure an autoscaling policy in the Managed Instance Group based on a custom Cloud Monitoring metric that measures queue depth.Cevap
  2. Enable scale-in controls in the MIG autoscaling policy and set a stabilization period to slow down instance termination.Cevap
  3. C
    Grant the primitive Owner role to the default Compute Engine service account to permit automatic metric creation and scaling operations.
  4. D
    Provision the Managed Instance Group using Spot Virtual Machines to prevent job interruptions during peak processing hours.
  5. E
    Submit a Google Cloud resource quota increase request for regional vCPUs to automatically trigger MIG scaling when queue backlogs increase.

Cevap

The cloud engineer should configure an autoscaling policy based on a custom Cloud Monitoring metric measuring queue depth and enable scale-in controls with a stabilization period to delay instance reduction.
Configuring a custom Cloud Monitoring metric enables the Managed Instance Group to scale out according to application queue depth rather than generic infrastructure metrics. Implementing scale-in controls with a stabilization period holds instance removal for a specified time window, preventing sudden instance termination while long-running analytics tasks complete.

Adım Adım Çözüm

1
Define and collect custom queue depth telemetry in Cloud Monitoring.
Queue depth metrics become available to the Compute Engine autoscaler.
Standard CPU or network metrics do not reflect application-layer queue backlogs accurately.
2
Configure the Managed Instance Group autoscaling policy to target the custom metric.
The MIG scales out when task queue depth exceeds target thresholds.
Scaling based on application queue length ensures capacity aligns directly with workload volume.
3
Configure scale-in controls with a stabilization period within the MIG autoscaling policy.
The autoscaler calculates recommended capacity over the stabilization window before terminating instances.
Stabilization periods prevent aggressive scale-in during short traffic dips, giving running analytics jobs sufficient time to complete.

Anahtar Kavram

Compute Engine MIG Autoscaling Policies and Scale-In Controls
Bu soruyu puanla