Opening Scenario

The product team wants push notifications for every meaningful event: friend requests, comments, mentions, shipping updates, price drops, breaking news for opted-in users. At launch the user base is 5M; the projection is 50M within 18 months. Notifications must arrive within seconds of the triggering event, must honor per-user preferences (quiet hours, channel choices, mute lists), must dedupe so a single comment doesn't fire ten pushes, and must back off when a device is offline. A junior engineer drew a diagram with one big service calling APNS, FCM, and an SMS gateway directly from a request handler. You have to redesign it as a real streaming system before code is written.


Question Progression

1. Why isn't synchronous "call APNS from the request handler" the answer?

Question. A comment is posted. The simplest design: in the comment-creation handler, look up subscribers and call the push service for each. Why is that wrong at scale?

In the full tutorial

  • When to Reach for This

Glossary history

Click dotted jargon to save explanations here.