Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 458 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 458

Single answerGoogle Cloud Platform

You are developing a web application hosted on Google Cloud that frequently fetches product catalog data from a Cloud SQL database. To improve performance and reduce database load, you decide to introduce caching. Which approach should you take to implement caching effectively while ensuring data consistency and scalability?

  1. A

    Use Memorystore for Redis to cache the product catalog data and configure a TTL (Time-To-Live) for cache expiration.

  2. B

    Store product catalog data in a local in-memory cache on the application server.

  3. C

    Use a global variable in your application code to cache the product catalog data.

  4. D

    Replicate the product catalog data into a separate Cloud SQL instance for faster access.

Show answer and explanation

Correct answer: A

Explanation

Caching frequently accessed data, like a product catalog, improves performance and reduces load on the database. Memorystore for Redis is a managed and scalable caching solution in Google Cloud that supports features such as TTL for cache expiration and consistency across distributed systems. Local or application-specific caching methods are not suitable for scalable cloud applications, and replicating the database does not address the primary goal of reducing query latency.

  • A. Correct.

    This is the correct answer. Memorystore for Redis is a managed caching service provided by Google Cloud, designed for low-latency and scalable caching. Configuring TTL ensures that stale data is eventually evicted and replaced with fresh data.

  • B. Incorrect.

    This is incorrect because local in-memory caching on the application server is not scalable in a distributed environment and could lead to inconsistent cache states across multiple instances.

  • C. Incorrect.

    This is incorrect because global variables are not designed for caching and do not provide scalability or data consistency in a cloud environment.

  • D. Incorrect.

    This is incorrect because replicating data to a separate Cloud SQL instance does not solve the problem of high latency or reduce database load significantly. Caching should be used instead for performance optimization.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam