Welcome! Log In Create A New Profile

Advanced

nginx upstream fair

March 10, 2010 10:05AM
Hi,

I have latest nginx on a 64bit CentOS running.

I use it as a load balancer in front of 2 apache servers.

The upstream config is the following:
upstream name {
fair;
server apache1;
server apache2;
}

server {
listen nginx:80;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://name;
}
}

My problem is that the server that I put at the bottom in the upstream conf gets a lot less connections then the server that is first. When load testing and sending lots of connections to the nginx server I can see from the nginx error_log that the connections to apache1 time out but it still tries to send new ones to it while the apache2 server has few connections with nginx and gets few new connections.

If I change the order in the upstream then the problem still persists but with the other server.

Am I doing something wrong?

Please help.
Subject Author Posted

nginx upstream fair

izghitu March 10, 2010 10:05AM

Re: nginx upstream fair

Grzegorz Nosek March 11, 2010 03:50AM

Re: nginx upstream fair

izghitu April 13, 2010 04:49PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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