UDP proxy

Rajesh Mahindra rmahindra at uber.com
Wed Aug 2 17:43:05 UTC 2017


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:6121;

        server 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20170802/fef31811/attachment.html>


More information about the nginx-devel mailing list