Lesson 13 of 15
37. Design a News Feed

Variations to practise

3 min read+10 XP

Chapters used

Approach (1), Estimation (2), Unique IDs (10), Blob storage (11), Caching (12, 13), Sharding (15), Message queues (22), Pub/sub and fan-out (23), APIs and pagination (24), CDNs (26).

Try these variations

Each is a common follow-up. Answer in two minutes, then check the sketch.

  1. "Delete a post." → Mark it deleted in the posts store; filter deleted IDs at hydration instead of removing them from millions of feeds.
  2. "Private accounts." → Fan out only to approved followers; check visibility at hydration too.
  3. "Show like counts live." → Counters updated asynchronously and cached per post; the feed shows a slightly stale count.
  4. "10× users." → More fan-out workers and cache shards; lower the celebrity threshold so fewer posts are pushed; cap feed length lower for less active users.