Google Professional Cloud Developer Question 42
Single answerGoogle Cloud PlatformYou are developing a high-traffic e-commerce application on Google Cloud that requires low-latency access to frequently accessed product data. The application is built using a microservices architecture, and each service communicates through gRPC APIs. To improve performance, you want to implement an effective caching solution. Which caching approach should you choose to meet these requirements?
- A
Use Memorystore (Redis) as a distributed in-memory cache to store frequently accessed product data.
- B
Use Cloud SQL with a read replica to cache frequently accessed product data.
- C
Cache the product data on the client-side using local browser storage.
- D
Use Cloud Storage to store and retrieve cached product data in JSON format.
Show answer and explanation
Correct answer: A
Explanation
To meet the performance requirements of a high-traffic e-commerce application, you need a distributed, low-latency caching solution. Memorystore (Redis) is specifically designed for such use cases and integrates seamlessly with Google Cloud services. Other options, such as databases or client-side storage, are not optimized for the described requirements.
- A. Correct.
Memorystore (Redis) is a managed, in-memory datastore that is ideal for low-latency access to frequently accessed data. It supports distributed caching, making it suitable for microservices architectures.
- B. Incorrect.
Cloud SQL with a read replica can improve read operations but is not optimized as a caching solution for high-frequency, low-latency access. It is designed for relational database use cases, not in-memory caching.
- C. Incorrect.
Client-side caching using browser storage is limited in scope and does not support data sharing between multiple microservices. It is not suitable for a distributed microservices architecture.
- D. Incorrect.
Cloud Storage is used for object storage and is not optimized for low-latency caching needs. Accessing data from Cloud Storage involves additional network latency compared to in-memory solutions.