Practice: Design E-commerce Marketplace
Global multi-vendor marketplace with product catalog, search, cart/checkout, payments, inventory, order management, media, recommendations, and analytics.
Build this system yourself on the canvas below. Add components, connect them, and run traffic simulations to see where your design holds up and where it breaks.
Functional requirements
- Multi-vendor catalog with categories, filters, and availability.
- Full-text and faceted search, autocomplete suggestions.
- Cart management, promo codes, taxes, and shipping fee calculation.
- Secure checkout with idempotent order creation and payment capture.
- Accurate inventory reservation and decrement to prevent overselling.
- Order lifecycle: placed → paid → packed → shipped → delivered; cancellations/refunds.
- Seller portal for product updates, pricing, and order fulfillment acknowledgments.
- Notifications (email/SMS/push) for order updates and receipts.
- Media hosting for product images/video with CDN distribution.
- Recommendations: related items, frequently bought together, personalized feed.
Non-functional requirements
- Availability: 99.95%+; single AZ failure must not halt orders.
- Performance: cache-warm PDP/PLP < 120 ms p99; checkout confirmation < 2 s p99.
- Scalability: independently scale catalog, search, checkout, and payment services.
- Durability: orders and payments persisted with transactional guarantees; audit logs retained.
- Consistency: strong for orders/payments/inventory; eventual for search and recs (< 30 s).
- Security: isolate PCI scope to payments; TLS 1.2+; PII encrypted at rest (AES-256).
- Resilience: timeouts, circuit breakers, bulkheads; retries with backoff and DLQs.
- Observability: traces/logs/metrics for API, queue depth, index lag, and payment latency.
- Cost: CDN offload > 90%; storage tiering for cold media and logs.