YOUR BRIEF
What to work through
Work through facebook post search as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.
- Create and like posts
- Search posts by keyword
- Sort results by recency or by like count
BEFORE YOU START
Constraints to discuss
- Median query answers in under 500 ms
- A new post is searchable within 1 minute
- Every post can be found, old or unpopular ones too, even if slower
- High request volume and high availability
Need a starting point?
Watch for these common gaps as you prepare:
- Assuming search is read-heavy when writes dominate
- Expecting sharding or replicas to fix an unindexed scan
- Sorting all matches at query time
- Estimating numbers that change no decision
- Not asking whether personalisation is a firm requirement, which kills caching