The hardest part: How do you build timelines?
Fanout on write: When user posts, push to all followers' timelines immediately. Fast reads. Expensive for users with millions of followers.
Fanout on read: When user reads timeline, fetch tweets from all followed users. Slow reads. Cheap writes.
Hybrid (Twitter's approach): Fanout on write for normal users. Fanout on read for celebrities (>K followers). Best of both.