Mock Interviewer
Ask Coach
Tap a question to start, or type your own below.
Facebook Post Search System Design
Visual Problem Diagram

Scenario
A user searches Facebook posts for "beach wedding 2019" and expects results from public posts, friends, groups, and their own history. The hard part is not only finding matching words. The system must never show a private, blocked, deleted, or moderated post to the wrong viewer, even when the search index is a few seconds behind the source of truth.
Design search over social posts such as user posts, group posts, captions, links, and optionally media-derived text. The system should support keyword search, filters, ranking, pagination, and near-real-time updates while respecting who may see each post.
Constraints
Index posts, update and delete indexed documents, search by keyword and filters, rank results, enforce visibility, return cursor-based pages.
No privacy leaks, p95 search around a few hundred milliseconds for common queries, near-real-time indexing for normal writes, faster protection for deletes and takedowns.
Billions of posts, many index shards, millions of searches per day, highly skewed terms, and social-graph checks on the hot read path.
Stages ahead
Log in to start practicing
Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.