Google Professional Cloud Developer Question 408
Single answerGoogle Cloud PlatformYou are developing a serverless application on Google Cloud that needs to write user profile data to a database. The application must ensure high scalability and support ACID transactions. Which datastore should you choose?
- A
Cloud Firestore in Native mode
- B
Cloud SQL
- C
Cloud Spanner
- D
Cloud Bigtable
Show answer and explanation
Correct answer: C
Explanation
Cloud Spanner is the best choice for applications that require high scalability, global availability, and strict ACID transaction support. While other options like Cloud Firestore or Cloud SQL can handle some of these requirements, Cloud Spanner uniquely combines all of them, making it the optimal datastore for this scenario.
- A. Incorrect.
Cloud Firestore in Native mode is highly scalable and supports transactions, but it is not designed for globally distributed, large-scale relational datasets with strict ACID compliance.
- B. Incorrect.
Cloud SQL supports transactions and relational data but is not as scalable as Cloud Spanner for global, high-throughput applications.
- C. Correct.
Cloud Spanner is Google Cloud’s globally distributed, strongly consistent database that supports ACID transactions and is highly scalable, making it the ideal choice for the given requirements.
- D. Incorrect.
Cloud Bigtable is highly scalable and designed for low-latency, high-throughput workloads, but it does not support ACID transactions, making it unsuitable for this scenario.