IT 204: E-Commerce
By the end of this case study, you will be able to analyze and apply architectural patterns for high-traffic e-commerce events.
Platforms like Foodmandu or Pathao Food face massive, predictable traffic spikes during festivals like Dashain and Tihar.
The Domino Effect of Unpreparedness:
Massive Traffic Spike 📈
➜ App/API Slowdowns 🐌
➜ Database Overload & Timeouts 💥
➜ Failed Orders & Payments ❌
➜ Unhappy Customers & Overwhelmed Support 😠
Drag the slider to simulate festival traffic. Observe how load affects your infrastructure in real time.
The solution wasn't a single fix, but a combination of strategies targeting different parts of the system.
Serve content faster by reducing direct hits to the main server and database.
Strengthen the core data layer to handle both high read and write volumes efficiently.
Decouple system components to handle order processing resiliently, even under load.
Adjust CDN and server-side cache hit rates to see how much database load you can eliminate during a festival surge.
Directly addressing the database bottleneck is critical for transactional stability.
Key Principle (Unit 3.3): Separate read vs. write paths to prevent contention and scale them independently.
Key Concept: Message Queues. An intermediary service that holds "messages" (like a new order) in a queue. Services can pull messages to process them at their own pace, preventing the system from being overwhelmed.
The order lifecycle was decoupled:
Order Placed ➜ [Queue]
➜ Order Accepted ➜ [Queue]
➜ Rider Assigned ➜ [Queue]
➜ Delivered
This ensures that even if the "Rider Assignment" service is slow, it doesn't stop new orders from being placed.
Simulate 50 festival orders arriving simultaneously. Compare what happens with and without a message queue.
Improving operational efficiency for riders is just as important as server performance.
Virtual geographic boundaries were used to group riders into specific zones. This ensures riders are only offered deliveries within an efficient travel radius, reducing pickup times.
The system intelligently grouped multiple orders from the same area for a single rider. This increases rider earnings and delivery speed during peak hours.
4 orders arrive in the same zone. Choose a dispatch strategy and see the impact on riders, time, and cost.
Scenario: You are the CTO of a local e-commerce platform (e.g., Daraz, Sastodeal) preparing for the Dashain shopping festival.
Question: Based on this case study, what are your top 3 priorities?
You are the CTO preparing for Dashain. Check each action you have completed. Score your platform's readiness.
This case study covers concepts from Chapters 3.2-3.5.
Next Topic: Unit 4.1: 'Unit 4 Intro: E-commerce Security and Payment Systems | IT 204