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?
- Configure an autoscaling policy in the Managed Instance Group based on a custom Cloud Monitoring metric that measures queue depth.Answer
- Enable scale-in controls in the MIG autoscaling policy and set a stabilization period to slow down instance termination.Answer
- CGrant the primitive Owner role to the default Compute Engine service account to permit automatic metric creation and scaling operations.
- DProvision the Managed Instance Group using Spot Virtual Machines to prevent job interruptions during peak processing hours.
- ESubmit a Google Cloud resource quota increase request for regional vCPUs to automatically trigger MIG scaling when queue backlogs increase.
Answer
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.
Step-by-Step Solution
Key Concept
Compute Engine MIG Autoscaling Policies and Scale-In Controls