Google Associate Cloud Engineer

Google Associate Cloud Engineer

Get started today

Ultimate access to all questions.


As a cloud engineer working on a client-facing application hosted on GCP, you're tasked with ensuring high availability. The application runs on Compute Engine instances across multiple zones. Your goal is to automatically recreate any instances that fail, specifically if they're unresponsive after two health check attempts, each lasting 8 seconds. What's the best approach to achieve this?




Explanation:

The optimal solution is Option C for several reasons:

  1. Managed Instance Groups (MIGs) offer comprehensive management capabilities, including automatic instance creation, termination, and health checks, making them perfectly suited for scenarios requiring high availability.

  2. Autohealing health check configured to HTTP, with a timeout of 8 seconds and 2 retries, ensures that instances are automatically recreated if they fail to respond to health checks twice consecutively.

Why not the other options?

  • Options A and B involve HTTP load balancers, which, while effective for traffic distribution, lack the capability to automatically recreate failed instances.
  • Option D focuses on autoscaling, which adjusts the number of instances based on demand rather than addressing the automatic recreation of failed instances.

By leveraging MIGs and configuring autohealing, you can significantly enhance the reliability and availability of your application in the face of instance failures.