Design the Twitter Timeline
Design the home timeline of a Twitter-like service where users post short messages and see posts from people they follow.
Social media feed · Medium
Functional requirements
- Post a tweet
- Home timeline of followed accounts, newest first
- Search tweets by keyword
Scale & non-functional requirements
- 300M daily active users
- Timeline loads in under 300 ms
- Eventual consistency is acceptable
Hints
- Precompute timelines or build them on request?
- How do you handle accounts with huge follower counts?
- Which component powers search?