Design Facebook News Feed
Design a social media news feed system where users can post content and view a ranked feed containing posts from followers, sponsored ads, and news articles with images.
Asked at:
Meta

Amazon
Flex
A social media news feed is the personalized, scrollable home screen where people see posts from friends and creators, interleaved with sponsored ads and relevant news articles (often with images). Think Facebook, Instagram, or Twitter/X: users publish content, then consume a ranked feed tailored to their interests and relationships. Interviewers ask this because a feed exercises core system design skills: high-read, high-fanout workloads; ranking and relevance; real-time updates; caching and storage strategies; and blending multiple content sources (organic posts, ads, news) under strict latency budgets. You’re expected to reason about trade-offs (fanout-on-write vs fanout-on-read), deal with hotspots (celebrities), and design a production-ready path to low-latency, personalized results.
Common Functional Requirements
Most candidates end up covering this set of core functionalities
Users should be able to create and publish posts with text and images.
Users should be able to view a personalized, ranked home feed that blends posts from people they follow, sponsored ads, and news articles with images.
Users should be able to interact with feed items (like, comment, share) and see engagement counts update promptly.
Users should be able to continuously scroll and receive fresh content with low latency, including near real-time updates when new items are available.
Common Deep Dives
Common follow-up questions interviewers like to ask for this question
A strong feed needs both good ranking and a fast read path. In a system design interview at Meta, interviewers listen for a staged approach (candidate generation, scoring, blending) and concrete latency tactics. Show you can control P95/P99 while meeting product constraints like ad density and content diversity. - Consider a multi-stage pipeline: candidate generation (follow graph, interest/topical signals), lightweight scoring using precomputed features, then a blender that enforces constraints (e.g., at most 1 ad per N items, news diversity). You could keep per-source candidate pools hot in Redis to bound tail latency. - Use a hybrid approach: precompute short home timelines for active users and on-demand rank for cold-start users. Backfill and refresh via Kafka-driven workers; store append-only timelines (e.g., Cassandra) for fast merges. - Optimize the read path: target one network hop for critical data, co-locate timeline shards with caches, and pre-merge heavy followee lists. Micro-batch ad/news candidate retrieval to avoid chatty fanouts.
Fanout is where scale breaks first. Naively pushing every post to every follower or pulling from thousands of followees on read can explode costs. Interviewers want to hear a hybrid strategy and how you deal with contention for high-degree nodes. - Use a hybrid: fanout-on-write for average accounts; fall back to pull-on-read for hot accounts (celebrities). Maintain per-author outboxes and per-user home timelines, merging on read only for flagged hot authors. - Buffer writes with Kafka and use consumer groups to build timelines asynchronously. Apply backpressure and rate limits per partition to avoid thundering herds. - Shard by user ID to distribute load; apply the dealing-with-contention pattern with isolated queues or priority lanes for hot partitions to protect the rest of the system.
Real-time polish matters in a modern feed, but over-pushing can be costly. Show you can choose the right transport and push minimal invalidations that let clients fetch deltas efficiently. - Pick transports by platform: long polling or Server-Sent Events for broad reach, WebSockets for power users. Push invalidations (IDs, badges) not full payloads; let clients fetch batched deltas. - Fan out invalidations via pub/sub (Redis channels or Kafka consumers) to web tiers; batch updates and coalesce counters to reduce churn. - Implement adaptive policies: frequency capping, exponential backoff on reconnect storms, and fallbacks to periodic polling when connections are flaky.
Caching is essential to hit <200 ms latencies at scale, but stale results can harm relevance. Interviewers want to see precise cache keys, TTLs, and how you avoid expensive cache busts when signals arrive continuously. - Cache per-user home timeline heads (IDs plus lightweight scores) and per-author outboxes in Redis. Keep content objects in a separate cache; use compact IDs/pointers to reduce payload size. - Invalidate precisely: on engagement events, update scores asynchronously via Kafka consumers and adjust ranks in-place when possible. Avoid full cache invalidation; use small delta updates or versioned lists. - Store images in blob storage behind a CDN and pre-generate thumbnails. Let the app serve signed URLs; don’t route large blobs through the feed service.
Relevant Patterns
Relevant patterns that you should know for this question
Users expect new posts and engagement counts to appear quickly. Real-time updates balance immediacy with cost by pushing lightweight invalidations and enabling fast client-side delta fetches, which is standard for a modern news feed.
Celebrities and viral posts create hotspots that can overwhelm fanout pipelines. Applying this pattern lets you isolate hot shards, adopt hybrid fanout strategies, and protect the broader system from thundering herds.
The home feed is a read-heavy workload with strict latency SLOs. This pattern guides precomputation, caching, and sharding choices so you can serve personalized results quickly at high QPS.
Relevant Technologies
Relevant technologies that could be used to solve this question
Similar Problems to Practice
Related problems to practice for this question
This is essentially the same architecture: personalized ranking, hybrid fanout, high read QPS, and ad insertion under strict latency budgets.
Instagram’s home feed shares the same challenges—image-heavy posts, hybrid fanout, caching, and real-time updates—making its solutions directly transferable.
Blending and ranking news articles with diversity and freshness constraints mirrors the news component of this feed, including candidate generation and multi-stage scoring.
Red Flags to Avoid
Common mistakes that can sink candidates in an interview
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid September, 2025

Amazon
Senior
Design a News feed where people can see events happening around the world. Allow only journalists to add posts.
Late August, 2025
Meta
Senior
Late August, 2025
Flex
Mid-level
Your account is free and you can post anonymously if you choose.