title: Docker Swarm --advertise-addr changing
body: <p>I have a 3 node swarm. Each of which has a static ip address. I have a leader node-0 on ip <code>192.168.2.100</code>, a backup manager node-1 on <code>192.1682.101</code>, and a worker node-2 on <code>192.168.2.102</code>. node-0 is the leader that initialized the swarm, so the <code>--advertise-addr</code> is <code>192.168.2.100</code>. I can deploy services that can land on any node, and node-0 handles the load balancing. So, if I have a database on node-2 (<code>192.168.2.102:3306</code>), it is still reachable from node-0 <code>192.168.2.100:3306</code>, even though the service is not directly running on node-0.</p>
  
  <p><a href="https://i.stack.imgur.com/8Ghcf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Ghcf.png" alt="enter image description here"></a></p>
  
  <p>However, when I reboot node-0 (let's say it loses power), the next manager in line assumes leader role (node-1) - as expected.</p>
  
  <p>But, now if I want to access a service, let's say an API or database from a client (a computer that's not in the swarm), I have to use <code>192.168.2.101:3306</code> as my entry point ip, because node-1 is handling load balancing. So, essentially from the outside world (other computers on the network), the ip address of swarm has changed, and this is unacceptable and impractical.</p>
  
  <p>Is there a way to resolve this such that a given manager has priority over another manager? Otherwise, how is this sort of issue resolved such that the entry point ip of the swarm is not dependent on the acting leader? </p>