Design Stable Feed Pagination While Ranking Changes Between Pages

Last updated: November 29, 2026

Quick Overview

Design pagination for Facebook's ranked News Feed so that infinite scroll does not show duplicates or skip posts, even though new posts arrive and scores change between page requests.

Meta
System Design
Software Engineer
Meta
November 29, 2026
Software Engineer
Onsite
System Design
Medium

0

0

0 solved


Design pagination for Facebook's ranked News Feed so that infinite scroll does not show duplicates or skip posts, even though new posts arrive and scores change between page requests.

Ranked feeds cannot use simple offset or timestamp cursors, and Meta interviewers use this to see if candidates understand session-scoped state. The check is whether you separate the ranked snapshot from fresh content injection.

What the Interviewer Expects
  • Explain why offset and timestamp cursors fail for ranked feeds
  • Introduce a feed session with a server-side or encoded snapshot
  • Handle new content arriving mid-session
  • Deduplicate across pages and pull-to-refresh
  • Bound memory for session state
Key Topics to Cover
Cursor design
Session state
Ranking
Deduplication
Cache TTL
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
  • How would you do this statelessly?
  • What happens when the user returns after two hours?
  • How do you inject an ad slot without breaking the cursor?
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: first page returns ~10 posts; subsequent pages continue without repeats; pull-to-refresh shows new content at the top.

Non-functional: each page under 200 ms; millions of concurre...

High-Level Design

On the first request the feed service gathers ~500 candidates, ranks them, and stores the ordered list as a feed session in a cache keyed by session_id with a TTL of ~30 minutes. The respons...


Submit Your Answer
Markdown supported