Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 33 of 481

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

Google Professional Cloud Developer Question 33

Single answerGoogle Cloud Platform

You are developing a cloud-based e-commerce application that requires users to log in and manage their session state across multiple requests. The application is deployed on Google Kubernetes Engine (GKE) with multiple replicas to handle scaling. Which of the following approaches would best ensure consistent and scalable user session management?

  1. A

    Use an in-memory session store like Redis and configure it as a managed service via Memorystore.

  2. B

    Store session data in the local memory of each container instance running on GKE.

  3. C

    Include session tokens in client-side cookies and validate them on each request using a secret key.

  4. D

    Use a Cloud SQL database to store session data for scalability and reliability.

Show answer and explanation

Correct answer: A

Explanation

In a distributed application deployed on GKE, session management must account for scalability and container lifecycle management. Using an in-memory session store like Redis, configured as a managed service via Memorystore, ensures high performance, centralization, and reliability while supporting a stateless architecture. Other approaches either lack scalability, introduce unnecessary latency, or compromise session flexibility.

  • A. Correct.

    Using an in-memory session store like Redis via Memorystore is a scalable and performant solution for session management in a distributed architecture. It avoids the pitfalls of local storage and provides fast, centralized session storage.

  • B. Incorrect.

    Storing session data in the local memory of each container instance is not a scalable or reliable solution. Since GKE can scale up or down, session data could be lost if a container is terminated.

  • C. Incorrect.

    Using session tokens in client-side cookies is a stateless approach, but it may not provide the flexibility needed for advanced session management like expiration or revocation.

  • D. Incorrect.

    While Cloud SQL can store session data, it is not optimized for high-speed, frequently accessed data like session management. It introduces unnecessary latency compared to in-memory solutions like Redis.

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