I would like to know if it is possible to link multiple swarm managers together to let them cooperate. For example to have one manager forward requests to another manager if it lacks available worker nodes to fullfill the task.
2 Answers
With the newer swarm mode, the tool is embedded in the docker engine and it only talks to other nodes in the same swarm. There is not any capability to talk to other swarm clusters, yet.
With the classic swarm tool that runs as a container, the API is compatible with the docker API and could theoretically communicate hierarchically, with one manager talking to other managers instead of directly to nodes. However, classic swarm does not have the API's to talk to the newer swarm mode, so containers would be spun up directly on the listed nodes, and not within the new orchestration tools.
For your purposes, what you probably want is to dynamically deploy nodes with a cloud environment, and automatically attach those nodes as additional workers in your swarm.

- 231,797
- 42
- 475
- 450
You can have multiple swarm managers in the same swarm. The goal is to add fault tolarance as described in the swarm doc. I don't think its supported to link multiple swarms though.

- 14,613
- 7
- 41
- 62