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?
- Create an HTTP health check targeting port 80 and attach it as an autohealing policy to the Managed Instance Group.Cevap
- BConfigure an autoscaling policy based on high CPU utilization to scale out additional instances when traffic increases.
- CRecreate the instance template to use Spot VMs so Google Cloud automatically replaces instances when they become unresponsive.
- DGrant 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
Anahtar Kavram
MIG Autohealing Policies and Health Checks
Tahmini Süre:1m 30s