Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

NGINX UDP Load Balancing

$
0
0
I'm trying to load balance UDP packets across two servers with NGINX. My server application requires that the client IP address be forwarded because that is how it identifies the specific client that it's communicating with. I have attempted to do this using the proxy_bind parameter as described here: http://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_bind but when I do that NGINX complains that the number of parameters is incorrect. When I remove the transparent bit it complains that $remote_addr is invalid. My server block looks like this:

server {
status_zone UDP-1120-servers;
listen 1120 udp;
proxy_pass UDP-1120;
proxy_bind $remote-addr transparent;
}

Additionally, if possible, I'd also like to configure NGINX so that requests that come from the same IP address end up with the same port.

Any help would be appreciated. I'm a NGINX noob and I'm also not a network guy so I'm sorry if this is a stupid question.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>