Design a personalized feed that ranks posts from friends and followed accounts with freshness and engagement signals. Reads dominate writes; the feed must feel real-time without recomputing the entire timeline on every page load.
Functional requirements
- Show a ranked feed of posts from friends and follows
- Support pagination or infinite scroll with stable ordering
- Fan-out new posts to followers’ timelines (push, pull, or hybrid)
- Surface ads or promoted content with basic relevance rules
Non-functional requirements
- Low latency for feed reads (p95 under a few hundred ms)
- High availability and graceful degradation on hot accounts
- Horizontally scalable ingestion and ranking paths