Google Cloud Professional Cloud Database Engineer — Question 42
You are designing an augmented reality game for iOS and Android devices. You plan to use Cloud Spanner as the primary backend database for game state storage and player authentication. You want to track in-game rewards that players unlock at every stage of the game. During the testing phase, you discovered that costs are much higher than anticipated, but the query response times are within the SLA. You want to follow Google-recommended practices. You need the database to be performant and highly available while you keep costs low. What should you do?
Answer options
- A. Manually scale down the number of nodes after the peak period has passed.
- B. Use interleaving to co-locate parent and child rows.
- C. Use the Cloud Spanner query optimizer to determine the most efficient way to execute the SQL query.
- D. Use granular instance sizing in Cloud Spanner and Autoscaler.
Correct answer: D
Explanation
The correct answer is D because using granular instance sizing along with Autoscaler allows for dynamic adjustment of resources based on the workload, optimizing performance while keeping costs manageable. Option A is not ideal since manual adjustments can lead to resource inefficiencies. Option B may help with performance but does not address cost management, and option C, while beneficial for execution efficiency, does not directly relate to cost control.