NGINX UDP Load Balancing
May 20, 2016 11:36AM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 158
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready