
Answer-first summary for fast verification
Answer: Create a Cloud Monitoring alerting policy to send an alert to webhook when Cloud Spanner CPU is over or under your threshold. Create a Cloud Function that listens to HTTP and resizes Spanner resources accordingly.
The correct answer is D. Option D leverages automation effectively by creating a Cloud Monitoring alerting policy that sends alerts to a webhook when Cloud Spanner CPU thresholds are crossed. A Cloud Function listening to these HTTP requests can then resize the Spanner resources automatically. This approach provides a dynamic and responsive solution that adjusts to traffic patterns in real-time. Option A is not suitable because a cron job with fixed time checks may fail to respond accurately to sudden changes in traffic. Options B and C also do not provide an automatic scaling mechanism.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
To manage the scalability of your application that utilizes Cloud Spanner as its backend database, especially given its predictable traffic patterns, you aim to ensure that the number of Spanner nodes adjusts automatically in response to changes in traffic. What approach should you take to achieve this auto-scaling functionality?
A
Create a cron job that runs on a scheduled basis to review Cloud Monitoring metrics, and then resize the Spanner instance accordingly.
B
Create a Cloud Monitoring alerting policy to send an alert to oncall SRE emails when Cloud Spanner CPU exceeds the threshold. SREs would scale resources up or down accordingly.
C
Create a Cloud Monitoring alerting policy to send an alert to Google Cloud Support email when Cloud Spanner CPU exceeds your threshold. Google support would scale resources up or down accordingly.
D
Create a Cloud Monitoring alerting policy to send an alert to webhook when Cloud Spanner CPU is over or under your threshold. Create a Cloud Function that listens to HTTP and resizes Spanner resources accordingly.
No comments yet.