Skip to content
SD-30 · System design

Design a Price Alerts

Asked at Mid level45 minutes
Our answers stay hidden until you reveal them.

Design a feature for a large online store where shoppers say “tell me when this product drops below €300”, and get a push notification or an email when it does. Shoppers can list, edit and delete their alerts, and an alert should fire once per drop, not on every small wiggle of the price.

The store has 100 million products and 40 million shoppers holding 200 million active alerts. Prices change about 200 million times a day, but not evenly: on a sale day the pricing team reprices whole categories at once, and changes reach 50,000 a second, with about 1 in 5 crossing someone’s target. The hard part is reacting to each change quickly without scanning every alert, sending a burst of 10,000 notifications a second without blocking the matching, and never spamming a shopper as a price bounces around their target.

Good questions to ask first

Decide what you would assume for each before you look at ours.

  1. 1Which conditions?
  2. 2Where do prices come from?
  3. 3How fast must an alert arrive?
  4. 4How many alerts?
  5. 5Which channels?
  6. 6What if the price bounces around the target?
  7. 7Do alerts expire?
  8. 8Stock prices too?

How to spend the 45 minutes

  1. 5minPart 1: Requirements and scope
  2. 5minPart 2: Estimates
  3. 5minPart 3: API
  4. 15minPart 4: Architecture, stage by stage
  5. 15minPart 5: Deep dives and trade-offs
Sketch your own design: boxes, arrows and the numbers that matter. Then compare it with ours.Break it in the labVisual walkthrough