Design a home timeline (Twitter/Instagram style) that shows recent posts from accounts a user follows.
How to approach it
Turn the open-ended prompt into a concrete contract. Separate functional requirements (what the system does) from non-functional ones (latency, availability, consistency, scale), and state non-goals so you do not overbuild. Ask one or two clarifying questions that actually change the design — read/write ratio, scale, and consistency needs are usually the highest-leverage.
Functional requirements
- Publish a post
- View a home timeline of followed accounts
- Follow / unfollow
- Rank or order by recency
Non-functional requirements
- Timeline read p99 < 200ms
- Reads ≫ writes
- Eventual consistency acceptable
- Handle celebrity fan-out
Out of scope
- Full ML ranking model
- Direct messaging
- Ads auction
Tip
First clarifying question — Chronological or ranked? And what is the largest follower count we must support?