Preparing your design workspace

Loading the problem and your latest saved attempt…

Design Flash-Sale Notification Fanout

When a flash sale opens, accept a push for every subscribed shopper and keep retries from showing a second push for the same shopper and event.

Problem statement

Design a notification fanout for an ecommerce flash sale. The hard product pressure is accepting millions of sale-open pushes, not running checkout.

For this exercise, assume sale-open triggers a push notification to every subscribed shopper for that event. For this exercise, assume 20 million notifications must be accepted within 10 minutes at sale open, with p99 enqueue under 200 ms.

For this exercise, assume checkout, payments, and inventory reservation are out of scope. For this exercise, assume delivery is at-least-once; exact retries must not create a second user-visible push for the same shopper and event. For this exercise, assume one event, one open, and subscribers are already stored.

For this exercise, assume a focused follow-up will ask how the existing design keeps fanout correct if the sale-open trigger is retried or workers overlap. For this exercise, assume the controlled delivery endpoint or client can deduplicate a stable notification identity before displaying it.

A backend receipt alone cannot prevent duplicate device display after an uncertain external send.

What to build

  1. When the sale opens, every subscribed shopper for that event is accepted into the push-notification pipeline.
  2. An operator can trigger sale-open and observe how many notifications have been accepted.
  3. A shopper sees at most one push for the event even if the open trigger or workers are retried.
  4. The pipeline may deliver at least once, but an exact retry must not create a second user-visible push.

At scale

  • For this exercise, assume 20 million notifications must be accepted within 10 minutes at sale open.
  • For this exercise, target p99 enqueue latency under 200 ms for an accepted notification.
  • For this exercise, assume one event and one open; subscribers are already stored before the open.
  • For this exercise, measure acceptance into the pipeline, not a device-delivery SLA.