Skip to content

Design a Notification System, stage 1 of 11: model

What the numbers say

Start with arithmetic and the provider's contract. Eight million notifications a day, a 500/s email limit, a five-million-user announcement, and a 30-second promise for security alerts.

System so far· 3 parts
12SERVICEProduct servicesLOG / STREAMEvent streamWORKERNotificationplanner

Select a component to see what it is responsible for and which state it owns.

  1. 1Product services → Event stream: Domain events via outbox
  2. 2Event stream → Notification planner: Events, at least once

What you need to know

0 of 3 checks done
  1. When a provider caps your sending rate, that cap is a shared budget. Every email of every kind draws from it: security alerts, comment notifications and marketing alike. The first numbers to work out are how long the big jobs occupy that budget, and what is left for everything else meanwhile.

  2. Work it out

    An announcement goes to 5 million users, and the provider allows 500 emails a second. About how many hours does it take?
    hours