System Design News Feed: Interview Talk Track
A system design news feed interview talk track is a staple because it forces distribution math: who sees a post, when, and at what cost. Candidates commonly practice celebrity vs normal users, fan-out on write vs read, caching, and light ranking. This is a structured script for the whiteboard—not confidential company material.
Clarify before you draw
- Home feed (followed people) vs explore/discovery?
- Text + images, or video too?
- Strict reverse-chrono, or ranked?
- Soft real-time (seconds) or eventual (minutes) OK?
- Scale: DAU, follows per user, posts per day?
- Mutations: edits/deletes, blocks, unfollows?
Talk track:
“I’ll design a home feed for follow graphs with near-real-time delivery for normal users, hybrid fan-out for celebrities, reverse-chrono first, then a ranking hook. Deletes/blocks must disappear quickly from feeds.”
Write assumptions. Let the interviewer tighten scope.
APIs
POST /v1/posts{ text, mediaRefs[] }→{ postId, ts }GET /v1/feed?cursor=→ page of post stubs + author metadataPOST /v1/follows/{userId}/ unfollow- Optional:
POST /v1/posts/{id}/like
Pagination: cursor on (ts, postId); discuss why offset pages hurt.
Capacity sketch
Example method:
- 100M DAU, 2 posts/user/day average → hundreds of millions of posts/day (adjust live)
- Average user follows 200 people → naive fan-out on write can explode for high-degree authors
- Read QPS on feed endpoints dominates; cache aggressively
Talk track:
“Reads dwarf writes. The core design choice is whether we precompute feeds on write or merge on read—and how celebrities break the precompute path.”
Fan-out on write vs read
| Strategy | Idea | Best for |
|---|---|---|
| Fan-out on write | On post, push postId into followers’ feed caches/lists | Normal users, bounded followers |
| Fan-out on read | On feed read, fetch recent posts from followees and merge | High-degree authors / sparse posters |
| Hybrid | Write for normal; read-merge for celebrities | Real systems candidates describe |
Talk track:
“Default fan-out on write into a per-user timeline store. If follower count exceeds a threshold, skip write fan-out and merge that author’s posts at read time.”
Candidates commonly report that naming the hybrid threshold is stronger than defending a pure approach.
Data model
User,Follow(follower, followee, ts)Post(postId, authorId, ts, text, media)FeedTimeline(userId, postId, ts, authorId)for precomputed feeds- Celebrity set / degree metadata for hybrid routing
Storage notes: timelines as Redis lists/streams or wide-row stores; posts in durable DB + blob/CDN for media.
Feed read path
- AuthN
- Read precomputed timeline page for user
- For celebrity followees, pull recent posts and merge-sort by ts
- Hydrate post bodies + author cards from cache
- Apply filters: blocked authors, deleted posts
- Return stubs; client may fetch media separately
Talk track:
“Hydration is cached and separate from timeline pointers so fan-out stores stay small—IDs and timestamps, not full payloads.”
Ranking (keep optional and light)
If interviewer wants ranking:
- Start with reverse-chrono correctness
- Add features: recency, affinity, engagement rates
- Rank within a candidate set (recent N posts), not global ML in the first draft
- Mention offline training / online serving briefly; do not derail into a recommender thesis unless asked
Caching and invalidation
- Hot post bodies and user cards in cache
- Timeline cache with TTL + push updates on write fan-out
- Deletes: mark post tombstone; filter on read; async scrub timelines if needed
- Unfollow: stop new fan-out; optionally leave old posts (product decision—state it)
Failure modes
- Celebrity post storms → protect write path with async queues; degrade to read-merge
- Cache stampedes on viral posts → request coalescing
- Inconsistent clocks → IDs with time component + tie-break
- Graph hot partitions → shard follows by userId
Celebrity threshold you can defend
Pick a concrete number and invite pushback:
“If follower count exceeds ~10k, I’ll skip write fan-out for that author and merge on read. The threshold is tunable from cost dashboards.”
That sentence shows product/systems judgment without fake precision.
Push notifications vs in-app feed
Do not conflate them. Notifications are a sparse signal path; the feed is a query path. Push can wake the client to refresh; it should not carry full post payloads for everyone.
Consistency after unfollow/block
State the product rule:
- Unfollow: stop new posts; historical posts may remain until scroll-off
- Block: hide immediately on read filters; async scrub optional
Interviewers often care that you named the user-visible behavior.
Soft practice note
Feed interviews reward crisp tradeoff talk. If you want a calm timed loop to rehearse this system design news feed talk track, Luna Interview is built for structured practice—not for rule-breaking during a live interview.
Day-of checklist
- [ ] Home feed scope + ranking stance
- [ ] Hybrid fan-out explained with threshold
- [ ] Timeline pointers vs hydrated bodies
- [ ] Cursor pagination
- [ ] Delete/block behavior
- [ ] Cache layer named
- [ ] One scale number walked aloud
Start reverse-chrono and hybrid fan-out; deepen ranking only when invited. That pacing reads as senior more often than a premature ML digression.
Rehearse with an AI interview copilot, then browse commonly reported interview questions.