
Answer-first summary for fast verification
Answer: Create a managed instance group with a health check on port 443.
**D is correct** because a managed instance group with a health check on port 443 is essential for monitoring the health of instances and automatically restarting those that are unhealthy. This setup ensures the infrastructure can scale horizontally based on traffic, providing reliability for the e-commerce website. **A is incorrect** because a startup script sending a heartbeat to the metadata server does not automatically heal an unhealthy instance. Custom monitoring solutions lack the automation and integration of managed instance groups with health checks. **B is incorrect** because while a multi-zone managed instance group enhances availability in case of zone failures, it does not directly address the need for horizontal scaling and automatic restarting of unhealthy instances. **C is incorrect** because adding a metadata label ‘health-check’ to the VM does not enable auto-healing. Metadata labels are for organization and categorization, not health monitoring. For more information, visit: [Google Cloud Documentation on Autohealing Instances in MIGs](https://cloud.google.com/compute/docs/instance-groups/autohealing-instances-in-migs)
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are developing an e-commerce website on Compute Engine that operates over HTTPS. The infrastructure must scale horizontally in response to traffic and automatically restart any unhealthy instances. Which approach is most suitable?
A
Add a startup script in the Instance Template that sends a heartbeat to the metadata server.
B
Create a multi-zone managed instance group instead of a single zone.
C
Add a metadata label ‘health-check’ to the VM.
D
Create a managed instance group with a health check on port 443.