The Feed That Learns You in Minutes
Open TikTok for the first time and, within a few swipes, the For You feed seems to know what you like. No friends to follow, no profile to fill in. That speed of learning is TikTok's real product.
Designing TikTok means solving two problems at once: delivering short videos instantly as people swipe, and recommending the next video using signals that update in real time. This post covers both, including what ByteDance has published about real-time recommendation training.
๐ฏ Quick Answer (30-Second Read)
- Video pipeline: upload โ transcode into several qualities โ store โ serve via CDN.
- Instant playback: the app prefetches the next few videos while you watch the current one.
- Recommendations: candidate generation โ ranking by predicted engagement (watch time, completion, likes, shares) โ mixing for variety.
- Real-time learning: ByteDance's Monolith paper (2022) describes training recommendation models online so they update within minutes of user behaviour.
- Interest graph, not social graph: TikTok recommends based on what you watch, not who you follow.
High-Level Architecture
thousands of videos"] CAND --> RANK["Ranking models
predict watch time, likes, shares"] RANK --> MIX["Mixing rules
variety, freshness, safety"] MIX --> FEED FEED -->|"video IDs + URLs"| V V -->|"prefetch next videos"| CDN V -->|"watch, skip, like, share events"| EV[["Event stream"]] EV --> TRAIN["Online training
(real-time model updates)"] TRAIN --> RANK
1. Fast Playback: Prefetching
Short videos only work if each one starts instantly. The trick:
The app downloads the beginning of upcoming videos in the background, choosing quality based on network speed. Popular videos sit in CDN caches close to viewers.
2. Recommendations: Three Stages
From a huge pool, quickly pick thousands of videos you might like, based on your history and similar users.
Score each candidate: how likely you are to watch to the end, rewatch, like, comment, share or follow.
Add variety, new creators and safety rules so the feed doesn't become repetitive.
TikTok has said publicly that its recommendations weigh user interactions (videos you like, share, watch fully or skip), video information (captions, sounds, hashtags) and, to a lesser extent, device and account settings like language and country.
3. Real-Time Learning
The paper's key ideas:
- A collisionless embedding table so each user and video ID gets its own learned representation, instead of sharing hashed slots
- Expiring rarely used embeddings and filtering infrequent IDs to save memory
- Real-time parameter synchronisation between training and serving
The paper states Monolith was deployed in BytePlus Recommend, ByteDance's enterprise recommendation product; ByteDance hasn't detailed exactly how it's used inside TikTok.
4. Why New Creators Can Go Viral
Because the feed is driven by an interest graph, a new video gets shown to a small test audience. If people watch it fully and engage, it's shown to a larger audience, and so on. Follower count matters far less than on social-graph platforms, which is why first-time creators can reach millions.
Interview Checklist
- Upload, transcoding, storage and CDN delivery
- Client prefetching for instant swipes
- Event pipeline capturing watch time, skips and engagement
- Candidate generation + ranking + mixing
- Real-time or frequent model updates
- Cold start for new users (popular and diverse content) and new videos (small test audiences)
- Content moderation before and after distribution
Frequently Asked Questions
How does TikTok's For You page work?
TikTok recommends videos based mainly on your interactions, such as what you watch fully, rewatch, like, share or skip, plus video information like captions, sounds and hashtags, and some account settings. Candidate videos are ranked by predicted engagement and mixed for variety.
Why do TikTok videos load so fast?
The app prefetches the beginning of the next few videos while you watch the current one, and videos are served from nearby CDN caches in quality levels suited to your network. When you swipe, the next video is often already downloaded.
What is ByteDance's Monolith?
Monolith is a real-time recommendation system described in a 2022 ByteDance paper. It trains models online with fresh user interactions, uses a collisionless embedding table for IDs, and syncs parameters to serving quickly. The paper says it was deployed in ByteDance's BytePlus Recommend product.
Conclusion
TikTok combines a fast video pipeline (transcoding, CDN delivery and aggressive prefetching) with a recommendation system that ranks videos by predicted engagement and learns from behaviour in near real time. Its interest-graph approach is why the feed adapts so quickly and why new creators can reach huge audiences.
Sources
- Liu et al. (ByteDance): Monolith, Real Time Recommendation System With Collisionless Embedding Table (2022)
- TikTok Newsroom: How TikTok recommends videos #ForYou
Last verified: 2 November 2026.
Related reads: How Does TikTok Make Money? ยท YouTube System Design ยท How the YouTube Algorithm Works ยท What Happened to Vine?
I write about system design and how real products are built. Follow on LinkedIn or X, or invite me to speak.