147 points · by gardenhedge · 3y ago · 141 comments
It's video based and delivers video really well. It rarely buffers or fails to load. Compare that to the Reddit video player or the Twitter video player or Vimeo. It's much better. Netflix loads poorly initially for me quite a bit (granted it's trying to load much higher quality).
How did they manage to get the engineering talent when seemingly FB, MS, Netflix, Amazon, Google are all fighting for that talent?
1. They only have a queue of videos. That means there is one video playing and they know exactly what the next N videos are going to be, so they can start buffering them early
2. The video plays are high intent. If you launch TikTok, you are 100% going to watch videos. This is not true for Reddit or Twitter, making it harder for them to preemptively buffer content or over-optimize their architecture just for video playback.
3. As you noted, the videos are lower quality and shorter than YouTube or Netflix videos. They also are exclusively optimized for mobile, so don’t need to worry about streaming videos larger than a phone screen.
4. Most videos in your feed might be a similar style. This one is a stretch but I wouldn’t be shocked if TikTok uses some ML to extrapolate highly compressed videos early in the buffer.
5. Depending on who you believe, ByteDance might have financial backing and motivations that make it easier to throw more money at this problem than its American competitors.
Also young people scroll for hours (and adults, the average age is above 25 afaik) so watch-time isn't less than on YT, probably even more.
Lastly but most importantly, many people scroll through a huge pile of videos before watching even 10 seconds of an "interesting one" before doing the same thing over and over again, so in effect you are buffering a lot more video than on YT.
They must have absolutely massive infrastructure.
I believe the videos are actually 720p, that may only be on mobile devices though.
I have strong and complicated feelings about how good UX/UI needs to be in software. It often gets ignored especially in B2B settings, but there are certain times where it's so clear how crucial it was to get something right. I think about Spotify compared to Apple Music and how Spotify had a way of preloading songs so they played immediately that Apple Music never quite captured. TikTok definitely had the chops.
The one big technical issue I have noticed with TikTok as a user though, is that their comments go down a lot. It's clear that comments are handled by a different service and it seems way less stable. It's somewhat common to be able to load videos but trying to load the comments leaves you with an endless spinner.
American VC can provide almost unlimited money. What it can't do is focus its spending on things that actually work.
The original question frames this in terms of technical talent, but it's not that at all. There are all sorts of US firms and even HN posters who could, given the right spec, come up with as good a solution for the problem of low latency smooth delivery of various videos.
No, the problem is choosing to make the right product. TikTok is good for the same reason that original Whatsapp was good: it had to succeed on its merits, rather than being part of a giant tech company. Whereas how many products has Google launched and then canned in that time? Was Stadia great technologically? Doesn't matter, it's dead.
Conversely, the Reddit video player on web is bad for the same reason that all the rest of the web app is bad: it's supposed to be, because of the dark pattern monetization that's supposed to force you into using the app.
[0]...or at least until being bought out by the big players you mentioned
I think Reddit is just especially terrible. They had to write custom code for handling the viewport autoplay, and ... I guess didn't implement everything else correctly.
YouTube has been fine for ages, though, and have great keyboard shortcuts that no PM would ever think to ask people to add. They just added them in 2008 and kept them all working through 5 versions of HTML. Not bad.
So it's not hard for me to guess how they do it...
(Yes, background data is now disabled for TikTok on my phone... I learned my lesson)
This is worthy of it's own question. Why is Reddit's player so uniquely bad? It's worse than any other video player on the entire internet.
Without fail, my experience is:
Play video. Usually works.
Try to replay video. It stops at 4 seconds.
Refresh browser. Now the video is half the size? But it now plays, though tiny.
I don't know who wrote Reddit's video player, but it's obvious they are a masochist. That they still haven't fixed it speaks volumes of their eng org to an end user like myself.
It's why on the Desktop, at least, I always have a https://redditsave.com/ tab opened. It's just way faster (and less frustrating). There's an FF extension that automates this : https://addons.mozilla.org/en-US/firefox/addon/downloader-4-... : which I haven't tested.
*update, a few minutes later: decided to install extension. Looks useful. Now the testing phase...
The various ol., old., and i. subdomains, which still allow access to a functional reddit with a functional video player, are there to keep the old-school power users from revolting, for now, anyway.
think a "like count" database, it needs to increment and persist. Both very simple, and its implementation is entirely decoupled from the client implementation. Firebase would manage that for you, youd just call firebase functions instead of updating a database yourself.
note: i dont know if this is how tiktok works
If you compare this to YouTube, you can tell they've resorted their algorithm back to a more curated list of recommended videos. This blocks new content creators out and keeps the recommended list stale. You can also tell they've weighted videos with the highest ad revenue, so you're more likely to get frustrating long ads with vapid click bait style content. It's no wonder why YouTube lost the top spot of video sites, as they've put advertising ahead of content creators and viewers.
I've bought several products from TikTok ads. I usually never buy things based on online ads. Because their ads are skippable, and have to demonstrate their use instantly, they're very effective. Again, compared to YouTube, their ads tend to focus on long droning corporate agendas and visions. These don't make me want to use the platform.
Systems research people are not valued enough .. my understanding is a bunch (not sure about number) of ex-MSR folks went to ByteDance .. sizable pay bumps.
IIRC TikTok for a long time wasn't even using TLS encryption for client-server traffic, which is rare. Whoever is cutting corners like that is very focused on just making the thing work and fixing the issues later, which has its pros and cons. In a US big tech company, experienced devs would throw a fit over things like this and slow down the project to catch those details. I work with people like that. I'm guessing (as not a TikTok employee) that TikTok is more top-down, plus video is its main focus. Maybe they're preloading aggressively, user's battery and data plan be darned.
I think there were a few things for the business where tech was important:
- being good at serving/storing videos
- the recommendation engine. There are two parts, one is taking user preferences as a strong signal (not a tech decision) and another is recommendation algorithms which produce this effect (I think they’re rote a paper that suggested things about how this worked)
- being an app people wanted to use (weakly tech but mostly not)
I think a some of the explosive growth came from the app having been iterated on a bunch in China first so it seemed more polished when it reached the west. But I could be pretty wrong there.
To answer the question about engineering talent:
- Chinese people will go to the US, get great educations at US universities, some get denied work visas or otherwise choose to return to China. TikTok can employ them in a less competitive labour market and not fight companies like Google which don’t operate in China.
The history of TikTok is actually murkier than that. I listened to a podcast about this, I wish I could find it again. The narrative that seems to be popular is that ByteDance launched this app called Douyin in China and it was so successful they decided to launch it globally, and thus TikTok was born and hit the ground running.
But the podcast I listened to told the story from the perspective of the founders of Musical.ly - which was an app that was started by two Chinese software engineers that were living and working in silicon valley. Originally it was supposed to be a video app about teaching (?) but pivoted and gained a lot of traction with teenagers in the U.S. This is where the origins of TikTok being thought of as a "teen dancing/lip syncing app" came from. Musical.ly got acquired by ByteDance.
- Douyin launched in September 2016 - Musical.ly launched in 2014 and by June 2016 had over 90 million registered users. Around 2016-2017 is when I first remembered seeing videos with the Musically watermark (very similar to the TikTok mark) usually on r/cringe on Reddit. Here's an example: https://www.youtube.com/watch?v=rfT0jRYaovE - ByteDance acquired Musical.ly for almost 1 billion dollars a year after launching Douyin and merged them to create TikTok.
I never used Douyin or Musical.ly, but I think that a lot of Musical.ly's DNA was injected into TikTok and the idea that TikTok was a purely Chinese invention is a little revisionist.
The thing that really cements this to me is that Alex Zhu, one of the Musical.ly founders was the first CEO of TikTok. Also, looking at the type of content in those compilation videos definitely gives me the same vibe. So TikTok actually has roots in silicon valley way more than people think it does.
I think that noting this history is interesting because TikTok is touted as being so purely Chinese, and it's certainly owned entirely by a Chinese company now so I'm not saying any concerns about the Chinese government having access are unfounded. But I think part of the fear around TikTok comes from "How did they create this app that is beating our apps and seems to have the product/market fit of a glove in our society? Have they been planning this?"
But a lot of the iteration and pivoting happened with Musical.ly, in the U.S. and a Chinese company paid through the nose for it.
And I actually think it benefits the Chinese government for this revisionist history of the app to be the story that "wins" - because it portrays China as this mysterious force with previously unknown insight, power, and plans. When in reality the bones of TikTok came directly out of the same place as most new social apps do.
If you look at the Wikipedia article for Musical.ly - it goes through great effort to talk about how it was a Chinese company that happened to have a "Santa Monica office" but if you look at the Crunchbase profile for Musical.ly - the story is different. https://www.crunchbase.com/organization/musical-ly/company_f...
The companies that participated in those funding rounds are not blue chip VCs and do have foreign ties - but they are specifically focused on investing in US startups.
I would love to see a journalist at The Verge or somewhere that writes about tech in the same way tackle this topic. I think it's a missing piece in a lot of the discourse around TikTok.
Is this really true though? I imagine the market for SDEs in china is much more competitive and cut throat. There are only so many locals/immigrants to choose from in the US, hence the higher salaries. A lot of top talent in Silicon Valley have almost worked at all FAANG companies.
Any FAANG engineer or someone who looks at job postings in those areas would know this. The comments I see about TikTok on Hacker News in general are so much more low effort, low knowledge/low research than other areas it is genuinely concerning to me. There's so many blanket assumptions that go unresearched, unchallenged. It's bizarre.
You find a video, with a song, that you vibe with. Now, click on the bottom right sound graphic and you can watch ALL the videos produced with that sound and vibe.
It is part of the core product!
So good it's hard to describe :)
Both seems to preload about 10 secs of next 4-5 videos.
I think here is the trick: if your recommendation gets sufficiently good, then user won't eagerly scrolling next just to get content they would actually watch, which makes serving less of noticeable problem. There is a feedback loop here.
On TikTok I rarely gets content that would skip at first sight, which speaks to strength of its algorithm.
Don't know about Reddit/Twitter, but Netflix's video is a whole different business overall, all the DRAM and stuff.
If you search arxiv.org for bytedance you can see some of the work they have published. I’m sure there is lots more they haven’t.
I suspect a lot of learnings from other products went into the product design of tik tok as well in terms of how to balance exploiting a users knon interests with showing them novel stuff, how to give anything the chance to go viral etc.
I also think that for the public feed, people so see similar videos based on demographic etc so there is a form of caching that is likely applied.
Videos are all small clips as well and they're being loaded from TikToks content servers. With reddit and twitter you are often watching a video linked from another website.
I agree, Reddits video player is garbage.
I think Twitter's video servers are also just slow.
> How did they manage to get the engineering talent when seemingly FB, MS, Netflix, Amazon, Google are all fighting for that talent?
China is both a huge labor market along with the largest mobile phone market in the world. Add to that fact that the great firewall has created a parallel internet, it’s been fairly inevitable that China will end up with some tech giants. Even with all the money that American tech giants have, they are at a disadvantage when it comes to tapping the massive labor market and consumer market within China.
Note that the same thing is happening with EVs. In ten years, the auto market will have several dominant Chinese automakers a la what happened with Germany and Japan in the 70s and 80s.
Chinese tech is notorious for the 996 work schedule, that wouldn’t fly in the west.
amazon for example is services architecture. many frameworks and solutions built once for shopping/seller use case. now you want to join Y space? incentive to reuse tooling and framework that already exist. get to market quickly. sound like big advantage but the tools were built for problem X. with problem Y, we have hacks on top of hacks to fit square into circle.
“you want to build mobile apps? okay. we only know how to do services really.” so even how you build code or how to branch and release strategy missing or expertise is only in some specific business division who did everything so custom when they invent it first time that it not really work for you.
so if you observe you company like amazon try do 100 different things at once. sound good and impressive and stock grow. but 98 thing executed very poorly and not close to best in class experience.
this my exact experience at two different company.
once you get over these problem, then u focus on optimization. N second videos? Okay.. let’s preload them..let use lower resolution..let’s have warm cache of recommendations if you like this vide, meaning you watch it for greater than S second..let invest in custom recommendation pipeline with online and offline training to expand dataset of video recommendation so u eyes stay on a video longer while we preload next one.
because we smaller nimble build what we need now without politic of tech alignment across orgs and ownership territory battle going up to separate director or VPs.
this me experience and me sure there are other things too.
From what I can recall, TikTok was the first one to let you to swipe to watch/switch videos, so users can easily be stuck on it, no matter the short video's quality is good or bad, interesting or boring. Since one single swipe, you changed to another, the cost is very low for user even the video quality is not good.
Not everyone here speaks a common language, and if it is, it's almost certainly English. So documentation and communication is greatly simplified, smaller words, and a lot of conversing through code.
Let's compare two mature technologies between east and west, Google Maps vs Huawei Map SDK:
Google map quickstart: https://developers.google.com/maps/documentation/android-sdk...
Huawei map: https://developer.huawei.com/consumer/en/doc/development/HMS...
There's subtle differences here, but Google tends to use a lot more English words, and Huawei talks mostly in code.
System analysts are common, who act as living documentation. Basically people who you can always interrupt to ask questions. PM isn't sure if a feature is possible? Ask the analyst. Dev doesn't know the right endpoint or understand how something works? The analyst takes time to explain it to them. They generally don't hold the responsibility of development and during periods of low utilisation, they learn the architecture or do R&D.
In MMOs, they would be the tank, while the devs focus on being DPS.
So personally, I think the key is that they rely less on the skill of the individual, and focus heavily on teamwork. Also this is probably an analysis of Huawei more than ByteDance/TikTok, but I assume the culture is more similar.
I learned how well code speaks when working with remote web/mobile app contractors who hardly spoke English and had a 12hr time difference. If they didn't understand something right the first time, it could cost a day of progress. I started giving them code or cURL examples on how to use every backend call I implemented, often using multiple together. We ended up better oiled than some fully-localized teams I've been on.
Now I just work with other Americans in the Google offices, and I've seen success focusing our internal communications and docs more on examples. I often complain about how many English words our docs have, both internally and with customers. Nobody cares what my thing is or what philosophy it follows, they care how to use it. And like TikTok videos, brevity helps.
However, I don't think this explains TikTok's ability to load videos quickly.
which I think is a false assumption - they don't need as much engineering talent, they do more with less.
If TikTok did this, 100% of it's users would be affected.
The average video on tiktok, at least for the webapp version, appears to be around 1 megabit (0.125 megabytes) per second when the h264 option is used, and only half of that rate when using ByteDance's 'own' (essentially hevc) format.
I would reckon nearly all internet users, even many mobile ones, have more than enough bandwidth (and low enough latency and loss) to stream many of these tiktok videos in real time simultaneously, let alone a single one at a time.
Tiktok's backend infrastructure may be impressive, but the same could be said for the other companies you listed such as Google.
Reddit is crap because of organizational history, and it's no a huge revenue-rich company, in a market with very high salaries.
TikTok has a a few magic ingredients, but 'dancing girls' as a starting point is one of them, the other is the learning algorithm. BTW I do not think that algorithm is magic - just good.
If you see how some Chinese companies have so many focused people and adapt so reactively to things, and they're backed by ample money.
TikTok is a Chinese company. The source code is mostly written in China. I'd say that TikTok is the Chinese equivalent of a FAANG company.
They get the talent because the fight is happening in the FAANG space, they are not there.
Chinese FAANG is probably geared more towards hardware, things like Xiaomi and Huawei.
Click the link for "Careers in China" in the footer and filter by R&D: 6526 job openings.
https://jobs.bytedance.com/experienced/position?category=670...
1. I thought flash was deprecated by the browser and
2. I thought the industry has moved onto HLS/Dash or stream via websockets for live streaming.
Industry consensus doesn't mean best performance, unfortunately. Maybe it means works well enough for existing participants, but going your own way can be more efficient or less efficient, or a waste of time. Industry solutions tend to take more round trips in search of flexibility, and number of round trips is a big factor in download time if the round trip time is large, as is common on mobile.
- request top level playlist (choice of bitrates, etc)
- request playlist for a particular bitrate
- actually request a segment with some frames in
I'm sure if Reddit had government-level funding to burn, they'd also find some ways to improve their video player.
Engineering talent is historically mostly China based, and over there they can get Silicon Valley quality people for half the price and twice the working hours => order of magnitude engineering cost advantage over all the companies you mentioned.
The difference between TikTok and e.g. Reddit is that on TikTok the user wants some video, whereas on Reddit the user wants that video.
By hiring people in china? Not everyone wants to move to the US.
i definitely wouldn’t call this evidence that their tech is good though.
Are you saying instagram got "massive direct assistance from Uncle Sam and other government entities"? How would you even come up with that opinion?
As they say, "Good artists copy, great artists steal"...
Being headquartered in a jurisdiction that doesn't care for intellectual property sure must be convenient.
Like… YouTube with their shorts?
A continuous, infinite scroll stream of $media is everything but an original invention, and most likely not protected by any IP law.
And you probably haven’t seen other chinese apps like xiaolongshu - it's algorithms are amazing in showing you content of your interest. Ethically there may be some compromises across, but it does great things.
Americans are very proud of their "process". ... Americans love their processes. In their jobs they rarely express their creativity. Conversely, they expend a lot of energy and time adhering to their processes.
Maybe?