Feed Consistency Requirements
What you'll learn: How to balance staleness tolerance and ordering guarantees when designing a social media feed.
The Trade-Off
When building a social feed, you face a fundamental question: How up-to-date must every user's view be? Must Alice see Bob's post the instant he publishes it, or is a 30-second delay acceptable? This choice directly impacts your architecture's complexity and cost.
Eventual Consistency Is Usually Sufficient
Unlike a bank balance (where every cent matters immediately), social feeds naturally tolerate eventual consistency—the idea that all users will eventually see the same posts, but not necessarily at the exact same moment.
Why This Works
- Users don't know what they're "missing" in those few seconds
- A 10-30 second delay feels instantaneous in social contexts
- Small delays enable massive scaling wins: caching, async propagation, fan-out optimizations
When Order Matters (Sort Of)
Within a user's feed, you typically want partial ordering:
- Posts from the same author should appear in publish order
- Timestamps guide ranking, but perfect global order across millions of posts isn't critical
- Minor re-ordering (e.g., due to different replica reads) rarely harms user experience
Strict Consistency Is Expensive
Requiring every user to see every post immediately in perfect global order demands:
- Synchronous fan-out to all followers (slow writes)
- No caching layers (kills read performance)
- Distributed transactions across shards (high latency)
For a social feed's use case, this cost rarely justifies the marginal benefit.
Key Takeaway: Social feeds thrive on eventual consistency with loose ordering—prioritize low-latency reads and scalable writes over perfect real-time synchronization, as users tolerate seconds of staleness far better than slow page loads.