UDP Load balancing

Sékine Coulibaly scoulibaly at gmail.com
Mon Jan 22 14:01:21 UTC 2018


Hi,

I'm evaluating Nginx Plus for a UDP Load Balancer but can't make it work.
The packets are spoofed correctly on the LB side (as seen with tcpdump,
where I can see packets created, the source IP being the one of the client,
the destination the one of the selected upstream). However, on the upstream
side, I receive nothing.

Could it be the spoofed packets are filtered out somewhere ?

My configuration is as below :

user  root;

worker_processes  auto;
worker_rlimit_nofile 65535;

error_log  /var/log/nginx/error.log debug;
pid        /var/run/nginx.pid;


events {
    worker_connections  20000;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request"
'
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}

stream {
  upstream dtls_udp_upstreams {
    hash $remote_addr;
    server preprods.mycorp.com:5684;
  }

  server {
    listen 5684 udp;
    proxy_bind $remote_addr:$remote_port transparent;
    proxy_pass dtls_udp_upstreams;
    proxy_responses 0;
  }
}

Thank you !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180122/ff41f896/attachment.html>


More information about the nginx mailing list