Professional Cloud ArchitectManage and provision solution infrastructureMedium
A financial services company is migrating its on-premises transactional database to Google Cloud. The database needs to support strong ACID properties, horizontal scalability across regions, and high availability with synchronous replication to ensure zero data loss in case of a regional outage. Which Google Cloud database service should the company choose?
- ACloud SQL for PostgreSQL
- BCloud Bigtable
- CFirestore in Datastore mode
- DCloud Spanner
Show answer & explanationAnswer & explanation
Correct answer: D. Cloud Spanner
Cloud Spanner is a globally distributed, strongly consistent, relational database service built for transactional workloads. It offers horizontal scalability, strong ACID properties, and synchronous replication across regions, making it ideal for financial services applications requiring zero data loss and high availability.
Why the other options are wrong
- A. Cloud SQL for PostgreSQL offers strong ACID properties and high availability within a region, but it does not inherently provide global horizontal scalability with synchronous replication across multiple regions for zero data loss.
- B. Cloud Bigtable is a NoSQL wide-column database optimized for high throughput and low-latency analytics and operational workloads. It does not provide strong ACID properties or relational capabilities needed for transactional databases.
- C. Firestore in Datastore mode is a NoSQL document database that offers eventual consistency (or strong consistency for single document reads/writes) and is not designed for the global, strongly consistent, transactional, and synchronously replicated requirements of a financial services database.
Cloud Spanner
Cloud Spanner is a globally distributed, strongly consistent, relational database service offered by Google Cloud. It combines the benefits of relational databases (ACID transactions, SQL queries) with the scalability of NoSQL databases.
- Globally distributed and horizontally scalable
- Strong ACID properties and synchronous replication
- Suitable for mission-critical transactional workloads
- Supports SQL queries
Memory trick: Spanner stretches globally for perfect ACID transactions.