Design a Price Tracking & Alert System (CamelCamelCamel)
Design a Price Tracking & Alert System (CamelCamelCamel)
Price tracking platforms track historical pricing fluctuations across millions of products on Amazon, Best Buy, and Walmart, notifying bargain-hunters via email or SMS when an item drops below their target threshold.
1. System Requirements
Functional Requirements
- Track Product: Users can paste an e-commerce URL and set a desired target price (e.g. *"Alert me if Sony WH-1000XM5 drops below $250"*).
- Periodic Price Ingestion: System periodically fetches the current price for all monitored product IDs.
- Price History Charting: Display historical price movements over 1-year and all-time spans.
- Trigger Notifications: When a price drop is confirmed, immediately dispatch an email/push notification to all subscribed users.
Non-Functional Requirements
- Politeness & Anti-Bot Resilience: Rotate proxy IPs, adhere to rate limits, and randomize request intervals to avoid IP bans.
- Dynamic Polling Intervals: Products with volatile prices or high popularity are checked more frequently (e.g. every 1 hour) than dormant products (once every 24 hours).
Key Architecture Trade-Offs & Decision Matrix
| Decision Factor | Choice A | Choice B | Selected Architectural Rationale |
|---|---|---|---|
| Communication Protocol | REST over HTTP/2 | WebSockets / gRPC | Use REST for stateless CRUD APIs; use WebSockets for low-latency bidirectional streaming. |
| State Management | Centralized Distributed Store | Local Memory with Sticky Sessions | Centralized Redis / Database state allows seamless container auto-scaling and zero-downtime rolling deploys. |
| Concurrency Control | Optimistic Locking (version column) | Pessimistic Locking (SELECT FOR UPDATE) | Optimistic locking delivers superior throughput for low-conflict consumer operations. |
Related Topics
Expand your knowledge by learning about adjacent concepts in system design.
Design a URL Shortener (TinyURL / Bitly Architecture)
Design a scalable URL shortening service capable of handling billions of redirects: Base62 encoding, distributed ID generation, database indexing, and 301 vs 302 redirect trade-offs.
Design Bitly (Scalable URL Shortener & Analytics Platform)
Design a high-scale URL shortening and click tracking service like Bitly or TinyURL capable of handling billions of redirects with sub-15ms latency.
Dropbox
System design answer key for designing a file storage and synchronization service like Dropbox, built by FAANG managers and staff engineers.
Cheat Sheet Utility
View and print a concise system design reference card.