Soru

Zorluk: ZorManaging Storage and Database Solutions

An enterprise maintains an online transactional processing (OLTP) application backed by a production Cloud SQL for PostgreSQL instance. The data analytics team needs to execute complex, long-running analytical queries against historical data every week. Running these heavy read operations directly against the primary instance causes severe CPU spikes and latency degradation for end users. How should the cloud engineer configure the database infrastructure to support the analytics workload while safeguarding production performance?

  1. Create a Cloud SQL read replica in the same region, and configure the analytics applications to query the read replica.Cevap
  2. B
    Export the relational database tables to Cloud Bigtable, and direct the analytical SQL reporting queries to the Bigtable cluster.
  3. C
    Migrate the database persistent disk to a Cloud Storage Archive bucket prior to query execution to eliminate read IOPS constraints.
  4. D
    Execute gsutil sql export on the primary instance daily and run gsutil restore to re-hydrate temporary Compute Engine instances.

Cevap

The cloud engineer should create a Cloud SQL read replica in the same region and direct the analytics reporting applications to query the read replica.
The correct approach is to provision a Cloud SQL read replica. Read replicas continuously replicate data asynchronously from the primary Cloud SQL instance, allowing heavy analytical read workloads to be completely isolated from the primary instance, thereby maintaining performance for transactional end users.

Adım Adım Çözüm

1
Identify the performance bottleneck on the primary OLTP Cloud SQL instance caused by heavy analytical read operations.
Recognize the need to isolate read-heavy workloads from transactional write workloads.
Analytical queries consume significant IOPS and CPU, degrading performance for primary application users.
2
Evaluate Google Cloud database replica mechanisms for Cloud SQL.
Determine that Cloud SQL read replicas asynchronously replicate data from the primary instance.
Read replicas allow read queries to be offloaded without impacting primary write operations.
3
Select and configure the read replica target for the analytics application connections.
The analytics queries run against the read replica endpoint, insulating the primary instance.
This configuration balances workload distribution while maintaining data consistency for reporting.

Anahtar Kavram

Cloud SQL Read Replicas and Read Offloading
Bu soruyu puanla