Product Context
ShopNow is a large omnichannel retailer with a marketplace and first-party inventory across thousands of stores. The pricing platform must update item prices in near real time as demand, competitor prices, inventory, and local store conditions change.
Scale
| Signal | Value |
|---|
| DAU | 35M shoppers |
| Peak read QPS (price lookups) | 450K |
| Peak write QPS (price updates) | 120K |
| Items in catalog | 18M SKUs |
| Store locations | 6,500 |
| Active store-SKU pairs | 220M |
| Price-changing events/day | 2.5B |
| End-to-end pricing decision latency (p99) | 150ms |
Task
Design an end-to-end ML system that decides and serves real-time prices for millions of items across thousands of stores.
- Clarify the product objective and define the optimization target: revenue, margin, sell-through, conversion, or a constrained combination.
- Propose the full architecture, including event ingestion, feature computation, candidate price generation, ranking/scoring, policy constraints, and online serving.
- Choose models for each stage and explain what runs in batch vs near-real-time vs per-request online inference.
- Define the training data, labels, feedback loop, and how you handle delayed outcomes such as purchases and returns.
- Specify offline evaluation, online experimentation, and monitoring for drift, training-serving skew, and policy violations.
- Identify key failure modes and fallback behavior when data feeds, models, or serving systems are degraded.
Constraints
- Prices must respect merchant rules: floor/ceiling bounds, MAP restrictions, promo calendars, and regional tax differences.
- Inventory, competitor prices, and demand signals can change within minutes.
- The system must support both store-specific and global prices.
- Bad pricing decisions are high-risk: legal/compliance violations and margin loss must be tightly controlled.
- Serving cost matters: most traffic should be handled on CPU with selective use of more expensive models.