r/programming • u/patreon-eng • Jul 14 '26
How we rebuilt our notification platform to fanout millions of notifications without timing out
https://www.patreon.com/engineering/posts/how-we-scaled-notifs-with-fanout-162544709Patreon sends billions of notifications each year. As our largest creator audiences grew, a legacy task responsible for generating millions of recipient-specific notifications began consistently timing out.
This post explains how our team introduced a two-stage fanout architecture, isolated email, push and in-app processing, improved observability, and migrated more than 200 notification types across a 13-year-old codebase.
194
Upvotes
66
u/yellow_leadbetter Jul 15 '26
Spam as a service!
19
u/Psychological-Rub505 Jul 15 '26
It's a nicely written article, but it's quite underwhelming once you read it. Handling all notifications in a single async task was always a bad idea. I was expecting a more interesting solution, but in the end it was just batching and prioritization. Most of the complexity exists only because it had to be implemented within an already complex codebase.
17
u/VictoryMotel Jul 15 '26
What's the difference between 'fanout' and sending a message?
Also why is this difficult? A million a day is 12 per second. My phone should be able to do thousands.
82
u/[deleted] Jul 14 '26
[removed] — view removed comment