Welcome! Log In Create A New Profile

Advanced

答复: UDP proxy

程文平
August 02, 2017 10:02PM
Hi,
I have open a ticket for this issue in https://trac.nginx.org/nginx/ticket/1298, but from the response, there is no perfect solution for it.

Thanks,
Nick
发件人: nginx-devel [mailto:nginx-devel-bounces@nginx.org] 代表 Rajesh Mahindra via nginx-devel
发送时间: 2017年8月3日 1:43
收件人: nginx-devel@nginx.org
抄送: Rajesh Mahindra
主题: UDP proxy

Hi

I am trying to setup nginx as a UDP load balancer using ngx_stream_core_module to load balance udp traffic across backend instances.

However, i see that for every incoming UDP packet from a client, nginx uses a different source port when sending the packet to the backend instance for the same UDP connection. That is throwing the backend off. I dont want to use nginx as a transparent proxy to avoid setting up routes (since i am deploying on Google Cloud). Is there a way nginx can load balancer based on the UDP connection?

I am using the following config:


upstream test_upstreams {

server 104.199.242.111:6121http://104.199.242.111:6121;

server 104.199.242.111:6122http://104.199.242.111:6122;

hash $remote_addr consistent;

}



server {

listen 443 udp;

preread_buffer_size 1500;

proxy_pass test_upstreams;

proxy_timeout 10s;

proxy_responses 1;

access_log logs/quic_access.log quic;

error_log logs/udp.log;

}


Thanks
Rajesh
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

UDP proxy

Rajesh Mahindra via nginx-devel 754 August 02, 2017 01:46PM

答复: UDP proxy

程文平 314 August 02, 2017 10:02PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 241
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