Classic design · Mid
Price tracker (CamelCamelCamel)
Classic interview design. Key points: job scheduling and price alerts.
Short answer
Classic interview design. Key points: job scheduling and price alerts. CamelCamelCamel is a service that tracks Amazon product prices over time and notifies the user when the price drops below the threshold they set. The source also describes a popular browser extension, with a million active users, that shows the history inside the product page and lets you subscribe to…
01 · CONTEXT
What the tracker needs to do
CamelCamelCamel is a service that tracks Amazon product prices over time and notifies the user when the price drops below the threshold they set. The source also describes a popular browser extension, with a million active users, that shows the history inside the product page and lets you subscribe to the alert with one click.
The core functional requirements are two: view a product's price history and subscribe to drop alerts with a threshold. Both must work through the website and the extension. This is a good exercise in requirements gathering.
Out of scope are product search and discovery on the platform, price comparison across retailers and integration of reviews and ratings.
02 · NON-FUNCTIONAL REQUIREMENTS
Scale, latency and being polite to Amazon
The source sets four goals: prioritize availability over consistency, accepting eventual consistency; handle 500 million Amazon products; answer history queries in under 500 ms; and deliver drop alerts within 1 hour of the price change.
| Requisito | As the source phrases it |
|---|---|
| Disponibilidade | Prioritize availability over consistency; eventual consistency is acceptable. |
| Scale | Handle 500 million Amazon products. |
| History query | Price history queries in under 500 ms. |
| Avisos | Drop alerts delivered within 1 hour after the price change. |
| Out of scope | Strong consistency for price data and real-time price updates, under one minute. |
The source sums up the problem's tension in one sentence: the system must be polite to Amazon while still delivering useful price tracking to millions of users.
03 · HIGH-LEVEL DESIGN
From history to subscription
A high-level proposal separates three paths: reading the history, recording the subscription and collecting prices. Price data forms a time series, which fits the topic of time series. Collection runs asynchronously with respect to user queries, with data pipeline e message queues.
In the proposed design, the website and the extension talk to the same API, which routes each request to the right service.
Reading the history goes through the history service, which queries the price series storage.
The subscription follows another path: the subscription service writes the chosen threshold to a relational database.
Collection is a separate path: the scheduler puts requests on the queue and the collectors consume them.
Each collector queries the external source and writes the observed price to the history, without going through user queries.
04 · DEEP DIVES
The four hard questions
The public page lists four deep dives: how to discover and track 500 million products efficiently; how to handle potentially malicious price updates from extension users; how to process price changes and notify subscribers; and how to serve fast history queries to generate charts.
The full text of the source, with the answers, requires a Premium subscription. For that reason, the rest of this case treats the four questions as study reasoning and does not attribute solutions to the source.
05 · REASONING
How to approach each question
Coverage and collection pace: to scan a huge catalog without overloading the source, the scheduler decides which products to check and how often, and the collectors limit the request rate. Products with many subscriptions or volatile prices can be checked more often than rarely searched ones.
Extension reports: a price reported by a user is untrusted source data. One approach is to treat it as a signal, comparing it with our own collection and with reports from other users before writing it as an observation.
The client requests a product's history through the API.
The history service first looks in the cache of already-assembled series.
When the series is not in the cache, the service reads it from the price storage.
A price reported by the extension goes through the validator before reaching the storage.
Alerts: each recorded price change becomes an event; evaluators compare the new price with the registered thresholds and request delivery through a separate queue. This design uses the message queues.
Each new price written to the history becomes a change event on a queue.
The threshold evaluator consumes the change event.
To decide, the evaluator queries the product's subscriptions and thresholds.
When a threshold is hit, the alert request goes through its own queue to the sender and reaches the user.
Frequently asked questions
What is Price tracker (CamelCamelCamel)?
Classic interview design. Key points: job scheduling and price alerts.
What does the Price tracker (CamelCamelCamel) design cover?
It is organized in these sections: What the tracker needs to do, Scale, latency and being polite to Amazon, From history to subscription, The four hard questions, and How to approach each question.
How long is Price tracker (CamelCamelCamel) and what level is it?
It takes about 14 minutes to read and is rated Mid level.
Now design it yourself
Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.