In this section, we transition from a stateless web application (WhatIsTheTime.com) to a stateful e-commerce platform (MyClothes.com). This introduces new challenges, such as maintaining user sessions, ensuring high availability, and scaling efficiently.
MyClothes.com needs to handle:
✅ Hundreds of concurrent users navigating and adding items to a shopping cart.
✅ Session persistence to prevent users from losing their cart when requests are routed to different servers.
✅ Horizontal scalability, ensuring the web application remains stateless wherever possible.
✅ Secure and efficient data storage, including user details and shopping cart information.
The architecture follows a standard multi-AZ setup:
💥 The issue? Each request may hit a different EC2 instance, causing users to lose their shopping cart as there’s no centralized session management.