Google Cloud Professional Cloud Database Engineer — Question 155
You are designing a new ecommerce application on Google Cloud. You expect high and bursty write volumes during peak sales periods. You need to configure Spanner to ensure consistent database performance during this sales period. What should you do?
Answer options
- A. Implement sharding to distribute the write load across multiple Spanner instances.
- B. Configure read-only transactions to improve read performance during peak periods.
- C. Use interleaved tables to reduce the number of cross-node transactions.
- D. Enable autoscaling in the Spanner instance, and set the maximum number of nodes to match the peak write volume.
Correct answer: D
Explanation
Enabling autoscaling in the Spanner instance allows the system to automatically adjust the number of nodes based on the current write volume, ensuring consistent performance during high-demand periods. The other options, while beneficial in certain contexts, do not directly address the need for scalability and performance during peak write times.