Question

Difficulty: MediumManaging Compute Engine Resources

A DevOps engineer manages an application deployed across a regional Managed Instance Group (MIG) on Compute Engine. The application process occasionally encounters application-level deadlocks where it stops responding to incoming HTTP traffic, even though the underlying virtual machine instance state remains RUNNING. The engineer needs to ensure that unresponsive instances are automatically detected and replaced without manual intervention. What should the engineer do?

  1. Create an HTTP health check and attach it as an autohealing policy to the Managed Instance Group.Answer
  2. B
    Configure an autoscaling policy on the Managed Instance Group using an HTTP Load Balancing utilization target.
  3. C
    Modify the instance template to use Spot VMs so Google Cloud automatically recreates instances upon application failure.
  4. D
    Install the legacy Cloud Monitoring agent on the VM instances to trigger automated VM restarts using system metrics.

Answer

Create an HTTP health check and attach it as an autohealing policy to the Managed Instance Group.
Attaching an HTTP health check to an autohealing policy on a Managed Instance Group allows Compute Engine to verify that the application layer is actively serving requests. If an instance experiences a deadlock and fails the health check probes, the autohealing policy instructs the group manager to recreate that specific instance.

Step-by-Step Solution

1
Identify the operational requirement
The requirement is to detect application-layer failure (deadlock) when the VM hardware status remains healthy, and automatically replace the failing instance.
Standard compute status checks only verify hypervisor and hardware health, not application responsiveness.
2
Evaluate Google Cloud Compute Engine features for automatic instance lifecycle management
Managed Instance Groups support autohealing policies based on separate application health checks.
An autohealing policy periodically probes the specified endpoint (e.g., HTTP port 80/443). If probes fail sequentially beyond the configured threshold, the MIG signals instance recreate.
3
Select the correct implementation step
Define an HTTP health check probing the application status endpoint, then run `gcloud compute instance-groups managed update` to set the `--health-check` flag.
This directly binds application-level health monitoring to the MIG lifecycle management.

Key Concept

Managed Instance Group (MIG) Autohealing Policies
Rate this question