Question

Difficulty: MediumManaging Compute Engine Resources

A cloud administrator manages a stateless batch data processing application running on Compute Engine virtual machines. The workload is fault-tolerant and can easily tolerate intermittent node terminations. To minimize compute costs, the administrator plans to transition the workload to Spot VMs. Which approach recommended by Google Cloud best practices should the administrator implement to ensure terminated instances are automatically recreated while maintaining the desired pool capacity?

  1. Define an Instance Template that specifies Spot VMs, and deploy the workload inside a Managed Instance Group (MIG) configured to maintain the target number of instances.Answer
  2. B
    Deploy the application onto standalone Spot VMs with hourly Persistent Disk snapshots to recover instance state after preemption.
  3. C
    Grant the project-level Owner primitive role to the VM service account so it can automatically submit quota increase requests when Spot instances are reclaimed.
  4. D
    Configure an autoscaling policy based on custom CPU utilization metrics set to scale up instances immediately prior to the Spot VM termination limit.

Answer

Define an Instance Template that specifies Spot VMs, and deploy the workload inside a Managed Instance Group (MIG) configured to maintain the target number of instances.
Deploying Spot VMs within a Managed Instance Group (MIG) using a defined Instance Template is the Google-recommended approach. The MIG automatically detects when Spot instances are reclaimed by Google Cloud and provisions replacement instances to sustain the target capacity.

Step-by-Step Solution

1
Analyze workload characteristics
The application is stateless, fault-tolerant, and well-suited for cost-effective Spot VMs.
Spot VMs provide significant cost savings for workloads capable of handling sudden instance interruptions.
2
Select the appropriate Compute Engine resource management model
Use an Instance Template configured with the Spot VM provisioning model within a Managed Instance Group (MIG).
MIGs actively monitor instance health and availability, automatically provisioning replacement instances whenever Spot VMs are preempted to maintain desired cluster capacity.

Key Concept

Managing Spot VMs using Managed Instance Groups (MIGs)
Estimated Time:1m 30s
Rate this question