Multi-host Docker networking
-
Consider two docker hosts Server-1 and Server-2.
-
On each host a docker container is launched (c1 and c2)
-
If c1 and c2 are in same host and same network we can use bridge network driver, which enables communication. Bridge can work with in one system , not across systems
-
When we add multiple hosts, then we do it for
- High availability
- Fault Tolerance
-
We need an orchestrator, to manage multi host docker containers, we have many options, but popular ones are
- Docker Swarm
- Kubernetes
-
Coming back to networking, in docker we have a driver called as overlay, which can enable multi host networking (Swarm)
-
Refer Here for Overlay Networking
-
Refer Here for Docker Swarm