Soru

Zorluk: OrtaManaging Compute Engine Resources

An administrator manages a stateless web service deployed on a Compute Engine Managed Instance Group (MIG). Users report that individual instances occasionally stop responding to HTTP requests on port 80, even though the VM status in the Google Cloud Console remains RUNNING. The administrator needs to ensure that any instance failing to serve web traffic is automatically recreated by the group without manual intervention. Which action should the administrator take?

  1. Create an HTTP health check targeting port 80 and attach it as an autohealing policy to the Managed Instance Group.Cevap
  2. B
    Configure an autoscaling policy based on high CPU utilization to scale out additional instances when traffic increases.
  3. C
    Recreate the instance template to use Spot VMs so Google Cloud automatically replaces instances when they become unresponsive.
  4. D
    Grant the primitive Owner role to the Compute Engine default service account so it has permission to restart failed instances.

Cevap

Create an HTTP health check targeting port 80 and attach it as an autohealing policy to the Managed Instance Group.
Attaching an HTTP health check to a Managed Instance Group via an autohealing policy actively probes the application layer on port 80. If the application stops responding, the health check marks the instance as UNHEALTHY, prompting the Managed Instance Group to automatically recreate the VM instance to restore normal operations.

Adım Adım Çözüm

1
Identify the failure domain.
The application service on port 80 is unresponsive, but the underlying VM host hypervisor considers the VM state RUNNING.
Host-level metrics cannot detect application-level crashes or hung web server threads.
2
Select the appropriate Compute Engine feature for application monitoring.
Managed Instance Groups support autohealing policies based on Google Cloud health checks.
An HTTP health check actively probes port 80 to verify that the application endpoint is responding properly.
3
Apply the autohealing policy to the MIG.
If an instance fails consecutive health probes beyond the configured threshold, the MIG signals the instance as UNHEALTHY and automatically recreates it.
This automates self-healing of application instances without manual administrative intervention.

Anahtar Kavram

MIG Autohealing Policies and Health Checks
Tahmini Süre:1m 30s
Bu soruyu puanla