Google Professional Cloud Database Engineer Question 174
Single answerGoogle Cloud PlatformYou are designing a highly available database solution on Google Cloud for a global e-commerce application. The application requires low-latency reads and writes in multiple regions, and the ability to automatically failover in case of a regional outage. Which replication strategy is most suitable for this use case?
- A
Single-region replication with backups stored in a separate region
- B
Multi-region replication with eventual consistency
- C
Multi-region replication with strong consistency
- D
Asynchronous replication to a secondary region
Show answer and explanation
Correct answer: C
Explanation
For a global e-commerce application requiring low-latency reads and writes in multiple regions, as well as automatic failover with data consistency, multi-region replication with strong consistency is the most suitable strategy. It ensures that data is immediately consistent across regions and supports high availability in the event of a regional outage.
- A. Incorrect.
Single-region replication with backups stored in a separate region does not provide low-latency reads across multiple regions or automatic failover. It may ensure data durability but doesn't meet the requirements for global availability.
- B. Incorrect.
Multi-region replication with eventual consistency allows for low-latency reads globally, but it does not meet the application's requirement for low-latency writes and strong consistency across regions.
- C. Correct.
Multi-region replication with strong consistency meets the requirements for low-latency reads and writes across regions while ensuring data consistency and automatic failover. This strategy is ideal for a global application that prioritizes availability and consistency.
- D. Incorrect.
Asynchronous replication to a secondary region introduces a lag between the primary and secondary regions. This may lead to stale reads in case of failover, which does not meet the application's need for low-latency and consistent data globally.