Has anyone done self-hosted live-streaming (of gaming, talks, desktop, whatever)? It seems like it shouldn't be difficult or cost-prohibitive with a light VPS and Cloudflare.
Conversation
Replying to
The normal Cloudflare CDN won't help because it relies on caching static content at the edge nodes. They have Cloudflare Streams for advanced video streaming support but it requires uploading static content rather than being usable for streaming something in real time.
1
3
Replying to
Can't you implement a stream as a virtual static file that blocks when reading ranges not yet existant?
1
1
Replying to
I think Cloudflare will only cache the file as a whole after getting an entire copy of it and won't cache files larger than 500MB on the free plan. They'll serve range requests from cache if the file is cached, but as far as I know the range requests won't fill the cache at all.
1
1
I guess you could divide it up into a bunch of different files rather than relying on range requests. However, I'm not sure how well it will handle caching that's so rapidly changing. If it's not cached, I think it will just pass through. I don't think it will merge requests.
1
1
You need the cache to be warmed up by usage. There isn't a way to push something to their CDN. It acts as a caching reverse proxy using their custom nginx fork rather than a traditional CDN that you push to in advance, which I don't think would fit with real-time usage.
1
1
Replying to
I guess you could log & analyze how they request data from your server to figure a lot of it out.
1
Replying to
They add a CF-Cache-Status header showing whether a cache hit occurred too.
Show replies

