Design Multi-Stage Ranking Serving Infrastructure for Feed Candidates
Last updated: November 29, 2026
Quick Overview
Design the serving infrastructure that takes tens of thousands of possible Facebook Feed candidates for a request and narrows them to a final ranked list of 50 through several model stages, within a tight latency budget.
Meta
November 29, 20260
0
0 solved
Design the serving infrastructure that takes tens of thousands of possible Facebook Feed candidates for a request and narrows them to a final ranked list of 50 through several model stages, within a tight latency budget.
Meta's feed and ads systems use cascades of increasingly expensive models. Infra interviews focus less on the model and more on stage budgets, feature fetching, GPU vs CPU inference, and graceful degradation.
What the Interviewer Expects
- Lay out the funnel: sourcing, early stage, late stage, final blending
- Assign latency and candidate budgets per stage
- Batch feature fetches and inference
- Choose hardware per stage
- Degrade gracefully under load
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- What happens if the late-stage model's latency doubles after a launch?
- How do you log training data from this cascade without bias?
- Where do integrity and diversity rules apply?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: for each feed request, gather candidates (friends, groups, pages, recommended), score them, apply business rules, and return ~50 ordered items.
Non-functional: total ranking budge...
High-Level Design
Funnel with budgets:
- Sourcing (~40 ms): several candidate generators in parallel produce ~5,000 items.
- Early-stage ranking (~40 ms): a light model (small MLP or two-tower dot product) on...