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?
- Increase the initial delay setting in the Managed Instance Group autohealing policy to 300 seconds.Answer
- BLower the autoscaling target CPU utilization metric to 10% to force instance creation earlier.
- CUpdate the instance template to deploy Spot VMs to shorten the initial instance provisioning duration.
- DGrant the primitive Owner role to the Compute Engine default service account to bypass health check port checks.
Answer
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.
Step-by-Step Solution
Key Concept
Compute Engine MIG Autohealing Initial Delay
Estimated Time:1m 15s