Google Professional Cloud Database Engineer Question 7
Single answerGoogle Cloud PlatformA retail company runs an e-commerce platform on a MySQL database hosted on a Compute Engine VM. The database currently handles 1,000 concurrent connections and processes 50,000 read requests and 10,000 write requests per second during peak hours. The company plans to expand its operations, expecting a 3x increase in traffic over the next year. They also want to improve availability by migrating to a managed database service. Which solution would best meet their current and future workload requirements?
- A
Migrate to Cloud SQL for MySQL with high availability and scale vertically by using the largest available machine type.
- B
Migrate to Cloud SQL for MySQL with read replicas and configure automatic storage scaling.
- C
Migrate to Firestore in Native Mode to handle scaling and availability requirements.
- D
Migrate to Cloud Spanner with multi-regional configuration to handle the scaling requirements and improve availability.
Show answer and explanation
Correct answer: D
Explanation
The e-commerce platform requires a relational database solution that can handle a 3x traffic increase, improve availability, and support both read and write scaling. Cloud Spanner is the most appropriate choice due to its horizontal scalability, multi-regional availability, and ability to handle high throughput for both reads and writes. Other options, such as Cloud SQL, are limited by their single-node write architecture, and Firestore is unsuitable for relational workloads.
- A. Incorrect.
Scaling Cloud SQL vertically has limits based on the largest machine type. With a 3x traffic increase, the single-node architecture of Cloud SQL might not handle the workload effectively.
- B. Incorrect.
Although read replicas in Cloud SQL can offload read traffic, the write traffic increase (3x) could overwhelm the primary instance, as Cloud SQL is still a single-node system for writes.
- C. Incorrect.
Firestore in Native Mode is optimized for NoSQL workloads, not relational database workloads such as those on MySQL. The company needs a relational database solution, making this option unsuitable.
- D. Correct.
Cloud Spanner is designed for horizontal scaling, high availability, and multi-regional configurations. It can easily handle the expected increase in both read and write traffic while offering strong consistency and relational database capabilities.