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.
11 questions on this site are reported in TikTok 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, transcoding, cdn, adaptive-bitrate, pipelines, storage, broadcast, pub-sub, sse, sampling, moderation, heavy-hitters, count-min-sketch, sliding-windows, stream-processing, hot-keys, prefetching, licensing, offline, counting, playlists, recommendations, vector-search, feature-store, real-time, live-video, low-latency, request-coalescing, search, privacy, time-partitioning, auctions, budget-pacing, inverted-index, short-video, prefetch, session-ranking, exploration, perceptual-hashing, review-queues, policy-engine, audit-log.
Run an AI mock TikTok interview →One of these questions, run as a live round in that style, with a debrief at the end.
Attribution comes from public interview guides and candidate reports, not from TikTok. 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.
Upload, transcode, and stream video to a billion viewers: a processing pipeline on one side, a CDN problem on the other.
Comments and reactions on live video that reach viewers within two seconds, at 50 M concurrent viewers and 5 M on one stream.
Rank the top 1,000 videos by views over the last minute, hour, day and all time, from a million views a second.
Stream 100 M tracks to 600 M listeners with sound in 200 ms, offline downloads, regional licensing, and every play counted for royalties.
The “recommended for you” video home feed: 50 personalised videos picked from billions for 500 M daily users in under 200 ms.
Ingest 100 k live broadcasts, transcode them in real time, and deliver each about three seconds behind live, to three viewers or 500 k.
Keyword search over a billion users’ posts, searchable seconds after posting, sorted by recency or likes, hiding every post the searcher may not see.
Pick the best of 10 M active ads for 5 M requests a second in under 100 ms, within every campaign’s targeting, budget and frequency caps.
A full-screen feed of short videos for 1 B daily users, where the next clip starts instantly and every swipe reshapes what comes next.
Catch spam, nudity, hate and illegal media in 4 billion daily posts and comments before they spread, with 15,000 reviewers for the hard cases.
45–60 minutes, mostly in experienced-hire loops, and product-shaped around TikTok itself: short-video upload and processing, delivery through a CDN, the For You feed and its recommendations, or notifications.
Listing components and waiting to be steered. Candidates describe the round as loosely structured, so take the direction yourself and spend the time on the real bottleneck rather than a tour of every box.
From public interview guides and candidate reports, and TikTok’s own interview guidance where it publishes any. Not endorsed by TikTok. Formats change; treat it as a prior, not a promise.
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 TikTok interviews under different names.
Questions reported in TikTok system design interviews include News Feed, YouTube, Live Comments, Top-K Heavy Hitters Service, Spotify, Recommendation System, Twitch and Post Search, among 11 in total. Between them they test fan out, ranking, caching, social, transcoding and cdn. The reports come from public interview guides and candidate accounts, not from TikTok, so practise the patterns rather than memorising one list.
45–60 minutes, mostly in experienced-hire loops, and product-shaped around TikTok itself: short-video upload and processing, delivery through a CDN, the For You feed and its recommendations, or notifications.
Reports say the TikTok round weighs 4 things. 1. Scale reasoning for a global audience of over a billion users. 2. Video at scale: transcoding, storage and CDN delivery, including sudden viral spikes. 3. How the feed is chosen: candidate generation and ranking, not only storage and serving. 4. Latency across regions, and how data is replicated between them. Listing components and waiting to be steered. Candidates describe the round as loosely structured, so take the direction yourself and spend the time on the real bottleneck rather than a tour of every box.
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.