Topic 2 Question 13
You have an application that uses Cloud Spanner as a backend database. The application has a very predictable traffic pattern. You want to automatically scale up or down the number of Spanner nodes depending on traffic. What should you do?
Create a cron job that runs on a scheduled basis to review stackdriver monitoring metrics, and then resize the Spanner instance accordingly.
Create a Stackdriver 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.
Create a Stackdriver 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.
Create a Stackdriver 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.
γ³γ‘γ³γ(12)
D seems to be the only decent option
π 11raksteer2020/07/13I was split between A and D for a moment, but after reviewing this, I think that it is D.
As to mexblood1's point, CPU utilization is a recommended proxy for traffic when it comes to Cloud Spanner. See: Alerts for high CPU utilization The following table specifies our recommendations for maximum CPU usage for both single-region and multi-region instances. These numbers are to ensure that your instance has enough compute capacity to continue to serve your traffic in the event of the loss of an entire zone (for single-region instances) or an entire region (for multi-region instances). - https://cloud.google.com/spanner/docs/cpu-utilization
In addition, answer A leaves out the details. How would you create a cron job? Using a VM? Cloud Scheduler? And how would you review metrics? What metrics, exactly?
I think the ambiguity in A, plus the fact that it uses an inefficient scheduled polling, verses a reactive and efficient serverless alert system, points to D being the best choice.
π 2[Removed]2020/09/09Answer is D. Reason because, it is require event driven based solution, Option A is not even driven and polling method where job will review metric and perform action. StackDriver will send webhook request to Cloud Function, which is more accurate.
π 2hiteshrup2020/09/10
γ·γ£γγγ«γ’γΌγ