Meta Feed Ranking Algorithm
Meta's feed ranking system: machine learning pipeline, A/B testing, and personalized content delivery at scale.
What is feed ranking?
Feed ranking is the system that decides which eligible posts to show a person, and in what order, when they open a social app. It does not search every post on the internet. It gathers a manageable set of possible posts, predicts several outcomes for each one, then applies rules to form a safe and varied feed.
In plain language: a good feed is not the set of posts most likely to get a click. It is a time-bounded decision that balances relevance with safety, freshness, diversity, and the product's long-term health.
Core invariant
A post may enter a feed only when it is eligible for this viewer and it passes the final slate policy. A high predicted engagement score never overrides a hard safety, privacy, availability, or repetition rule.
This case study uses an illustrative planning envelope of 900K peak feed opens per second, 1,000 retrieval candidates per request, and a 150 ms P99 decision budget. The figures make the architecture concrete; they are not claims about a specific production deployment. Review recommendation systems and caching first if candidate retrieval or cache freshness is new.
The product returns a policy-governed slate, not just a sorted list
A feed request returns a small ordered slate of posts. Each position should be relevant enough to earn attention, but the sequence must also avoid prohibited, duplicated, stale, or overly concentrated content. The system learns from what people view, skip, hide, share, report, and follow after the response is already delivered.
Functional requirements
- Retrieve candidates from followed accounts, social graph activity, topic or creator recommendations, and bounded exploration pools.
- Filter candidates for audience, geography, age, privacy, integrity, availability, and viewer-level blocks before ranking.
- Predict several outcomes, such as meaningful interaction, negative feedback, likely satisfaction, and policy or quality risk.
- Return an ordered slate, explainable reason codes, and stable pagination or cursor semantics.
- Record exposures and downstream actions asynchronously for experiments, model training, abuse review, and creator analytics.
Non-functional requirements
- Keep the online decision within a 150 ms P99 budget, including retrieval, feature reads, scoring, constraints, and response assembly.
- Keep policy changes effective quickly enough that a cached candidate cannot outlive an urgent restriction.
- Preserve a safe, bounded-age fallback during ranker, feature, or fanout trouble.
- Make experiments reversible and diagnosable by recording candidate, model, feature, and policy versions for each exposure.
Scope boundary
This lesson designs organic-feed candidate selection and ranking. Ad auctions, content creation, human-review operations, notifications, and a complete social graph store are separate systems, even though they provide inputs or constraints here.