Question

Difficulty: Very hardManaging Compute Engine Resources

An enterprise organization hosts a critical web service using Compute Engine Managed Instance Groups (MIGs) and runs background batch processing jobs. During high-traffic events, the MIG experiences severe instance thrashing (rapid scaling up and down), while the batch processing jobs fail frequently due to being deployed on Spot VMs despite being non-fault-tolerant stateful workloads. Which two actions should you take to resolve these operational issues following Google Cloud best practices? (Select TWO choices.)

  1. Configure an appropriate cool-down period in the MIG autoscaling policy to prevent additional scaling decisions while newly launched instances are still initializing.Answer
  2. B
    Set the MIG autoscaling policy to evaluate peak metrics instantly without a cool-down period to ensure immediate capacity availability.
  3. Migrate the non-fault-tolerant stateful batch processing workloads from Spot VMs to standard Compute Engine VM instances.Answer
  4. D
    Retain the batch processing workloads on Spot VMs while disabling preemption signals in the VM metadata configuration.
  5. E
    Grant the primitive Project Editor role to the management service account to bypass granular Compute Engine IAM policy permissions.

Answer

The correct actions are to configure an appropriate cool-down period in the MIG autoscaling policy and to migrate non-fault-tolerant stateful batch workloads from Spot VMs to standard Compute Engine VM instances.
Configuring an appropriate cool-down period in the MIG autoscaling policy ensures that the autoscaler waits for newly launched VMs to finish initialization before taking additional scaling actions, preventing thrashing. Furthermore, migrating non-fault-tolerant stateful workloads to standard Compute Engine instances prevents job failures caused by unpredictable Spot VM preemption.

Step-by-Step Solution

1
Analyze the cause of MIG instance thrashing during traffic spikes.
Identified that newly created instances require initialization time before absorbing load. Without a cool-down period, autoscaling metrics trigger redundant scale-out events.
Cool-down periods instruct the autoscaler to ignore metrics from unready or newly added instances until they stabilize.
2
Evaluate the workload requirements for the batch processing jobs currently running on Spot VMs.
Determined that non-fault-tolerant stateful jobs are unsuited for Spot VMs due to unpredictable preemption.
Spot VMs are designed specifically for fault-tolerant, stateless, or checkpointable batch jobs.
3
Select Google Cloud recommended operational practices.
Configure a cool-down period in the MIG policy and move stateful batch workloads to standard Compute Engine VM instances.
Resolves both instability in web server scaling and data/job loss in background batch processing.

Key Concept

Compute Engine Resource Management and Autoscaling Best Practices
Rate this question