A company runs a production Cloud SQL for PostgreSQL instance. They need to ensure high availability with automatic failover in case of a zone failure. Which configuration should they use?
Cloud SQL HA provisions a standby in a different zone, with synchronous replication for automatic failover.
Why this answer
Option D is correct because enabling the high availability (HA) configuration during Cloud SQL for PostgreSQL instance creation automatically provisions a standby instance in a different zone within the same region. This synchronous replication setup ensures automatic failover with minimal data loss (typically under 1 second RPO) in the event of a zone failure, meeting the requirement for high availability.
Exam trap
Google Cloud often tests the misconception that a read replica can serve as a failover target for high availability, but in Cloud SQL, read replicas are asynchronous and require manual promotion, making them unsuitable for automatic zone-level failover.
How to eliminate wrong answers
Option A is wrong because a cross-region read replica is designed for read scaling and disaster recovery, not for automatic failover within the same region; failover to a cross-region replica would require manual promotion and introduces significant latency and potential data loss. Option B is wrong because 'zonal HA configuration' is not a valid Cloud SQL term; the correct approach is to use a regional HA configuration, which places the primary and standby in different zones automatically. Option C is wrong because scaling up CPUs and memory improves performance but does not provide any redundancy or automatic failover; a single instance remains a single point of failure.