Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker overlay network among different datacenters

all. I'm learning Docker. But still cannot find any documentations about how Docker ingress network connect several separated hosts.

I have 2 VMs in different datacenters and want create swarm cluster on them. Is it possible that default installed ingress network makes containers on vm1 visible for containers on vm2 inside some overlay network? Or both vm1 and vm2 should be in same local network?

like image 836
Michael Avatar asked Feb 04 '26 15:02

Michael


1 Answers

In general, it's not recommended to span datacenters within a Swarm. You can span availability zones (datacenters in same geo area that are ~10ms or less latency) but between regions should be their own Swarms. This is 100% a latency issue of inter-virtual-network traffic (overlay driver) and the Raft consensus traffic between Swarm managers. There is no hard limit on latency, but you likely don't want the complexity in a single Swarm of trying to prevent traffic in your apps from hopping back and forth between datacenters... unless the datacenters are very low latency.

For more data on this look at the Docker Success site (search swarm overlay and filter to reference), as the Docker EE requirements for Swarm are the same as Docker CE generally.

The other requirement between nodes in a Swarm is that they have ports open between each other's public IP's. Ideally, there is no NAT between nodes.

like image 57
Bret Fisher Avatar answered Feb 06 '26 08:02

Bret Fisher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!