Soru

Zorluk: OrtaManaging Compute Engine Resources

A site reliability engineer is managing an existing Compute Engine Managed Instance Group (MIG) hosting a microservice. The application startup script requires approximately 4 minutes to download dependencies and launch the server on port 8080. After configuring an autohealing health check, newly provisioned instances are continuously marked unhealthy and recreated in a continuous cycle before completing initialization. Which configuration change should the engineer make to resolve this issue?

  1. Increase the initial delay setting in the Managed Instance Group autohealing policy to 300 seconds.Cevap
  2. B
    Lower the autoscaling target CPU utilization metric to 10% to force instance creation earlier.
  3. C
    Update the instance template to deploy Spot VMs to shorten the initial instance provisioning duration.
  4. D
    Grant the primitive Owner role to the Compute Engine default service account to bypass health check port checks.

Cevap

Configure the initial delay setting in the Managed Instance Group autohealing policy to 300 seconds to allow application initialization before health checking begins.
Configuring an initial delay in the Managed Instance Group autohealing policy defers health check evaluation until the specified period elapses. Because the startup script takes approximately 4 minutes (240 seconds), setting an initial delay of 300 seconds ensures the application on port 8080 is fully running before probes assess health.

Adım Adım Çözüm

1
Identify the cause of the continuous instance recreation cycle.
The autohealing health check evaluates the VM on port 8080 before the 4-minute startup script completes, marking the instance unhealthy and triggering a restart.
By default, health checking begins immediately or before the application service becomes responsive if the initial delay is insufficient.
2
Determine the proper Google Cloud Compute Engine MIG configuration parameter.
The initial delay (cool-down period for autohealing) specifies how long the MIG waits after VM creation before evaluating health check status.
Setting the initial delay to 300 seconds gives the 4-minute startup process sufficient buffer time to complete cleanly.

Anahtar Kavram

Compute Engine MIG Autohealing Initial Delay
Tahmini Süre:1m 15s
Bu soruyu puanla