Google Professional Cloud Database Engineer Question 252
Select 3Google Cloud PlatformYour team is managing a MySQL database hosted on Cloud SQL. Due to increasing traffic, there is a need to offload read operations to improve performance and reduce latency for users. Which factors should you assess before setting up read replicas?
- A
The consistency requirements of your application and how eventual consistency might impact it.
- B
The geographical distribution of your users and the proximity of read replicas to them.
- C
The need for transactional writes to be performed on the read replicas.
- D
The additional cost of running read replicas and maintaining them.
- E
The ability of the read replicas to automatically handle schema updates from the primary database.
Show answer and explanation
Correct answers: A, B, D
Explanation
When assessing the requirements for read replicas, it is crucial to consider factors such as the consistency model (eventual consistency), geographical proximity to users for performance optimization, and the financial implications of additional replicas. Transactional writes are not supported on read replicas, and handling schema updates requires manual oversight.
- A. Correct.
Read replicas use asynchronous replication, which may result in eventual consistency. If your application requires strong consistency, this could be a limitation.
- B. Correct.
Geographical distribution matters because placing read replicas closer to users can reduce latency and improve performance.
- C. Incorrect.
Read replicas are designed for read operations only, not for transactional writes. Writes must be performed on the primary database.
- D. Correct.
Running and maintaining read replicas incurs additional costs, such as storage and compute, which need to be assessed.
- E. Incorrect.
Schema updates are not automatically handled by read replicas. You need to ensure the primary database propagates schema changes appropriately.