Nginx load balancer for graylog 3 nodes

(Kieulam141) #1

Hello guys,
Im new with graylog.I’m building a graylog cluster with 3 nodes and I want to load balancer throught Nginx.Does anyone has a clear tutorial for this.
Thank you.

(Artem Davydov) #2

hi, what are you plan to balance? web? gelf ?

(Kieulam141) #3

Thank for your rep.
I want to balance web.

(Artem Davydov) #4

server {
listen 80;

    location / {
    proxy_pass  http://graylog-web-cluster;
    include     /etc/nginx/proxy.conf;


upstream graylog-web-cluster {
server backup;

(Jochen) #5

Take a look at and for relevant hints.

(Kieulam141) #6

So in my each node graylog config file, Will i set “web_listen_uri =” and “rest_listen_uri =”, right ?

(Jochen) #7

No, that means that Graylog will only be reachable on the local machine ( == localhost).

(Kieulam141) #8

so, in that options, what should i set them?

(Jochen) #9

Set both (rest_listen_uri and web_listen_uri) to the public IP addresses of the systems the respective Graylog instances are running on and configure you load balancer (nginx) to connect to all 3 of them.

(Kieulam141) #10

Thanks very much for your support.
I did it.


I installed a graylog cluster with three nodes. I also want to use nginx to load balancer, please share your nginx configuration to give me a help.
Thank you.

(Jochen) #12

@Shelin First, please don’t hijack old topics but open a new one for your own issues.
Second, there’s a working nginx configuration in the Graylog documentation:

(Jochen) closed #13