Docker Community Forums

Share and learn in the Docker community.

On-prem docker swarm deployment with HA


(Saqibahmed515) #1

Hi there!
I’m doing on-prem deployments using docker swarm and I need application and DB high availability.
As far as application HA is concerned, it works great within docker (service discovery and load balancing), but I’m not sure how to use it on my network. I mean how can I assign a virtual IP to all of my docker managers so that if any of them goes down, that virtual IP automatically points to the other docker manager in the cluster. I don’t want to have a single point of failure in my architecture, that’s why I’m not inclined to use any (single) reverse proxy solution in front of my swarm cluster (because to my understanding, if nginx/HAProxy goes down, the whole system goes into abyss. I would love to know that I’m wrong :slightly_smiling_face: ).

Secondly, I use WebSockets in my application for push notifications which doesn’t behave normally with all the load balancing stuff because socket handshakes get distorted.

I want a solution to these problems without writing anything in code (HA-specific and non-generic like hard coding IPs etc). Any suggestions? I hope I’ve explained my problem correctly.

(Eldeberde) #2

Hi, In testing environment im using keepalived to share a Virtual IP on all managers:

Also can use dns load balancing (which depend on the client to work) or use a external load balancer.


(Archimedes Trajano) #3

You can use DNS Round Robin so your name can point to multiple “workers” not “managers” that are running the entry point of your application.

(Saqibahmed515) #4

Is it production ready?
Secondly, should I use it in the global mode in the swarm? Its documentation says nothing about swarm mode.

(Archimedes Trajano) #5

In general with all these technologies nothing can really be considered production ready unless you have someone to indemnify and support you. However, they cost more, so think of it more as how much risk are you really willing to take.

(Saqibahmed515) #6

I think I’m willing to take that much risk. I’ll give keepalived a try.