Ask HN: How would you host video if you were building “the next TikTok”?

6 points by andrewstuart ↗ HN
Say you are a startup with minimal funding, so costs count for alot.

How would you host the video? There’s no chance of doing it cost effectively with the major clouds because they charge 9 cents per gig…. you’d be broke instantly.

So what are some other cost effective ways to do the hosting?

8 comments

[ 2.7 ms ] story [ 23.7 ms ] thread
It sounds like you are asking "where can I get free video hosting?" and there are many sites. But you'd probably be breaking their terms of service if you used it at scale for your own site.

Or it sounds like you might be willing to sacrifice hosting quality and do something like peer to peer storage and serving but that would be a terrible experience for user. Videos would often just not play.

I think you need to raise money for this startup and pay a major cloud provider?

>> It sounds like you are asking "where can I get free video hosting?"

No, I’m asking what the most cost effective ways are to host a lot of video serving.

There are other alternatives to big clouds. In fact you’d be crazy to serve video from big clouds even if you had the funding…. 9 cents or more per gigabyte is a huge amount of money.

I know this doesn't answer your question, but the big cloud providers all have startup programs that should be good for 6-figures worth of credits, so they could still be a possibility.

Also, probably a dumb idea: can you use cloudflare images for gifs?

You can't have tiktok levels of video hosting for cheap. Instead, something like tiktok but different, might be able to optimize it.

Maybe you can only post 1 second videos, maybe you can only post one video a day, or you only see the most important 10 videos of your friend. With some constraint, there could be alternatives.

Not sure if this would be allowed in their terms, you want to check but you could host the videos initially in LBRY / odysee and then embed them into a client serving them up in a frame without hosting them yourself.

https://lbry.com/faq/embed

That might get you enough headroom to bootstrap revenue to hosting your own servers colo.

https://webtorrent.io/faq and give users a simple tool to seed videos they like.
Op's question reads like the common consulting client demand of "make me a billion dollars without me understanding anything" but it is an interesting question and I think you're right here suggesting webtorrent as a place to start. I can't find it now but I remember someone using webtorrent and maybe dnscoin or something to make a website that would exist as long as someone is looking at it. It was a fun demo. It was a really simple website and they made an analogy to the "A tree falls in the forest" parable.

The problem here would be defining the constraints. TikTok like video does mean you aren't going for long form and it's not a huge deal to do UHD or whatever. So you figure out the bounds of the transfer and scale and then do the math to figure out how to take the singular viewer thing and layer in seeding three(?) videos partially for every single viewer.

So a viewer watching a video only needs to watch once and repeat but they are also given chunks of two other videos to stream. I'd look at flocking algorithms maybe to test out how to design something like this. But I'm also an idiot.

I think there's something to that. I might try to make a proof for it at some point. I... do not want to run a social media platform or work on one. That sounds like a nightmare, but I think something like that might be not just possible but inevitable.

You could monetize it by having people pay for seeds and storage for their videos. You could make a marketplace that pays people to seed videos and they could choose what videos to seed so they don't seed stuff they don't care for. I dunno, it almost sounds like a media sharing protocol that should already exist. Does this already exist?

Dedicated servers for hot content with unmetered connections caching user generated content backed by Cloudflare R2 (no egress charge and CF will want $$$ for non HTML CDN serving) or Backblaze B2. Store metadata in a relational database like PostgreSQL for caching servers and clients.

A rough proxy as described is a few hundred lines of Python.

https://news.ycombinator.com/item?id=28682458