Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
An organization runs a stateless API service on a Google Cloud Compute Engine Managed Instance Group (MIG). The application exhibits predictable daily traffic surges and requires approximately 4 minutes to warm up local caches and initialize runtime dependencies during scale-out events. During sudden load increases, end users observe increased latency because the active VMs become heavily saturated while newly provisioned instances are still starting up.
The MIG currently uses real-time CPU-based autoscaling with a target CPU utilization of 80% and a default initialization period of 60 seconds.
Which configuration change should the DevOps engineer implement to prevent latency degradation during peak traffic cycles while balancing infrastructure costs?
Predictive autoscaling is an advanced feature of Compute Engine autoscalers that leverages historical load patterns to forecast future capacity needs and proactively scale out VM instances ahead of anticipated traffic spikes. The initialization period (configured via coolDownPeriodSec or --cool-down-period) informs the autoscaler of the exact duration an application requires from VM creation until it is fully ready to serve live traffic without skewing metric collection.
coolDownPeriodSec: 240 ensures the autoscaler ignores incomplete initialization metrics and accurately accounts for VM readiness.Reactive autoscaling inherently lags behind traffic surges when applications take multiple minutes to boot. Combining predictive autoscaling with an accurate 240-second initialization period addresses the root cause of the latency spikes while avoiding excessive static capacity.
Compute Engine autoscalers can scale stateless MIGs based on Cloud Monitoring metrics, such as the number of unacknowledged messages in a Pub/Sub subscription (pubsub.googleapis.com/subscription/num_undelivered_messages), by defining a singleInstanceAssignment target.
The workload was an asynchronous worker fleet consuming tasks from a Google Cloud Pub/Sub subscription where queue depth determined processing demand.
A Stateful Managed Instance Group (Stateful MIG) is designed for workloads requiring persistent state, preserving unique instance identities, IP addresses, or persistent disks across VM restarts and recreations.
The workload was a stateful database or legacy clustering application where node identities and disk state had to be preserved during planned maintenance.
The target CPU utilization defines the average CPU threshold across instances that the autoscaler attempts to maintain, while the initialization period (coolDownPeriodSec) specifies how long the autoscaler should wait before including a new VM's metrics in scaling decisions.
coolDownPeriodSec to 30 seconds causes the autoscaler to evaluate new VMs before they finish their 4-minute cache warmup, resulting in unstable scaling decisions and thrashing.The workload used lightweight containerized instances that initialize in under 10 seconds and could safely operate at near-maximum CPU capacity without throughput degradation.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated