Google Associate Cloud EngineerDeploying and implementing a cloud solutionMedium
A company is deploying an e-commerce application that requires a highly available relational database. The database must support automatic failover, replication across multiple zones, and be compatible with PostgreSQL. Which Google Cloud solution should you choose?
- ACloud SQL for PostgreSQL configured for high availability
- BCloud Spanner for its global consistency and scalability
- CCompute Engine with a self-managed PostgreSQL instance and custom replication
- DFirestore in Datastore mode for its NoSQL capabilities
Show answer & explanationAnswer & explanation
Correct answer: A. Cloud SQL for PostgreSQL configured for high availability
Cloud SQL for PostgreSQL, configured for high availability, provides a fully managed relational database with automatic failover, replication across zones, and full PostgreSQL compatibility. This meets all the specified requirements for a highly available e-commerce application.
Why the other options are wrong
- B. Cloud Spanner is a globally distributed NewSQL database, not a traditional relational database compatible with PostgreSQL.
- C. Self-managing PostgreSQL on Compute Engine requires significant operational overhead for high availability and replication.
- D. Firestore is a NoSQL document database, not a relational database, and not PostgreSQL compatible.
Cloud SQL High Availability (HA)
A configuration for Cloud SQL instances that provides automatic failover to a standby replica in a different zone, ensuring continuous database operation.
- Primary instance and a standby replica are in separate zones.
- Synchronous replication ensures data consistency.
- Automatic failover in case of primary instance or zone failure.
- Reduces downtime for critical applications.
Memory trick: Cloud SQL: The easy button for your relational databases, especially when you need it always on.