QuestionQ335

Ensuring solution and operations excellence

Refer to the TerramEarth case study for this question.

TerramEarth has a legacy web application that cannot be migrated to the cloud. However, you still want to create a cloud-native way to monitor the application. If the application becomes unavailable, you want the URL to point to a "Site is unavailable" page as quickly as possible. You also want the Ops team to receive a notification about the issue. You need to create a reliable solution at minimum cost. What should you do?

  • A Create a scheduled job in Cloud Run to invoke a container every minute. The container will check the application URL. If the application is down, switch the URL to the "Site is unavailable" page, and notify the Ops team.
  • B Create a cron job on a Compute Engine VM that runs every minute. The cron job invokes a Python program to check the application URL. If the application is down, switch the URL to the "Site is unavailable" page, and notify the Ops team.
  • C Create a Cloud Monitoring uptime check to validate the application URL. If it fails, put a message in a Pub/Sub queue that triggers a Cloud Function to switch the URL to the "Site is unavailable" page, and notify the Ops team.
  • D Use Cloud Error Reporting to check the application URL. If the application is down, switch the URL to the "Site is unavailable" page, and notify the Ops team.
Explanation

Cloud Monitoring uptime checks test the availability of an internet-accessible URL, and an alerting policy can notify through a Pub/Sub notification channel when the check fails. A Pub/Sub-triggered Cloud Function can perform the URL failover action and notify the Ops team. This uses managed, event-driven services without maintaining a VM or polling container. Cloud Error Reporting is for collecting and analyzing reported application errors, not for checking whether an external URL is reachable.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!