Question

Difficulty: MediumManaging Storage and Database Solutions

An operations team manages a Cloud SQL for PostgreSQL database instance used for live transaction processing. Business analysts frequently execute heavy reporting queries directly against this primary instance, causing CPU utilization spikes that slow down transactional write operations. You need to mitigate the performance impact on transaction processing with minimal operational overhead. Which action should you take?

  1. Create a read replica of the Cloud SQL instance and configure the reporting queries to connect to the read replica.Answer
  2. B
    Export the relational tables daily to Cloud Storage and query the data directly using Cloud Bigtable.
  3. C
    Change the storage class of the Cloud SQL database disk to Coldline storage to reduce read latency.
  4. D
    Enable a public IP address on the primary Cloud SQL instance to allow analysts to establish direct parallel connections.

Answer

Create a read replica of the Cloud SQL instance and configure the reporting queries to connect to the read replica.
Creating a Cloud SQL read replica offloads analytical read operations from the primary database instance. The read replica receives data updates asynchronously, allowing business analysts to run resource-intensive reporting queries on the replica without impacting the transaction throughput and CPU utilization of the primary database.

Step-by-Step Solution

1
Identify the root cause of the performance degradation.
Heavy read operations for reporting compete for CPU and IOPS resources with primary transactional writes.
Running analytics directly on a primary database degrades write performance during peak workloads.
2
Evaluate Google Cloud database management solutions for read scaling.
Cloud SQL read replicas replicate data asynchronously from the primary instance and serve read-only queries.
Read replicas isolate reporting workloads from the primary instance while maintaining data synchronization.
3
Select the option that offloads reads with minimal operational overhead.
Provisioning a read replica provides a dedicated endpoint for reporting without requiring schema migrations or complex data pipelines.
It directly satisfies the requirement to protect primary write performance with standard managed database features.

Key Concept

Cloud SQL Read Replicas for Workload Isolation
Rate this question