Welcome! Log In Create A New Profile

Advanced

Re: nginx upstream fair

Grzegorz Nosek
March 11, 2010 03:50AM
On śro, mar 10, 2010 at 10:05:40 -0500, izghitu wrote:
> 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.

Will try to reproduce it and get back to you. What kind of load are you
testing it with (approximate req/sec, reply size)?

upstream-fair does have a mode of operation which disables round-robin
behaviour but you're not using it here so it does look like a bug.

Best regards,
Grzegorz Nosek

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
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: 184
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