Cloud SQL High Availability Configuration for Zonal Outages
Short answer
C Configure and create a high-availability Cloud SQL instance with the primary instance in zone A and a secondary instance in any zone other than zone A to ensure automatic failover and zero data loss during a zonal outage.
Question
Key Takeaways
This question examines Cloud SQL High Availability (HA) configurations to ensure zero data loss and minimal downtime during zonal outages. Option C is correct because it establishes a synchronous failover replica in a different zone, enabling automatic failover. Other options involve backups, read replicas, or cross-region setups that do not meet the strict HA requirements.
Expert Analysis
Cloud SQL cross-region replication (using CMEK for encryption) creates a replica in a different region for DR, with CMEK ensuring encryption key control across regions. Failover replica (A) is same-region. Read replicas (B) are for reads, not DR. BigQuery (D) is not a Cloud SQL DR solution.
To determine the correct architecture for a global financial services company trading stocks 24/7, we must strictly evaluate the constraints: continuous operation, minimized downtime, and zero data loss during a zonal outage. The critical distinction here lies in the difference between high availability within a region and disaster recovery across regions, particularly when "zonal outage" is the threat vector.
Option C is the correct answer because it leverages Cloud SQL’s built-in High Availability (HA) feature. When you configure a primary instance in Zone A, Cloud SQL automatically provisions a synchronous failover replica in another zone within the same region (e.g., Zone B). This setup ensures that if Zone A becomes unavailable, the database automatically fails over to the secondary zone with minimal downtime and no data loss, as the data is synchronously replicated. While the reference explanation mentions "cross-region replication," the core mechanism described in Option C—primary in one zone, secondary in another—is the standard definition of Cloud SQL HA. This directly addresses the "zonal outage" requirement by providing an immediate, automated fallback within the region, which is faster and more reliable than cross-region failover for latency-sensitive trading applications.
Let's analyze why the other options fail:
Option A suggests backing up to Cloud Storage and restoring on a Compute Engine instance. This approach introduces significant downtime. Restoring from a backup is a manual or semi-automated process that can take hours, violating the "minimized downtime" constraint. Furthermore, backups are point-in-time snapshots; they do not provide continuous operational capability during the outage window. This is a disaster recovery strategy, not a high-availability solution for minimizing downtime.
Option B proposes creating a read replica in another region and promoting it. While cross-region replication provides geographic redundancy, read replicas are asynchronous. In the event of a zonal failure, relying on a cross-region replica for promotion involves a delay due to replication lag and the manual or scripted promotion process. More importantly, read replicas are primarily designed for offloading read traffic, not for automatic failover. Although Cloud SQL does support failover replicas in different zones, the option specifies "read replica" and "another region," which implies a slower, less integrated failover path compared to the native HA configuration in Option C. Additionally, the prompt asks for a solution to a zonal outage; cross-region solutions are overkill for zonal failures and introduce higher latency for the trading application.
Option D suggests creating a read replica in the same region but a different zone. While this provides some redundancy, read replicas are not suitable for automatic failover in the context of maintaining continuous write operations without data loss. If the primary goes down, promoting a read replica requires stopping writes, promoting the replica, and then restarting the application. This results in downtime and potential data inconsistency if not managed perfectly. It does not offer the seamless, automatic failover provided by the dedicated HA failover replica in Option C.
The key technical insight here is understanding Cloud SQL's HA architecture. Cloud SQL HA uses a synchronous standby instance in a different zone within the same region. This standby is always synchronized with the primary. If the primary zone fails, the system automatically promotes the standby to primary. This is distinct from read replicas (asynchronous, for scaling reads) and cross-region backups (for long-term DR). For a financial trading platform requiring zero data loss and minimal downtime during a zonal failure, the synchronous HA setup is the only viable option among the choices. It balances speed, data integrity, and automation perfectly.
Therefore, Option C is the definitive choice. It aligns with best practices for high-availability databases in Google Cloud, ensuring that the database remains accessible even if an entire zone goes offline, without the complexity and latency of cross-region failover or the downtime of backup restoration.
Exam Strategy
When designing for high availability in Google Cloud, distinguish between 'High Availability' (HA) and 'Disaster Recovery' (DR). HA typically involves synchronous replication within a region (across zones) for sub-second failover, while DR involves asynchronous replication across regions or backups for longer-term recovery. For questions demanding 'zero data loss' and 'minimal downtime' during a 'zonal' failure, prioritize Cloud SQL HA instances with failover replicas in different zones over read replicas or cross-region backups.
Related Analysis
Practice All ADP Questions
Access 65 questions with complete answers and detailed explanations.
View Full ADP Practice Test →