Fanout Strategy Selection Criteria
You'll learn: How to choose the right fanout approach (push, pull, or hybrid) based on measurable system characteristics and user behavior patterns.
When Theory Meets Reality
You've learned three fanout strategies, but which one should you actually use? The answer depends on quantifiable thresholds and system constraints—not guesswork.
The Decision Framework
Follower Count Thresholds
Push (fanout-on-write) works best when users have fewer than ~1,000-5,000 followers. Beyond this, writing to thousands (or millions) of feed timelines becomes prohibitively expensive and slow.
Pull (fanout-on-read) makes sense for celebrities with >100K followers. You avoid massive write amplification, though reads become more expensive per user.
Hybrid applies different strategies based on follower brackets: regular users get push, celebrities get pull, and "influencers" (10K-100K followers) might get selective push to active followers only.
System Load Considerations
Monitor your write-to-read ratio. If you have 100 reads per write, push fanout amortizes that cost beautifully. If reads are rare (say 1:1 ratio), pull might be cheaper since you avoid pre-computing unused feeds.
Current queue depth matters too. If fanout workers are backed up, you might temporarily switch high-follower users to pull to prevent cascading delays.
User Engagement Patterns
Track active follower percentage. If only 5% of a user's followers open their feed daily, pushing to 100% wastes resources. Selective fanout to recently-active users optimizes this.
Celebrity engagement (how often they post) also matters. A dormant celebrity account with 10M followers doesn't need aggressive optimization—pull works fine.
Tuning Your System
Start with conservative thresholds (e.g., push below 5K followers), measure latency and queue depth under real load, then adjust boundaries. These aren't universal constants—they depend on your infrastructure capacity and user behavior.
Key Takeaway: Choose fanout strategy by measuring follower counts, write/read ratios, system load, and active engagement—not by copying what you think Twitter does.