load balancing between 3 servers where nginx and apache installed on each of them

Ali Nebi anebi at iguanait.com
Wed Nov 7 14:49:56 UTC 2012


Hello,

I have 3 servers and on each server is installed nginx and apache. I want
to set these 3 servers load balance each other. One of them will be main
server that will accept the traffic from clients and balance to the other 2
servers. I have a failover ip that can be switched at any time to the other
2 servers in case that main server fail totally.

So I have a question about nginx configuration related to upstreams part.
Should I proceed that way:

1. On Main server i set upstreas like that:

server 127.0.0.1:8080;   (this is apache installed on same machine)
server server2;   (this is second server, on it on port 80 listens nginx)
server server3 backup; (this is third server, on it on port 80 listens
nginx)

2. On second and third servers i set only 1 upstream:

server 127.0.0.1:8080; (i set only this and not the others to prevent loop)

Is this correct way to do it or there is a better way?


Awaiting for your reply.

Thank you in advance.

Best regards,
Ali



-- 
Iguana Information Technologies, SL
Calle López de Hoyos 35, 1º
28002 Madrid, España (Spain)
+34 915569100
+34 649336286
http://www.iguanait.com/

Advertencia
-----------
Este mensaje contiene información privada y confidencial. Si usted
no es el destinatario, no está autorizado a leer, imprimir, retener,
copiar o difundir este mensaje o parte de él. En caso de que usted
reciba este mensaje por error debe borrarlo. Gracias.

Confidentiality notice
----------------------
This message contains private and confidential information. If you
are not the named addressee, you are not authorized to read, print,
retain, copy or disseminate this message or any part of it. In case
you receive this message by mistake you should delete it. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121107/e8c1566b/attachment.html>


More information about the nginx mailing list