Roman Arutyunyan
January 28, 2020 09:04AM
Hi,

On Tue, Jan 28, 2020 at 08:52:53AM -0500, arigatox wrote:
> Hi, I am testing nginx as a reverse proxy/load balancer for UDP. I have
> configured the upstream servers, and it is working fine, except one issue
> that is driving me crazy.
>
> It seems that nginx does not keep the udp source ports between requests. It
> changes the source port on every request. So I can't use it to load balance
> udp protocols that needs several packets (for example, wireguard).
>
> I am using version 1.14.0 on Ubuntu and this is my config file:

Your nginx is too old. UDP session persistence has been introduced in mainline
version 1.15.0 and is available in stable version 1.16.0.

> stream {
> upstream udp_backend {
> hash $remote_addr;
> server 10.0.0.3:5180;
> server 10.0.0.4:5180;
> }
> server {
> listen 5180 udp;
> proxy_pass udp_backend;
> proxy_bind 10.0.0.2:5181;
> }
> }
>
> Is there any parameter that allows me to preserve udp ports?
> Thanks.
>
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,286837,286837#msg-286837
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

--
Roman Arutyunyan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

UDP Load balancing

arigatox January 28, 2020 08:52AM

Re: UDP Load balancing

Roman Arutyunyan January 28, 2020 09:04AM

Re: UDP Load balancing

arigatox January 28, 2020 09:17AM

Re: UDP Load balancing - [Solved]

arigatox January 28, 2020 09:29AM

Re: UDP Load balancing - [Solved]

deprito April 21, 2020 09:22PM

Re: UDP Load balancing - [Solved]

Andrei April 23, 2020 08:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 233
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready