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
System Design
Machine Learning Engineer
Meta
November 29, 2026
Machine Learning Engineer
System Design Round
System Design
Medium

0

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
Ranking cascade
Feature fetching
Model inference serving
Latency budgets
Load shedding
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. 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 Problems
Sample 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:

  1. Sourcing (~40 ms): several candidate generators in parallel produce ~5,000 items.
  2. Early-stage ranking (~40 ms): a light model (small MLP or two-tower dot product) on...

Submit Your Answer
Markdown supported