Welcome! Log In Create A New Profile

Advanced

Re: Nginx not retrying failed UDP message

Vladimir Homutov
July 10, 2020 10:40AM
On Thu, Jul 09, 2020 at 02:42:52PM -0400, harsh wrote:
> Hi,
>
> We are using NGINX as Load Balancer for load balancing RADIUS UDP traffic.
>
> It seems NGINX is not retrying to send messages to another upstream server
> if one of the upstream servers is down.
>
> We are using NGINX 1.16.1. But the same behaviour exists in all NGINX
> version upto NGINX 1.19.
>
> In older NGINX version (1.13.10/1.14.1) this retry is working fine without
> any issues.
>
> Following is our NGINX configuration -
>
> server {
> listen 1813 udp reuseport;
>
> proxy_pass udp_radius;
> proxy_connect_timeout 60s;
> proxy_timeout 5s;
> proxy_responses 1;
> proxy_requests 1;
>
> proxy_buffer_size 64k;
>
> #access_log /var/log/nginx/radius.log upstreamlog buffer=64k
> flush=1m;
> access_log off;
> }

Can you please show full configuration? Is 'udp_radius' a hostname
or an upstream{} block ?


Regarding 'retrying to send message': since UDP is non-reliable, nginx
will retry with another server only if it will get error immediately
during send() call (not very probable). nginx sends packet, no error
immediately; later it can get either icmp-caused error on read or write,
or timeout can fire, and the upstream will be marked as failed. So, no
new packets will be sent to it. Until upstream is not marked dead,
new packets can be sent to it.

Probably, you see effects of this change:

Changes with nginx 1.15.0 05 Jun 2018

*) Feature: now the stream module can handle multiple incoming UDP
datagrams from a client within a single session.

You may want to look at debug log to see what is exactly happening -
there is information about upstream servers marked alive or not, and
clients requests and responses.


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

Re: Nginx not retrying failed UDP message

Vladimir Homutov July 10, 2020 10:40AM

Re: Nginx not retrying failed UDP message

harsh July 15, 2020 11:23AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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