AWS Certified Solutions Architect Associate SAA-C03 Practice Question
The development team at an e-commerce company is designing a checkout microservice which would manage shopping cart sessions for users. The microservice must be capable of maintaining a user's shopping cart contents between sessions without compromising on the system's overall resilience and scalability. What architectural design will best meet these requirements while adhering to microservices best practices?
Store the session states in in-memory storage within the microservice to facilitate quick access.
Utilize an AWS RDS instance to store user session states within a relational database schema.
Design the microservice to be stateful, so it directly manages user shopping cart sessions.
Implement an external session store to manage the shopping cart session state, allowing the microservice to remain stateless.
Leveraging an external session store, such as DynamoDB or ElastiCache, to manage the session state outside the microservice allows for statelessness within the microservice itself. This approach enables the microservice to remain stateless while persisting user session data, thereby maintaining scalability and resilient failover capabilities. Implementing a stateful microservice that retains user sessions would hinder scalability and complicate failover processes. Storing session states in a relational database like RDS could introduce unnecessary complexity and potential single points of failure, and relying solely on in-memory storage would risk data loss in the event of a service disruption or restart, thus failing to persist the state between sessions.
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 is meant by a 'stateless' microservice?
Open an interactive chat with Bash
How do external session stores like DynamoDB or ElastiCache work?
Open an interactive chat with Bash
Why is it important for microservices to maintain statelessness for scalability and resilience?