Design Feed Seen-State Tracking to Avoid Reshowing Posts
Last updated: November 29, 2026
Quick Overview
Design the service that remembers which posts each Facebook user has already seen so ranking can demote or skip them on the next feed load, across phone, web, and tablet.
Meta
November 29, 20260
0
0 solved
Design the service that remembers which posts each Facebook user has already seen so ranking can demote or skip them on the next feed load, across phone, web, and tablet.
A compact design question that still touches real Meta feed infrastructure: impressions are huge in volume, but the ranker needs a fast membership check. Interviewers check whether you pick a compact, bounded data structure and define what 'seen' means.
What the Interviewer Expects
- Define a seen event precisely (viewport time threshold)
- Choose a bounded per-user structure
- Make lookups fast enough for the ranking path
- Sync across devices
- Expire old state
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
- Would you use a Bloom filter here? What happens on a false positive?
- How do you handle a post the user saw but scrolled past in 100 ms?
- How large is the state for a heavy user?
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: client reports impressions; the feed ranker can ask 'has user U seen post P, and how long ago?' for ~1,000 candidates per request; works across devices.
Non-functional: check adds...
High-Level Design
Clients batch impression events: post_id, dwell time, timestamp. A seen-state service writes them into a per-user record in a key-value store keyed by user_id. The ranker fetches the record on...