Tiktok
Func req
Upload / download
Streaming video
NFR
1 billion users, 1 bill DAU
1bill videos viewed per day
10 bill videos uploaded per year
150 countries
Success metrics: time in app (avg hour per day)
1 video 10 sec ~ 1 MB
Uploads: 10^10 uploads / 365 ~ 30^6 uploads per day / 100_000 seconds a day = 300 videos / second (so then approximately 1000 videos per second in peak). So 1000 videos / second * 1 Mb (10Mbits) = 10Gbits ingress (this is not a lot)
Storage: 10^10 uploads * 1Mb = 10PB videos per year (including replication, different formats) -> 100 PB per year (blob storage)
Storage: metadata of video 10^10 * 1KB = 10TB per year (NoSql storage)
Views (downloads): 10^9 per day / 100_000 seconds = 10_000 videos per second -> 100Gbits egress
Assumptions
Video storage
We can store old videos in archive (slow and cheap storage)
Geo distribution
Partitioning video data by region. CDN
Last updated