Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
An SRE team manages a mission-critical, multi-region application deployed across Google Cloud. During sudden traffic surges, horizontal autoscaling operations intermittently fail when Compute Engine regional CPU allocation quotas are depleted, resulting in ResourceExhausted (HTTP 429 / gRPC 8) errors and degraded service availability.
The team requires an automated, proactive capacity management solution that meets these requirements:
Which solution should the team implement?
Create a Log-Based Alert in Cloud Logging matching ResourceExhausted error entries in Compute Engine audit logs, and trigger a Cloud Workflow to retry failed instance provisioning using exponential backoff within the exhausted region.
Configure a Cloud Monitoring alerting policy using Metric Query Language (MQL) that joins serviceruntime.googleapis.com/quota/allocation/usage and serviceruntime.googleapis.com/quota/limit, calculates the utilization ratio using div, alerts when utilization exceeds 0.85, and routes notifications to Pub/Sub to trigger an automated remediation Cloud Function.
Build a Cloud Monitoring threshold alert evaluating serviceruntime.googleapis.com/quota/rate/net_usage directly against a static threshold value of 85, and use Cloud Tasks to asynchronously dispatch regional traffic redistribution requests.
Deploy a Prometheus collector to scrape the Compute Engine instance metadata server for quota metrics, compute regional saturation via PromQL, and execute gcloud compute project-info set-usage-export to dynamically scale regional quota ceilings.
Create a Log-Based Alert in Cloud Logging matching ResourceExhausted error entries in Compute Engine audit logs, and trigger a Cloud Workflow to retry failed instance provisioning using exponential backoff within the exhausted region.
Configure a Cloud Monitoring alerting policy using Metric Query Language (MQL) that joins serviceruntime.googleapis.com/quota/allocation/usage and serviceruntime.googleapis.com/quota/limit, calculates the utilization ratio using div, alerts when utilization exceeds 0.85, and routes notifications to Pub/Sub to trigger an automated remediation Cloud Function.
This solution implements proactive quota monitoring and automated capacity mitigation by combining Cloud Monitoring Metric Query Language (MQL) with Google Cloud Pub/Sub and automated serverless workflows. MQL provides advanced querying capabilities that allow multiple time series—such as dynamic usage and dynamic quota limits—to be combined and evaluated mathematically.
consumer_quota resource. MQL fetches both serviceruntime.googleapis.com/quota/allocation/usage and serviceruntime.googleapis.com/quota/limit, aligns them across identical resource dimensions (such as quota_metric, region, and project_id), joins the streams, and uses the div operator to compute the exact utilization ratio in real time.condition val() > 0.85 triggers an incident as soon as consumption reaches 85% of the current limit, well before total exhaustion.ResourceExhausted errors affect production traffic.Monitoring quota utilization as a calculated ratio (usage / limit) is the recommended Site Reliability Engineering practice in Google Cloud. It provides complete observability into capacity constraints without requiring static threshold updates when regional limits are adjusted.
Build a Cloud Monitoring threshold alert evaluating serviceruntime.googleapis.com/quota/rate/net_usage directly against a static threshold value of 85, and use Cloud Tasks to asynchronously dispatch regional traffic redistribution requests.
Deploy a Prometheus collector to scrape the Compute Engine instance metadata server for quota metrics, compute regional saturation via PromQL, and execute gcloud compute project-info set-usage-export to dynamically scale regional quota ceilings.