# Swarm mode VIP without HAProxy using VIPs?

**URL:** <https://forums.docker.com/t/swarm-mode-vip-without-haproxy-using-vips/29202>\
**Category:** Swarm\
**Tags:** swarm\
**Created:** [March 3, 2017, 12:54pm UTC](https://forums.docker.com/t/swarm-mode-vip-without-haproxy-using-vips/29202 "2017-03-03T12:54:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mostolog](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@mostolog](https://forums.docker.com/u/mostolog)\
**Post date:** [March 3, 2017, 12:54pm UTC](https://forums.docker.com/t/swarm-mode-vip-without-haproxy-using-vips/29202/1 "2017-03-03T12:54:17Z")

</div>

Hi.

I have spent several hours trying to understand how swarm mode works and how the routing mesh does his magic. However, and perhaps is a missing/ongoing feature, [I still haven’t found what I’m looking for.](https://www.youtube.com/watch?v=e3-5YC_oHjE)

IIUC, once the message is delivered to any swarm node, it’s smartly delivered to a container running on a node, so no matter which node receives the request, it will work. That’s fantastic.

However, according to [https://docs.docker.com/engine/swarm/ingress/#configure-an-external-load-balancer](https://docs.docker.com/engine/swarm/ingress/#configure-an-external-load-balancer) you still need something like HAproxy to forward requests to swarm nodes in order to ensure HA.

At this point I’m a bit confused: why doesn’t docker daemon create a virtual IP interface, shared among hosts, in order to ensure HA without needing HAproxy? Seems other people is also confused: [Docker 1.12 swarm still needs http (reverse) proxy?](https://forums.docker.com/t/docker-1-12-swarm-still-needs-http-reverse-proxy/16915/2)

In this scenario:

- DNS is configured to resolve [foo.com](http://foo.com) to 1.2.3.4
- node1(manager) creates the swarm using 1.2.3.4 as “cluster IP”. VIP 1.2.3.4 is assigned to node1
- node2 and node3 join the swarm
- node1 goes does
- node2 becomes the new manager, and gets 1.2.3.4

Am I missing something?

---

<div class="post-metadata">

**Author:** ![sean9999](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/sean9999/32/15385_2.png) [@sean9999](https://forums.docker.com/u/sean9999)\
**Post date:** [March 4, 2017, 2:34pm UTC](https://forums.docker.com/t/swarm-mode-vip-without-haproxy-using-vips/29202/2 "2017-03-04T14:34:25Z")

</div>

AFAIK, the logic is that there can be several managers. So the _services_ are HA, not the nodes. The DNS service ensures that any request to any node is directed to the right service, no matter which node that service actually lives on.

---

<div class="post-metadata">

**Author:** ![mostolog](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@mostolog](https://forums.docker.com/u/mostolog)\
**Post date:** [March 6, 2017, 10:47am UTC](https://forums.docker.com/t/swarm-mode-vip-without-haproxy-using-vips/29202/3 "2017-03-06T10:47:30Z")

</div>

That’s exactly what I am talking about.  
Is there any way to HA swarm nodes (providing services)?

---

<div class="post-metadata">

**Author:** ![sden](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/sden/32/10596_2.png) [@sden](https://forums.docker.com/u/sden)\
**Post date:** [March 9, 2017, 1:41pm UTC](https://forums.docker.com/t/swarm-mode-vip-without-haproxy-using-vips/29202/4 "2017-03-09T13:41:16Z")

</div>

…the idea is to schedule service’s replicas to different nodes (odd or even count of nodes depending on how your service implement HA)
