Docker Community Forums

Share and learn in the Docker community.

Nginx load balancer with high availability and DNS name


Say i have a swarm cluster or two managers and 3 slaves.
Each slaves is running a container of a java application and each manager is running an nginx load-balancer.
The LB is tested and i’m seeing my requests to it being routed to different slaves each time.

I want to setup a floating IP and a active/passive relationship between the two managers who run the LB. when the active LB machine dies, i want the passive one to take over. I’ve been reading a lot about load-balancing HA but wasn’t able to create a working example.

To my understanding i think i also need a VIP so that the two LBs will be accessed by the same address.
Is it possible to setup this in a local environment? I’m working with virtual machines in Windows and i have a static IP from my ISP (if that’s relevant in anyway).

Any help on this matte would be much appreciated.

Thanks, Yarin.