HAProxy community

Running nginx in parallel with HAProxy to proxy UDP traffic

I’ve been running HAProxy for about a year at the front of my application as a proxy and load balancer for HTTP/TCP traffic. I now need to proxy UDP traffic, which HAProxy doesn’t support. The simplest solution I can think of is to run up an instance of Nginx in parallel to existing HAProxy instance to handle the UDP traffic, leaving HAProxy unchanged.

Has anyone tried this, or know of any reason why it wouldn’t work? Or does anyone know of a better solution?

I don’t see anything wrong with that.

Hi Moray,

What is your use case for UDP load-balancing?

Not OP but a possible use case I am looking at is the UDP channel of RDP connections over RD Gateway.
I cannot find the official documentation on this right now but: basically additionally to the normal TCP transport channel UDP transport channels (using DTLS) are established that allow transferring parts of the RDP session with lower latency/lag.

So a cluster of RD Gateways (RD Gateway Farm) exposes two ports: Port 443 (TCP) and Port 3391 (UDP). The TCP connection requires sticky session based on source IP, the UDP connection has no such requirements.

I need to proxy incoming UDP video traffic. I’ve just tried running both and it works absolutely fine.