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.)
- Configure an appropriate cool-down period in the MIG autoscaling policy to prevent additional scaling decisions while newly launched instances are still initializing.Answer
- BSet the MIG autoscaling policy to evaluate peak metrics instantly without a cool-down period to ensure immediate capacity availability.
- Migrate the non-fault-tolerant stateful batch processing workloads from Spot VMs to standard Compute Engine VM instances.Answer
- DRetain the batch processing workloads on Spot VMs while disabling preemption signals in the VM metadata configuration.
- EGrant 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
Key Concept
Compute Engine Resource Management and Autoscaling Best Practices