Welcome! Log In Create A New Profile

Advanced

nginx doesn't switch upstream in some cases

Guillaume Filion
February 10, 2010 09:24AM
Hi all,

We're running nginx as a load balancer in front of two reverse proxies
(Apache2/mod_security) for our web site.

It's been working great except last night apache stopped on one of the
reverse proxy and nginx would continue sending HTTP requests to it. The
result was that about 50% of the requests to the web site failed.

If I unplug the reverse proxy, nginx detects that it's down and will
only send requests to the "good" reverse proxy.

Here's my config, I guess that my "proxy_next_upstream" is wrong but I
can't figure out how... It would be great if someone could shed some
light on this issue for me.

=====
upstream SRACQ {
server 192.168.1.57:80;
server 192.168.1.67:80;
}

server {
listen 66.254.57.167:80;
server_name www.sracq.qc.ca;
access_log /var/log/nginx/www.sracq.qc.ca_HTTP.access.log;
error_log /var/log/nginx/www.sracq.qc.ca_HTTP.error.log;

location / {
proxy_next_upstream error timeout invalid_header http_500;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;

proxy_pass http://SRACQ;
}
}
=====

Thanks a lot,
GFK's
--
Guillaume Filion
http://guillaume.filion.org/

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

nginx doesn't switch upstream in some cases

Guillaume Filion February 10, 2010 09:24AM

Re: nginx doesn't switch upstream in some cases

Maxim Dounin February 10, 2010 09:40AM

Re: nginx doesn't switch upstream in some cases

Guillaume Filion February 10, 2010 10:38AM

Re: nginx doesn't switch upstream in some cases

Guillaume Filion February 10, 2010 01:42PM

Re: nginx doesn't switch upstream in some cases

Piotr Sikora February 10, 2010 01:50PM

Re: nginx doesn't switch upstream in some cases

Benjamin Pineau February 12, 2010 03:28AM

Re: nginx doesn't switch upstream in some cases

Guillaume Filion February 12, 2010 08:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 233
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready