Practice: Design a Price Tracker
Price tracking service inspired by CamelCamelCamel and Google Flights alerts: partners report prices, price history pages are cached and served from the edge, and drop alerts are sent in the background.
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
- Show a product's current price and its price history chart on a page that loads fast
- Accept new prices from partners and crawlers, and record each as a point in the product's history
- Let a person set a target price and get an alert when the price drops to it or below
- Send the alert by email or push in the background, once per drop, not once per price update
- Keep at least a year of price history per product
- Limit and validate incoming price updates so one bad feed cannot overwrite many products
Non-functional requirements
- Price page < 100ms p99, served from the CDN and price cache
- A new price is visible on the page within 1 minute
- Alerts sent within 5 minutes of a price drop, and never duplicated
- Handle 10K page requests per second at peak and 100 price updates per second
- Scale to 100M tracked products; history is stored compactly (only changes, not every check)
- 99.99% availability for reading prices; price intake can lag without breaking pages
- 99.99% durability for price history