Chapter 50
Know the Tricks, Part 1
1. Social Media Feeds (Twitter, Instagram, Facebook)
The Trick: Hybrid Fan-Out (Push + Pull)
When a regular user posts, their content is pushed (fan-out on write) to all followers' pre-computed feed caches. Fast reads, bounded write cost.
When a celebrity (100K+ followers) posts, nothing is pushed. Instead, followers pull celebrity posts on demand when they open their feed, merging them with their pre-computed cache.
