Does a swarm "notice" and intercept links to a DOWN node?

Say for example I have a swarm, and a link goes to, but is down, do the rest of the swarm members notice that it is down and intercept the request, and process it, even if that target address is down? And then display a domain name (DNS), even though it is running on another ip address? Is this possible?

If not, is there some way to achieve this, using swarm. I am not sure if my question(s) are clear? I’m completely new to swarm so do not understand if this is possible (i.e. the rest of the swarm intercepts the traffic targeting that port on that ip address (in the link going to the downed ip address:port) and processes it?)

First of all: Swarm is not responsible for public DNS. It is neither involved, nor does it solve problems related to DNS.

In HA szenarios, people typicaly point the dns entries to publicly reachable loadbalancers, which point to containerized reverse proxies running on the swarm nodes as target. The reverse proxy instances on the nodes need to be configured to forward traffic to the target swarm services.

The loadbalancer typicaly is an external component, which is neither part of docker, nor swarm itself.
When it commes to reverse proxies as entry point to the container world: Traefik does a marvelous job in forwarding traffic to target containers, based on domain names or context paths.

1 Like

A small addition to Metin’s post. Let’s say you don’t have a load balancer outside the swarm cluster and you just have three nodes on which you can install anything. You can use KeepAlived and set up a virtual IP (floating IP) and point all of your domains to that IP. When the active node goes down, an other node will get that IP address soon automatically.

Of course, if you want, you can install a loadbalancer on each node too, so any active node can be a load balancer. I used a similar aproach with Kubernetes API server. There is an article about it for Swarm, but that runs HAProxy in a container:

1 Like