When running NATS Servers in different hosts, the command line parameters for all servers could be as simple as:
gnatsd --cluster nats://$HOSTNAME:$NATS_CLUSTER_PORT --routes nats://$NATS_SEED_HOST:$NATS_CLUSTER_PORT
Even on the host where the seed is running, the above would work as the server would detect an attempt to connect to itself and ignore that. In other words, the same command line could be deployed in several hosts and the full mesh will properly form.
>snip
I think I can to set
NATS_SEED_HOST to the internal docker-IP of my docker-swarm leader.
But how to do this?
In the examples I found only the way to set up one service after another. And the second service can grab the IP from the first service and so on...
Another idea I have is to omit the -routes option and to reconfigure the gnatsd-daemons after a "docker stack deploy" with the properNATS_SEED_HOST. Is this possible?
What I have now is the following:
I have 3 nodes. When I publish a message to the cluster it arrives only at one of the three servers.
I think when all the routes are set right I should have the message on ALL 3 nodes.
--
You received this message because you are subscribed to the Google Groups "nats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to natsio+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to natsio+un...@googlegroups.com.