Design a Greeting Card E-Commerce Marketplace
Design catalog, checkout, abuse controls, and durable customer and seller notifications for a greeting-card marketplace.
Problem statement
For this exercise, assume you are designing an e-commerce marketplace where sellers list physical and customizable greeting cards and customers browse, purchase, and track orders.
The first version must keep payment, inventory, and order outcomes durable; rate-limit abusive request bursts without blocking ordinary shoppers; and notify customers and sellers when an order changes state. Treat the stated traffic and delivery targets as practice assumptions.
What to build
- Customers browse and search active card listings, including customizable variants, price, availability, and seller.
- A customer submits one idempotent checkout that reserves inventory, handles payment uncertainty, and produces one durable order outcome.
- Customers and sellers receive preference-aware notifications for committed order-state changes without duplicate user-visible messages.
- Public APIs enforce configurable per-principal and per-IP limits and return an explicit retry outcome when a limit is exceeded.
At scale
- Assume 2 million daily active customers and 100,000 active sellers.
- Plan for 15,000 read requests per second at peak and 1,000 checkout commands per second during seasonal bursts.
- Catalog reads may be eventually consistent within 30 seconds; payment, inventory reservation, and order state must not split into contradictory final outcomes.
- Deliver 99% of committed order notifications within 60 seconds, with durable retry for provider outages.
- Sustain a regional gateway or notification-worker loss without accepting unlimited traffic or losing committed order events.