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?
- Create a Cloud SQL read replica in the same region, and configure the analytics applications to query the read replica.Cevap
- BExport the relational database tables to Cloud Bigtable, and direct the analytical SQL reporting queries to the Bigtable cluster.
- CMigrate the database persistent disk to a Cloud Storage Archive bucket prior to query execution to eliminate read IOPS constraints.
- DExecute 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
Anahtar Kavram
Cloud SQL Read Replicas and Read Offloading