AWS Certified Solutions Architect Associate SAA-C03 Practice Question
Your company is building a microservices-based application expected to handle a large volume of user requests. To ensure scalability and fault tolerance, you aim to design your microservices to be stateless. Which approach should you take?
Design microservices to store user session data in an external data store.
Configure microservices to keep user session state in memory within each instance.
Design microservices to manage user sessions using stateful connections.
Implement microservices that write session data to local disk storage on each instance.
Designing microservices to be stateless means they do not store any session information or client-specific data locally. By storing user session data in an external data store e.g., AWS DynamoDB or RDS, you decouple service instances from the user state, allowing any instance to handle any request. This approach facilitates horizontal scaling and improves fault tolerance, as instances can be added or removed without affecting user sessions. Conversely, maintaining session state in memory or local binds the user session to a specific instance, making the service stateful and hindering scalability. Managing user sessions with stateful connections also introduces statefulness, defeating the goal of a stateless architecture.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are microservices?
Open an interactive chat with Bash
What is the benefit of using an external data store for session management?
Open an interactive chat with Bash
How can I implement stateless microservices in AWS?