Welcome! Log In Create A New Profile

Advanced

50% of Failed requests with load balance

César M.
November 10, 2010 10:00AM
I'm trying to use nginx for load balancing in my server.
Actually I have 2 servers in the same network with Apache listening the
port 8080 (http://IP:8080/ it's works!). In one of them i install nginx
to
send 50% of requests to one server and 50% to other. The configuration
looks like:

upstream mysite{
server 10.10.14.64:8080;
server 127.0.0.1:8080;
}

server {
server_name 10.10.14.66;

# pass all else onto apache waiting at localhost:8080
location / {
proxy_pass http://mysite;
}
}

When i run ''ab -c 100 -n 1000 http://10.10.14.66/prueba.php'', where
prueba.php only does ''phpinfo()''. The result show:
....
Complete requests: 1000
Failed requests: 499
(Connect: 0, Receive: 0, Length: 499, Exceptions: 0)
....
But if i run the same benchmark individually, there are 0 Fail requests.
Just commenting one server or the other from upstream nginx
configuration.

If i try with a html or jpg file don't get fail requests. But the times
don't improve with the 2 servers. If i does the test directly to port
8080 for each machine, i get 5-6 seg average, but if i does to nginx
with load balance, i get 7-8 seg average. It's that reasonable?

Can anyone help me?

--
Posted via http://www.ruby-forum.com/.

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

50% of Failed requests with load balance

César M. November 10, 2010 10:00AM

Re: 50% of Failed requests with load balance

Reinis Rozitis November 10, 2010 10:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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