HAProxy load balance RTMP (TCP) BASED on URL

I want my HAProxy to redirect users to backends based on the URL. The mode is TCP, becouse they will connect to rtmp servers. Please show me how?

Hi Xannax,

Why not use something like HLS/MPEG-dash which use HTTP protocols?
You might find it easier to manipulate them with a load balancer.

Also, maybe look at RTMP-NGINX.

Thank you,

Matt

But then you need to know on what server the stream is delivered, so you can redirect the hls requests to the same server.