Designing a Social Home Feed: Fan-Out, Pagination and Visibility

Reported in interviews at Mercor

Problem statement

How would you build a social app's home feed? Reads greatly outnumber posts, and a few authors have enormous audiences. The ranked feed must load quickly and stay fresh, scrolling must avoid duplicates and skipped posts, and deletion or privacy changes must take effect promptly.

Explain fan-out, pagination, visibility, and the ranked read path with fallbacks and monitoring.

Show hint

Compare the cost of building a timeline when a post is written with the cost of building it when someone reads, and ask which accounts break each approach.

Relevant roles: ML Engineer, Forward Deployed Engineer and AI Engineer.

Related free problems