Sitemap

πŸš€ π’πœπšπ₯𝐒𝐧𝐠 𝐭𝐨 𝐁𝐒π₯π₯𝐒𝐨𝐧𝐬: 𝐇𝐨𝐰 𝐭𝐨 π‡πšπ§ππ₯𝐞 𝐭𝐑𝐞 β€œπŒπžπ¬π¬π’ π„πŸπŸπžπœπ­β€ 𝐒𝐧 π…πžπžπ πƒπžπ¬π’π π§

2 min readJan 30, 2026

--

As a backend developer, building a real-time feed like Facebook or X (Twitter) for billions of users isn’t just about speed β€” it’s about managing write amplification.
When a user posts, how do their friends see it in milliseconds? Most systems use a Fan-out (Push) approach:
The Workflow: When you post, the system β€œpushes” that post ID into the pre-computed feeds (usually in Redis/Memcached) of all your followers.

The Benefit: Reading your feed is lightning-fast because it’s already built.
The Bottleneck: This works for me and you. But what happens when Lionel Messi posts to his 500M+ followers?

Get Jubair Abdullah’s stories inΒ yourΒ inbox

Join Medium for free to get updates fromΒ thisΒ writer.

⚠️ The Celebrity Problem
If we use a pure Fan-out/Push model for a celebrity, a single post triggers 500 million write operations to different caches instantly. This causes massive β€œhotkey” issues, cache invalidation storms, and can easily crash your database clusters.
πŸ’‘ The Solution: The Hybrid Approach
To keep the system smooth, we treat β€œCelebrities” and β€œNormal Users” differently:
For Normal Users (Push): We continue using the Fan-out model. The scale is manageable, and it keeps read latency low for the average user.
For Celebrities (Pull): We stop pushing their posts to followers’ caches. Instead, when a follower logs in or refreshes their feed, the system β€œpulls” the celebrity’s recent posts and merges them into the user’s feed on the fly.
The Result: We trade a tiny bit of read latency for the follower to save the entire infrastructure from a write-heavy meltdown.
πŸ› οΈ Key Takeaway
Architecture isn’t about finding one β€œperfect” tool; it’s about identifying different traffic patterns and applying the right strategy to each.
How would you handle the β€œCelebrity” notification problem? Let’s discuss in the comments! πŸ‘‡

Press enter or click to view image in full size

hashtag#SystemDesign hashtag#BackendEngineering hashtag#Scalability hashtag#Redis hashtag#SoftwareArchitecture hashtag#TechCommunity

--

--