Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

tuning load balancer

$
0
0
I am having two machines (A and B) that run apache web servers. Nginx on machine A balances the load between those apache web servers (machine A weight=1, machine B weight=3).
Apart from apache server, machine A performs a lot more demanding services which results with significantly slower client serving than machine B.
Therefore, I was thinking to reroute web traffic to machine B and to free machine A of web requests
My current load balancer settings are:

upstream MyServer_production_balancer {
server 192.168.0.1:81 weight=1; # Machine A - 25% of load
server 192.168.0.2:80 weight=3; # Machine B - 75% of load

I was thinking of two solutions:

1.
upstream MyServer_production_balancer {
server 192.168.0.1:81 down;
server 192.168.0.2:80;

2.
upstream MyServer_production_balancer {
server 192.168.0.2:80;

I would like to know whether any of the above mentioned solutions would work and whether this approach makes sense anyway (especially option #2)

one more question:
With current load balancer settings (1:3), is it possible to online follow where has nginx transferred a request (to machine A or machine B) using tail -f or similar command.

thanx for all the answers.

Viewing all articles
Browse latest Browse all 4759

Trending Articles