<div dir="ltr"><br><div class="gmail_quote"><div class="HOEnZb"><div class="h5"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi Everyone<br><br></div>I would like to ask a little help to understand and refine my config.<br><br></div>The basic problem:<br></div>We have 2 nginx frontend on a same site (only for backup and sandbox the secound).<br></div>We have 2 graylog backend servers on different sites.</div><div>The nginx servers and SERVER_B is on the same site.<br></div>The Nginx(s) forward the http traffic and the stream the log traffic.<br></div>Unfortunately we have 0.5-0.6sec latency between the sites, so the nginx forward almost all traffic to one backend server.<br></div>At the log forward function only the safe arrive important, the latency not.</div><div>The HTTP traffic is low, so one server can serve it.</div><div><br></div>How can I tell for the nginx, this latency is ok, and don't mark SERVER_A as unavailable?<br>I triedwith max_fails, fail_timeout, weight parameters without success.</div><div><br></div>My config part:<br><br>stream{<br> upstream graylog_syslog {<br> server SERVER_A:1514;<br> server SERVER_B:1514;<br> }<br> server {<br> listen 514;<br> proxy_pass graylog_syslog;<br> }<br> upstream graylog_beats {<br> server SERVER_A:5044;<br> server SERVER_B:5044;<br> }<br> server {<br> listen 5044;<br> proxy_pass graylog_beats;<br> }<br> upstream graylog_gelf {<br> server SERVER_A:12201;<br> server SERVER_B:12201;<br> }<br> server {<br> listen 12201;<br> proxy_pass graylog_gelf;<br> }<br>}<br><br></div>And the packets from the nginx to the backend servers (ok, I know one log message can be fregmented to multiple TCP packages...):<br><br>tcpdump -nn -i any \(dst host SERVER_A or dst host SERVER_B\) and not port 9000 -r /tmp/log.debug | awk '{print $5}' | sort -n | uniq -c<br> 485 SERVER_A.5044:<br> 4157 SERVER_B.1514:<br> 7424 SERVER_B.5044:<br><br></div>Latency:<br><br>64 bytes from SERVER_A: icmp_seq=1 ttl=64 time=0.521 ms<br>64 bytes from SERVER_A: icmp_seq=2 ttl=64 time=0.523 ms<br>....<br>64 bytes from SERVER_B: icmp_seq=1 ttl=64 time=0.136 ms<br>64 bytes from SERVER_B: icmp_seq=2 ttl=64 time=0.222 ms<br><br></div>Any idea?<br><br></div>Thanks,<br><br></div>Norbert<br><div><div><div><div><br><br></div></div></div></div></div>
</div><br></div>
</div></div></div><br></div>