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
A DevOps engineering team operates a data ingestion service running on a Compute Engine regional Managed Instance Group (MIG). The worker instances process tasks pulled from a Cloud Pub/Sub subscription.
During high-volume periods, incoming message traffic fluctuates rapidly with intermittent 2-to-3-minute lulls between bursts. The team observes the following issues:
Which autoscaler configuration should the team implement to resolve these issues?
Increase the autoscaler cool-down period to 30 minutes to suppress metric collection while instances are running.
Configure scale-in controls with a stabilization period and set max scaled-in replicas to restrict the rate of instance removal.
Set the autoscaling mode to 'Only scale out' and configure a Cloud Scheduler job to issue periodic scale-in API requests.
Enable predictive autoscaling in 'Optimize for availability' mode and switch the target metric from Cloud Pub/Sub queue depth to CPU utilization.
Increase the autoscaler cool-down period to 30 minutes to suppress metric collection while instances are running.
Configure scale-in controls with a stabilization period and set max scaled-in replicas to restrict the rate of instance removal.
Scale-in controls in Compute Engine Managed Instance Groups (MIGs) allow administrators to regulate the pace at which the autoscaler removes VM instances. By defining a stabilization period (a lookback window up to several hours) and a max scaled-in replicas constraint (either a fixed number or percentage), the autoscaler prevents rapid, abrupt reductions in capacity during transient drops in load.
maxScaledInReplicas restricts the rate of instance deletions per time unit, providing a gradual scaling curve that gives running instances adequate time to finish inflight messages and drain workloads cleanly.Scale-in controls are purpose-built in Google Cloud to handle bursty workloads where short-term metric drops would otherwise trigger premature scale-in events, directly eliminating VM thrashing while protecting in-progress tasks.
Set the autoscaling mode to 'Only scale out' and configure a Cloud Scheduler job to issue periodic scale-in API requests.
Enable predictive autoscaling in 'Optimize for availability' mode and switch the target metric from Cloud Pub/Sub queue depth to CPU utilization.