0

I have application deployed on tomcat server on machine A,B,C,D I want to load balance using the Nginx using two load balancer nodes LB1 & LB2.

All documents talks about using single node as load balancer.is it possible using two Nginx node as load balancer?

If we have a critical application running on server require the zero down time. If we go with one LB and for some reason LB itself fails,then there will be an issue.

| improve this question | | | | |
0

The way to do this without a hardware loadbalancer in front of nginx is using something like keepalived It allows you to create a VIP (Virtual IP) address that floats between the two nginx servers. So how it works is keepalive runs in active/standby mode so 1 nginx server is taking all the traffic and has the VIP attached to it. As soon as the standby server sees the active server down it tells the upstream switch the VIP is over here now so update your MAC table and send traffic to me now.

| improve this answer | | | | |
0

Use VRRP/CARP to create active/passive HA-cluster. On Linux user ucarp, on FreeBSD use if_carp(4). Everything besides that is like for one nginx balancing instance. server {} of course has to be listening on CARP address.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.