Professional Cloud ArchitectAnalyze and optimize technical and business processesMedium
A global e-commerce company is building a new product catalog service that needs to serve millions of requests per second with extremely low latency (single-digit milliseconds) globally. The data is highly structured, and strong consistency is required across all regions for critical operations like inventory updates, but eventual consistency is acceptable for non-critical reads. The database must scale horizontally across multiple continents. Which Google Cloud database service is best suited for these requirements?
- AFirestore in Native mode.
- BCloud Spanner.
- CBigQuery.
- DCloud SQL for MySQL with read replicas.
Show answer & explanationAnswer & explanation
Correct answer: B. Cloud Spanner.
Cloud Spanner is a globally distributed, strongly consistent relational database service that can scale horizontally across multiple continents while maintaining single-digit millisecond latency. It offers strong consistency for critical operations and supports SQL, making it ideal for a globally scaled product catalog requiring both high throughput and strong consistency.
Why the other options are wrong
- A. Firestore in Native mode is a NoSQL document database. While it offers global scale and low latency, it is eventually consistent by default for cross-region writes and might not provide the strong consistency guarantees required for critical inventory updates across regions.
- C. BigQuery is a data warehouse for analytics, not an operational database for serving real-time, transactional requests with single-digit millisecond latency.
- D. Cloud SQL for MySQL with read replicas can scale read operations but struggles with global strong consistency across writes and may not achieve single-digit millisecond latency globally for all operations.
Globally Distributed Databases
Databases designed to operate across multiple geographic regions, offering high availability, low latency, and various consistency models.
- Cloud Spanner: Global, strongly consistent, relational, high throughput.
- Firestore: Global, eventually consistent (cross-region), NoSQL document DB.
- Cloud SQL: Regional, can use read replicas for scale, but not truly global strong consistency.
Memory trick: Global scale, strong and fast, Spanner's the choice, built to last!