Google Professional Cloud Database Engineer Question 90
Select 3Google Cloud PlatformYou are designing a database solution in Google Cloud for a new e-commerce application that will experience unpredictable traffic spikes. You want to optimize for cost while maintaining scalability and high availability. After evaluating the options, which considerations should guide your choice of the database service?
- A
Choose Cloud SQL with an instance size that matches average traffic to minimize costs during low usage.
- B
Use Firestore in Native mode to benefit from serverless scaling and pay-per-use cost model.
- C
Deploy self-managed MySQL on Compute Engine to have full control over resource allocation and cost.
- D
Select Cloud Spanner for global availability and horizontal scaling, despite higher base costs.
- E
Use Bigtable if the workload involves high-throughput, low-latency requirements with unpredictable traffic.
Show answer and explanation
Correct answers: B, D, E
Explanation
When analyzing the cost of running database solutions in Google Cloud, it's important to balance cost efficiency with scalability and high availability. Firestore in Native mode offers serverless scaling and a pay-per-use model, making it ideal for unpredictable traffic. Cloud Spanner is a good choice for applications requiring global availability and horizontal scaling, although it has a higher base cost. Bigtable is highly efficient for high-throughput, low-latency workloads with unpredictable traffic. Self-managed solutions like MySQL on Compute Engine or pre-sized Cloud SQL instances may reduce cost in some cases but lack the scalability needed for dynamic traffic patterns.
- A. Incorrect.
Choosing Cloud SQL with an instance size matching average traffic might save costs during low usage but does not account for unpredictable traffic spikes. This could lead to performance bottlenecks or manual scaling requirements.
- B. Correct.
Firestore in Native mode is a serverless database solution that automatically scales with demand, making it cost-efficient for unpredictable traffic and ensuring high availability.
- C. Incorrect.
Self-managing MySQL on Compute Engine offers full control but requires significant operational effort, especially to handle unpredictable traffic spikes. This option lacks the inherent scalability of managed services.
- D. Correct.
Cloud Spanner provides global availability and horizontal scaling, which is ideal for unpredictable traffic patterns. However, it has a higher base cost, so it should be used when these features are critical.
- E. Correct.
Bigtable is designed for high-throughput, low-latency workloads and can handle unpredictable traffic efficiently. It is a cost-effective choice for such use cases.