Google Professional Cloud Database Engineer Question 237
Single answerGoogle Cloud PlatformYour company is running a mission-critical application that requires high availability for its PostgreSQL database. You need to design a solution in Google Cloud to ensure that the database remains highly available even if a zone becomes unavailable. Which solution should you implement?
- A
Deploy a Cloud SQL for PostgreSQL instance with a read replica in the same zone.
- B
Deploy a Cloud SQL for PostgreSQL instance with high availability (HA) enabled.
- C
Deploy a self-managed PostgreSQL instance on a Compute Engine instance with snapshots enabled.
- D
Deploy a Cloud Spanner instance in multi-region configuration.
Show answer and explanation
Correct answer: B
Explanation
For high availability of PostgreSQL in Google Cloud, enabling the high availability (HA) configuration in Cloud SQL is the recommended approach. This ensures that a standby instance is automatically created in a different zone, and failover is managed automatically in case of a zonal failure. Other options either do not support PostgreSQL, lack high availability capabilities, or do not provide zonal redundancy.
- A. Incorrect.
Deploying a read replica in the same zone does not provide high availability in the event of a zonal failure as both the primary and the replica are in the same zone.
- B. Correct.
Enabling high availability (HA) for Cloud SQL automatically provisions a standby instance in a different zone within the same region, ensuring availability during a zonal outage.
- C. Incorrect.
While a self-managed PostgreSQL instance with snapshots provides backup capabilities, it does not offer high availability or automatic failover in the event of a failure.
- D. Incorrect.
Cloud Spanner in a multi-region configuration provides high availability, but it is not a PostgreSQL solution. It is a different database service designed for global-scale applications.