Product Context
Design the machine learning system behind Facebook Feed ranking for logged-in users. The goal is to generate a personalized ranked set of posts from friends, Groups, Pages, and recommended content while balancing engagement, freshness, and safety.
Scale
| Signal | Value |
|---|
| DAU | 350M Feed users |
| Peak Feed request QPS | 2.2M |
| Candidate post universe | 3B active posts over 30 days |
| New posts/day | 180M |
| Per-request p99 latency budget | 180ms |
| Feed items returned/request | 20-50 |
Task
- Clarify the product objective, primary prediction target, and key constraints for Facebook Feed.
- Propose an end-to-end architecture covering candidate retrieval, ranking, and re-ranking at Meta scale.
- Define what should run in batch versus online, including feature computation, model inference, and index refresh.
- Choose models for each stage and justify them with latency, quality, and cost tradeoffs.
- Explain how you would evaluate the system offline and online, including guardrails.
- Identify major failure modes, especially around feature drift, training-serving skew, and stale or biased recommendations.
Constraints
- Must support both heavy users and cold-start users with limited interaction history.
- Fresh posts should become eligible within minutes, not hours.
- Serving cost matters: the most expensive model cannot score millions of candidates per request.
- Must respect policy filters such as blocked accounts, integrity constraints, and locale/language restrictions.
- Assume some labels are delayed or noisy (for example, meaningful engagement may arrive after impression time).
- The system should degrade gracefully if a model, feature service, or ANN index is unavailable.