Design a News Feed
The home timeline of Twitter, Instagram or Facebook: posts from people you follow, ranked, fresh, and fast for hundreds of millions of users.
5 questions on this site are reported in X software engineer interviews. Each has a full reference design (requirements, back-of-envelope numbers, components, user flows and deep dives with interviewer follow-ups). Each one can be walked through turn by turn and then sat as a mock. Patterns covered: fan-out, ranking, caching, social, heavy-hitters, count-min-sketch, sliding-windows, stream-processing, hot-keys, search, real-time, privacy, counting, time-partitioning, graph, sharding, in-memory, consistency, batch, clustering, ingestion, edge-caching, deduplication.
Attribution comes from public interview guides and candidate reports, not from X. It indicates where a question has been asked, nothing more.
The home timeline of Twitter, Instagram or Facebook: posts from people you follow, ranked, fresh, and fast for hundreds of millions of users.
Rank the top 1,000 videos by views over the last minute, hour, day and all time, from a million views a second.
Keyword search over a billion users’ posts, searchable seconds after posting, sorted by recency or likes, hiding every post the searcher may not see.
LinkedIn’s connections for 1 B members: invitations, follows, a 1st/2nd/3rd badge on 200 k profile views a second, and daily People You May Know.
Collect 2 M articles a day from 50,000 publishers, group them into stories, rank them per edition, and serve 300 M daily readers.
Large-company loops run 45 to 60 minutes, expect numbers, and spend most of the time on deep dives. Walk through a question to see how a strong candidate paces the hour, sit the same question as a mock until you can produce the requirements, the estimates and the design without looking, then read the interview framework guide for how to structure the hour. The other questions on the site teach patterns that show up in X interviews under different names.
Questions reported in X system design interviews include News Feed, Top-K Heavy Hitters Service, Post Search, Social Graph and Google News. Between them they test fan out, ranking, caching, social, heavy hitters and count min sketch. The reports come from public interview guides and candidate accounts, not from X, so practise the patterns rather than memorising one list.
Practise the questions reported there out loud, under a 45-minute clock: requirements with numbers first, then estimates, a high-level design, and deep dives into the two or three hardest parts. Start with News Feed: watch a strong candidate answer it turn by turn, then sit it yourself. Then cover the patterns the round leans on (fan out, ranking, caching and social) with one more question each.