Tuesday, November 19, 2019

Load balancing multiple incoming RTMP streams.

We run a business which receives multiple incoming RTMP streams every day (up to 20 concurrently, although we suspect that will escalate quickly as we grow) which we re-stream on our platform. At this point we have dedicated "slots" on relatively high-spec media servers for each location that we stream from (with a maximum of 5 locations per server). Obviously this isn't a great idea in terms of availability and especially scalability, so we're investigating ways to decouple our transcoding servers from ingestion and rather than having a number of dedicated servers matching incoming streams have an available cluster of transcoders which we can spin up or down depending on incoming demand from the load balancer(s).

We currently use Wowza Streaming Engine for all ingestion / transcoding, with the plan to move to OpenResty/Nginx + RTMP module for transcoding, however I can't seem to get my head around how we would present a single ingest URL to our clients, i.e., streamto.ourbusiness.com/live without some sort of layer 4 DSR load-balancing since the RTMP handshake needs to happen directly with the transcoding server, not the load balancer.

I've looked into HAProxy and others, but just can't seem to find any documentation etc on how to handle and load balance many incoming RTMP streams - most of the articles I've found are suited for the other way around, i.e., pushing out many streams.

I'd appreciate any advice and am happy to provide more details where needed.

Thanks!



No comments:

Post a Comment