Product Context
ShopNow is a large e-commerce marketplace. You are designing the personalized product listing and recommendation stack for home page and search browse surfaces, with special focus on handling flash-sale traffic spikes without degrading ranking quality or availability.
Scale
| Signal | Value |
|---|
| DAU | 45M |
| Peak browse/search QPS | 220K |
| Flash-sale spike QPS | 600K for 10-15 minutes |
| Active catalog | 120M SKUs |
| Daily catalog updates | 8M price/inventory changes |
| Per-request latency budget (p99) | 180ms end-to-end |
Task
- Clarify the functional and non-functional requirements for a multi-stage recommendation/ranking system under bursty traffic.
- Design the end-to-end architecture, including retrieval, ranking, re-ranking, online vs batch features, and the feedback loop.
- Explain what caching, load balancing, and messaging patterns you would use to absorb traffic spikes while preserving freshness for price and inventory.
- Choose models for each stage and justify the tradeoffs between quality, latency, and cost.
- Define offline and online evaluation, including how you would measure degradation during spike handling and when to trigger fallbacks.
- Identify key failure modes such as stale features, training-serving skew, queue backlogs, and hot keys, with detection and mitigation.
Constraints
- Inventory and price must be fresh within 2 minutes during normal traffic and within 5 minutes during flash sales.
- Out-of-stock items must never be shown in the top results.
- Serving cost target is under $0.0012 per request at peak.
- The system must remain available even if one ranking tier or one region is degraded.
- Compliance requires auditability for why an item was filtered or down-ranked.