Google Professional Cloud Developer Question 154
Single answerGoogle Cloud PlatformYou are developing an e-commerce application on Google Cloud that requires storing user data, including shopping cart details, order history, and product catalog information. The application must handle high read and write throughput, ensure data consistency for transactions, and allow for future scalability. Which storage option should you choose for this use case?
- A
Cloud SQL
- B
Cloud Spanner
- C
Cloud Storage
- D
Firestore in Native Mode
Show answer and explanation
Correct answer: B
Explanation
Cloud Spanner is the best choice for this use case because it is designed to handle high read and write throughput, provides strong consistency for transactions, and supports global scalability. While other options like Cloud SQL or Firestore may address some requirements, they lack the scalability and transactional guarantees required for a large-scale e-commerce application.
- A. Incorrect.
Cloud SQL is a managed relational database and supports transactional consistency, but it may not scale well for high throughput and global distribution compared to Cloud Spanner.
- B. Correct.
Cloud Spanner is a globally distributed, scalable, and strongly consistent relational database, making it ideal for handling high throughput, transactional workloads, and scalability requirements.
- C. Incorrect.
Cloud Storage is an object storage platform and is not suitable for structured data or transactional applications like an e-commerce platform.
- D. Incorrect.
Firestore in Native Mode is a NoSQL document database that scales well for certain use cases, but it does not inherently support strong transactional consistency for relational data like orders and shopping cart details.