← Meta Interview Insights

Meta·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
May 2026

Summary

Meta system design round, just one question about the Facebook newsfeed. Short and focused, which somehow made it more stressful.

Questions Asked (1)

Q1

Design the Facebook Newsfeed system.

System DesignTechnical Trade-offsData Modeling
Author's notes

I'd done this one before so I felt okay going in, but I spent way too long on the feed ranking piece and barely touched storage or the fanout problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then estimate scale (e.g., 2B users, 1B daily active). Propose a high-level architecture with a fan-out-on-write approach for feed generation, and dive into data modeling, storage choices, and trade-offs for ranking and consistency.

Pro tip: Emphasize the hybrid fan-out model (push for most users, pull for celebrities) and discuss how to handle the 'thundering herd' problem when a celebrity posts. This shows you understand real-world trade-offs at Meta's scale.

1. Clarify Requirements

Ask about functional requirements (post creation, feed retrieval, ranking, real-time updates) and non-functional (latency, availability, consistency). Define scale: 2B users, 1B DAU, 500M posts/day.

2. High-Level Design

Sketch components: clients, API gateway, post service, feed service, graph service, ranking service, and storage (SQL/NoSQL, cache, graph DB). Explain data flow for posting and feed retrieval.

3. Deep Dive into Feed Generation

Discuss fan-out on write vs. read, and propose a hybrid approach. Detail how to store precomputed feeds (e.g., Redis lists) and handle celebrity posts with pull-on-read.

4. Data Modeling and Storage

Design schemas for posts, friendships, and feeds. Choose databases: e.g., MySQL for posts, TAO for social graph, Redis for feed cache, and consider sharding by user ID.

5. Trade-offs and Scalability

Discuss trade-offs: latency vs. consistency, storage cost vs. read speed. Address bottlenecks: hot keys, cache invalidation, and how to scale ranking (ML models, feature store).

Key Points to Mention

  • Hybrid fan-out: push for normal users, pull for celebrities to avoid write amplification.
  • Caching strategy: Redis for feed cache, with TTL and invalidation on new posts.
  • Ranking algorithm: edge rank or ML-based ranking, considering recency, affinity, and engagement.
  • Data partitioning: shard by user ID for posts and feeds, use consistent hashing.
  • Real-time updates: use WebSockets or long polling for live feed updates.
  • Handling failures: graceful degradation, eventual consistency, and fallback to older feed.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.