Google Cloud Digital LeaderDigital transformation with Google CloudHard
A startup is building a new mobile gaming platform that expects extremely high concurrency and requires a globally distributed, strongly consistent, and highly available database for user profiles, game state, and leaderboards. The database must be able to scale horizontally to millions of users without sacrificing transactional consistency. Which Google Cloud database offering is best suited for these requirements?
- AFirestore
- BMemorystore
- CCloud SQL
- DCloud Spanner
Show answer & explanationAnswer & explanation
Correct answer: D. Cloud Spanner
Cloud Spanner is a globally distributed, strongly consistent, and highly available relational database service that can scale horizontally to petabytes of data and millions of transactions per second. It uniquely combines the benefits of relational databases with the scalability of NoSQL, making it ideal for global gaming platforms needing strong consistency.
Why the other options are wrong
- A. Firestore is a NoSQL document database, offering eventual consistency by default for distributed writes, which might not meet the 'strongly consistent' requirement for critical game state across a global platform.
- B. Memorystore is a managed Redis/Memcached service for caching, not a primary database for persistent storage of user profiles or game state.
- C. Cloud SQL is a regional relational database, not designed for global distribution and horizontal scalability at this extreme level while maintaining strong consistency.
Cloud Spanner
A globally distributed, strongly consistent, and highly available relational database service.
- Combines relational database features with horizontal scalability of NoSQL.
- Offers ACID transactions at global scale.
- Synchronous replication for strong consistency across regions.
Memory trick: Spanner: Spans the globe, with strong consistency and speed.