Welcome! Log In Create A New Profile

Advanced

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

Ali Nebi
November 07, 2012 09:52AM
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.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

Ali Nebi November 07, 2012 09:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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