Menu
Back to Discussions

Real-time notifications at scale: fan-out on write vs fan-out on read

Anna Suzuki
Anna Suzuki
·256 views
we're designing a notification system for a social platform with around 10 million users, and we're debating between fan-out on write versus fan-out on read. fan-out on write, where a notification is written to each recipient's inbox at the time of creation, seems expensive, especially for celebrity users with millions of followers. this could lead to massive write amplification. fan-out on read, where notifications are generated dynamically when a user checks their feed, is slower for the user and puts more load on the read path. given the power-law distribution of followers on social platforms, a hybrid approach seems like the only viable option. what strategies have people used for hybrid fan-out models that balance write efficiency for high-follower accounts with read performance for the average user? specific data stores or architectural patterns that support this effectively would be helpful.
4 comments

Comments

Sign in to join the conversation.

Loading comments...