QuestionQ84

VerifiedDeploy scalable and highly available databases in Google Cloud

You are the DBA for an online tutoring application running on a Cloud SQL for PostgreSQL database. You are testing the cross-regional failover configuration. The database in region R1 successfully fails over to region R2, and the database becomes available for the application to process data.

During testing, some application scenarios work as expected in region R2, but several scenarios fail with database errors. When executed independently against Cloud SQL for PostgreSQL in region R2, the application-related database queries work as expected. The application works completely as expected after the database fails back to region R1.

You need to identify the cause of the database errors in region R2. What should you do?

Explanation

Cross-region read replicas in Cloud SQL use asynchronous replication, so a promoted replica has a non-zero RPO — it is a near-real-time copy, not an exact copy, and the most recent transactions from R1 may be missing. That explains why individual queries succeed when run directly against R2 (the schema and engine are fine) yet several application scenarios fail (they depend on rows that never replicated), and why everything works again after failing back to R1, which still holds all the data. A version (A) or patch (B) difference would break the queries even when run independently, which is not what happens. Option C is wrong because the database was reported available and failed over successfully.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!