Google Professional Cloud Database Engineer Question 16
Single answerGoogle Cloud PlatformYou are designing a database solution for a high-traffic e-commerce website that experiences unpredictable spikes in traffic during promotional events. The application requires low-latency reads and writes, and you anticipate that storage usage will grow significantly over time. Which configuration should you choose to meet the performance and scalability requirements?
- A
Use Cloud SQL with a fixed machine type and provisioned SSD storage.
- B
Use Firestore in Datastore mode with single-region deployment.
- C
Use Cloud Spanner with multi-region configuration and dynamically scaling compute nodes.
- D
Use Bigtable with a single-node cluster and HDD storage.
Show answer and explanation
Correct answer: C
Explanation
Cloud Spanner is specifically designed for globally distributed, high-traffic applications requiring strong consistency and horizontal scalability. Its ability to dynamically scale compute nodes ensures it can handle unpredictable traffic spikes, while its multi-region configuration guarantees low-latency reads and writes for global users. Other options lack the scalability, performance, or transactional guarantees needed for an e-commerce workload of this nature.
- A. Incorrect.
Cloud SQL with a fixed machine type and provisioned SSD storage may not handle unpredictable traffic spikes well, as it lacks the ability to scale dynamically based on demand. It is better suited for workloads with more predictable patterns.
- B. Incorrect.
Firestore in Datastore mode can handle high-traffic scenarios but may not provide the low-latency transactions or multi-region consistency required for an e-commerce website with global users.
- C. Correct.
Cloud Spanner with multi-region configuration and dynamically scaling compute nodes is ideal for this scenario. It provides low-latency reads and writes, high availability, and the ability to scale horizontally as storage and compute demands grow.
- D. Incorrect.
Bigtable with a single-node cluster and HDD storage is not suitable for unpredictable high-traffic scenarios. HDD storage performs poorly compared to SSD, and a single-node cluster lacks the scalability required for such a workload.