๐ Problem Description
Design a short video platform like TikTok. Users can record/upload videos, scroll through personalized "For You" feed, like, comment, and share. Focus on video processing, recommendation algorithm, and low-latency delivery.
๐ค Use Cases
1.
Creator wants to uploads video so that video processed and published
2.
User wants to scrolls For You page so that sees personalized video feed
3.
User wants to likes or comments so that engagement recorded
4.
Algorithm wants to analyzes engagement so that adjusts recommendations
โ Functional Requirements
- โขRecord and upload short videos (15s-3min)
- โขVideo editing (filters, music, effects)
- โขPersonalized "For You" feed
- โขFollowing feed
- โขLike, comment, share, save
- โขDuets and stitches
- โขTrending hashtags and sounds
โก Non-Functional Requirements
- โขVideo upload complete < 30 seconds
- โขInstant video playback (< 500ms)
- โขSupport 1B monthly users
- โข100M concurrent users
- โข99.9% availability
โ ๏ธ Constraints & Assumptions
- โขVideos must be transcoded to multiple qualities
- โขML-heavy recommendation engine
- โขGlobal content moderation required
๐ Capacity Estimation
๐ฅ Users
1B MAU, 100M DAU
๐พ Storage
500PB (videos)
โก QPS
Uploads: 100K/sec, Views: 10M/sec
๐ Bandwidth
100Pbps peak
๐ Assumptions
- โข 1B monthly active users
- โข 100M daily active users
- โข Average 1 hour watch time per day
- โข 5M videos uploaded per day
๐ก Key Concepts
CRITICAL
ML Recommendation
Multi-stage ranking: candidate generation โ scoring โ diversity โ serving.
CRITICAL
Video Transcoding
Transcode to multiple bitrates (240p-1080p) for adaptive streaming.
HIGH
Real-time Feedback
Watch time, likes instantly feed back to ranking model.
HIGH
Content Moderation
ML + human review pipeline before videos go live.
๐ก Interview Tips
- ๐กStart with the recommendation algorithm
- ๐กDiscuss the For You page personalization
- ๐กEmphasize the content moderation pipeline
- ๐กBe prepared to discuss video processing
- ๐กKnow the difference from YouTube (short-form)
- ๐กUnderstand the creator economy features