Setting up replication and failover for services like Cloud SQL and Redis
Google Cloud offers built-in replication and failover for managed databases like Cloud SQL and Memorystore for Redis, but the mechanisms differ between high-availability (HA) configurations and read replicas. Data engineers must know which replication topology is synchronous and automatic versus asynchronous and manual to design resilient pipelines.
1 · Learn the must-know
- Cloud SQL HA (regional) configuration uses synchronous replication to a standby instance in a different zone and performs automatic failover with no data loss, typically completing in under a minute.
- Cloud SQL read replicas (same-region or cross-region) use asynchronous replication and are for read scaling, not automatic failover; promoting a replica to a standalone primary is a manual, one-way, irreversible action that breaks replication.
- Memorystore for Redis Cluster provides built-in intra-cluster replication across shards and automatic failover to replica nodes without manual intervention, improving on the older standalone Memorystore for Redis offering.
- Memorystore for Redis (non-cluster) Standard Tier offers cross-zone replication with automatic failover to a replica, while Basic Tier has no replication and any node failure causes data loss.
- Cross-region Cloud SQL replicas can lag behind the primary due to network latency and asynchronous replication, so RPO is non-zero and must be accounted for in failover planning.
- After a manual promotion or failover event, applications must update connection endpoints (or rely on the instance's stable IP/DNS in HA cases) since replica promotion changes the instance's role and sometimes its connection details.
2 · Check your understanding
A retail company runs its transactional database on Cloud SQL for PostgreSQL in us-central1. To support disaster recovery, they configured a cross-region read replica in us-east1. During a regional outage in us-central1, the operations team needs to make the us-east1 replica the primary read-write database with minimal delay. Which action should they take?
What you have tried across GCP PDE's objectives, not a readiness score.
Designing data processing systems~22% of the exam0 of 17 tried
Ingesting and processing the data~25% of the exam0 of 11 tried
Storing the data~20% of the exam0 of 13 tried
Preparing and using data for analysis~15% of the exam0 of 11 tried
Maintaining and automating data workloads~18% of the exam0 of 15 tried
3 · Keep going
Ready for more? Take a weighted mock or try free practice questions.