PROFESSIONAL-CLOUD-DATABASE-ENGINEER · Question #90
You are managing two different applications: Order Management and Sales Reporting. Both applications interact with the same Cloud SQL for MySQL database. The Order Management application reads and…
The correct answer is A. Create a read replica for the Sales Reporting application. A Cloud SQL read replica offloads read-only queries from the primary instance, ensuring the Sales Reporting application does not degrade the performance of the Order Management application that performs writes.
Question
You are managing two different applications: Order Management and Sales Reporting. Both applications interact with the same Cloud SQL for MySQL database. The Order Management application reads and writes to the database 24/7, but the Sales Reporting application is read- only. Both applications need the latest data. You need to ensure that the Performance of the Order Management application is not affected by the Sales Reporting application. What should you do?
Options
- ACreate a read replica for the Sales Reporting application.
- BCreate two separate databases in the instance, and perform dual writes from the Order
- CUse a Cloud SQL federated query for the Sales Reporting application.
- DQueue up all the requested reports in PubSub, and execute the reports at night.
How the community answered
(27 responses)- A81% (22)
- B11% (3)
- C4% (1)
- D4% (1)
Why each option
A Cloud SQL read replica offloads read-only queries from the primary instance, ensuring the Sales Reporting application does not degrade the performance of the Order Management application that performs writes.
A read replica maintains a continuously synchronized copy of the primary database using replication, providing the Sales Reporting application with up-to-date data while directing its queries away from the primary instance. This isolates the read-only reporting workload from the read/write Order Management workload, protecting primary instance performance.
Creating two separate databases and performing dual writes adds application complexity and introduces risks of data inconsistency, rather than solving the performance isolation problem.
Cloud SQL federated queries are not a built-in feature designed for workload isolation; this approach does not solve the resource contention problem on the primary instance.
Queuing reports in Pub/Sub and executing them at night would not satisfy the requirement that both applications need the latest data in real time.
Concept tested: Cloud SQL read replicas for read workload isolation
Source: https://cloud.google.com/sql/docs/mysql/replication/create-replica
Topics
Community Discussion
No community discussion yet for this question.