Google Cloud Associate Cloud Engineer — Question 50

You are running an application on multiple virtual machines within a managed instance group and have autoscaling enabled. The autoscaling policy is configured so that additional instances are added to the group if the CPU utilization of instances goes above 80%. VMs are added until the instance group reaches its maximum limit of five VMs or until CPU utilization of instances lowers to 80%. The initial delay for HTTP health checks against the instances is set to 30 seconds.
The virtual machine instances take around three minutes to become available for users. You observe that when the instance group autoscales, it adds more instances then necessary to support the levels of end-user traffic. You want to properly maintain instance group sizes when autoscaling. What should you do?

Answer options

Correct answer: D

Explanation

Increasing the initial delay of the HTTP health check to 200 seconds allows the newly added instances more time to become fully operational before they are considered healthy. This reduces the likelihood of unnecessary instances being added when the current instances are still initializing. The other options either limit the instance count too severely or do not address the timing issue with health checks.