I see a lot of examples running multiple Docker nodes in swarm mode, but they all mention that the nodes shares a local/private network. I was wondering, is it possible to connect two hosts on a swarm that are not on a private network but can still reach each others over IP and having the correct ports setup ?
This would not be for a production setup.
Are there any Swarm mechanisms that prevent such architecture ?
Thank you for your time !
You can connect swarm nodes over the public internet. What's needed is:
Because of the last requirement, typically people will install nodes in the same region but multiple AZ's. And when you get to multiple regions, you typically see multiple clusters to keep the latency down within a cluster.