Google Cloud Professional Cloud Database Engineer — Question 68
You are configuring a brand new PostgreSQL database instance in Cloud SQL. Your application team wants to have an optimal and highly available environment with automatic failover to avoid any unplanned outage. What should you do?
Answer options
- A. Create one regional Cloud SQL instance with a read replica in another region.
- B. Create one regional Cloud SQL instance in one zone with a standby instance in another zone in the same region.
- C. Create two read-write Cloud SQL instances in two different zones with a standby instance in another region.
- D. Create two read-write Cloud SQL instances in two different regions with a standby instance in another zone.
Correct answer: B
Explanation
The correct answer is B because it provides a highly available setup within the same region, allowing for automatic failover between zones. Option A does not ensure high availability since a read replica cannot take over automatically. Option C complicates the setup without the needed failover in case of a zone failure. Option D also lacks efficiency as it involves instances across different regions, which is not necessary for achieving the desired high availability and automatic failover.