Welcome! Log In Create A New Profile

Advanced

Load balancing syslog with UDP

Posted by jasonmclose 
Load balancing syslog with UDP
December 01, 2016 12:32PM
I am trying to use nginx as a load balancer for syslog, to be able to send logs to several downstream Graylog ingestors in order to help improve performance of the Graylog cluster.

I'm having trouble with the config, as I'm getting the error:
[error] 2813#2813: *210329 no live upstreams while connecting to upstream, udp client: 10.0.X.X, server: 0.0.0.0:11016, upstream: "port_11016_stream_backend", bytes from/to client:937/0, bytes from/to upstream:0/0

As a small example of my conf file, it looks like this:

stream {
server {
listen 11016 udp;
proxy_pass port_11016_stream_backend;
}

upstream port_11016_stream_backend {
server 10.0.X.Y:11016;
}
}

It's not going to receive any bytes back from the server because I want this to be UDP proxying, and ergo there will be no reply. How can I eliminate this error?
Re: Load balancing syslog with UDP
February 08, 2017 07:58AM
Hey facing similar situation. Was this solved?
Re: Load balancing syslog with UDP
February 08, 2017 08:23AM
Yes.

You have to set the proxy_responses field to 0.

So using my above example, it looks like:

stream {
server {
listen 11016 udp;
proxy_responses 0;
proxy_pass port_11016_stream_backend;
}

upstream port_11016_stream_backend {
server 10.0.X.Y:11016;
}
}
Re: Load balancing syslog with UDP
February 11, 2017 12:50AM
Hey thanks a lot. Will try that :)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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