TikTok

Design TikTok’s For You feed — rank and serve an endless short-video feed personalized per user without relying on who they follow.

00

Practice checkpoints

The requirements are open as a taste. From the numbers onward, the full guide opens in the app.

  1. 01
    Clarify scope
  2. 02
    Requirements + scale
  3. 03
    API + data modelUnlocks in the app
  4. 04
    Draw architectureUnlocks in the app
  5. 05
    Deep diveUnlocks in the app
  6. 06
    Trade-off decisionUnlocks in the app
01

Requirements that shape the design

Do not only state requirements. Ask for them. Each card pairs the design constraint with a clarification question you can say out loud before drawing the architecture.

Functional requirements

01Is this a social feed (who you follow) or an interest feed?

Pure interest feed: ranking is learned from behavior, not the follow graph — which removes fan-out-on-post (copying each new post into every follower’s feed) entirely and makes this a recommendation problem.

02Which signals count, and how fast must they influence the next feed?

Watch time, completion, skip, replay, like, share — streamed back and influencing ranking within minutes; skip-after-1-second is as informative as a like.

03How does a zero-history video ever get seen?

Cold start by exploration: new videos get seeded impressions on small audiences, and early engagement decides whether distribution expands — a ramp, not a lottery.

04What does a brand-new user see on first open?

A watchable popularity-plus-locale feed immediately, converging to personal taste within the first sessions of signals.

05Does the system fight its own echo chamber?

Yes: the final ranking stage enforces diversity (topic, creator, freshness quotas) — pure engagement-maximization degenerates into repetition.

06How fast is upload-to-eligible?

Minutes: transcode, safety screen, embed features, and enter the candidate pool — creator trust depends on that latency.

Out of scopeVideo upload/transcoding pipeline internals (the video-upload/streaming sibling question) · Creator monetization and ads blending · Moderation policy design (screening is a pipeline stage here, not the topic)

Non-functional requirements

01What latency does a swipe-to-next-video tolerate?

Effectively zero: the client holds a prefetched buffer of ranked clips; ranking happens ahead of the viewer, never on the swipe.

02Fresh signals or better model — which wins?

Freshness: a trend is minutes old; the pipeline is built so behavior from this session shapes this session.

03What happens when one video goes viral globally?

Serving absorbs it (the video is CDN-cached), and ranking absorbs it (candidate quotas cap any single item) — skew is expected, not exceptional.

04Can we lose engagement events?

Real-time ranking tolerates sampling under load, but the durable log keeps everything — training data must be complete even when the live path sheds.

05The heavy ranker times out — blank feed?

Never: staged degradation — precomputed candidates with a cheap scorer still produce a feed; the user sees slightly-less-perfect, not a spinner.

Keep asking — the interview is a conversation

Real interviews probe far more than a tidy list. These are the scope questions that separate candidates who interrogate the problem from those who recite it.

  • Interest-only feed, or does following exist as a secondary surface?
  • What counts as an engagement signal, and is watch time the primary one?
  • How much exploration traffic can we spend on unproven videos?
  • What diversity constraints does product want enforced?
  • Is upload-to-eligible latency a creator-facing promise?
01

Unlock the full playbook for TikTok

Numbers, architecture diagram, API and data model, deep dives, expected topics, self-check, whiteboard starter, and common mistakes unlock inside the app.

02

Numbers that force architecture decisions

Locked in the app

03

Architecture path

Locked in the app

04

API and data model

Locked in the app

05

Deep dive directions

Locked in the app

+Series

Practice the related series