Welcome! Log In Create A New Profile

Advanced

Re: nginx load balancer help

November 04, 2010 08:28AM
Hello,

There is hardware I have:

- 1 web server (nginx + spawn-fcgi with php) IP: 1.1.1.1
- 2 web-server(spawn-fcgi with php) IP: 1.1.1.2
- 3 web-server(spawn-fcgi with php) IP: 1.1.1.3
- 1 db server (mysql)

nginx piece of config (located at 1.1.1.1):

upstream phpcgi {
server 1.1.1.2:9000 weight=5 max_fails=10 fail_timeout=30s;
server 1.1.1.3:9000 weight=5 max_fails=10 fail_timeout=30s;
server 127.0.0.1:9000 weight=5 max_fails=10 fail_timeout=30s;
}

Doing siege tests I received this info:

siege aborted due to excessive socket failure; you
can change the failure threshold in $HOME/.siegerc Transactions: 567 hits
Availability: 31.78 %
Elapsed time: 214.11 secs
Data transferred: 14.38 MB
Response time: 0.78 secs
Transaction rate: 2.65 trans/sec
Throughput: 0.07 MB/sec
Concurrency: 2.07
Successful transactions: 610
Failed transactions: 1217
Longest transaction: 5.18
Shortest transaction: 0.05

Availability and Transaction rate is too low. The problem, I think, is that requests to MySQL server from php-fcgi backends are very slow (pings from all backends to MySQL server 0.2ms average).

While siege testing load on frontend (1.1.1.1) and backend's (1.1.1.2 and 1.1.1.3) servers was 1 average. MySQL load is ok.

The question is:
How have you achieved good performance with the backend's MySQL server? Is this just a network problem only or there other variants of the problem?

Best regards,
Subject Author Posted

nginx load balancer help

Floren Munteanu April 02, 2009 04:42AM

Re: nginx load balancer help

Floren Munteanu April 02, 2009 04:59AM

Re: nginx load balancer help

Shri @ DevLib.Org April 02, 2009 05:17AM

Re: nginx load balancer help

lbates35406 April 02, 2009 12:23PM

RE: nginx load balancer help

Floren Munteanu April 02, 2009 07:52PM

Re: nginx load balancer help

N3rdMaster November 04, 2010 08:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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