Design a Notification System – senior-level system design challenge

Your app sends push notifications through a provider that accepts 2,000 a second. Breaking news is about to multiply events 20×. Deliver every notification within a minute without the provider rejecting any.

Requirements

Goal

Hold p99 latency under 300ms, error rate under 0.5%, cost under $6,000/month through every stage of the test plan, then compare your design with a reference design.

The test plan

  1. Normal: 500 requests per second.
  2. Breaking news: 10,000 requests per second.
  3. Catching up: 500 requests per second.

Hint

Calling the provider from the request path ties every API thread up for a quarter of a second, and a spike sends more than it accepts. Acknowledge events onto a queue, and size the workers just under the provider's limit: more workers only get rejected faster. The queue turns the spike into a short delay.

Solve it on the live simulator, free and in your browser.

Read the guide

More system design challenges