Creating a swarm and managing nodes
Docker swarm mode uses a manager-worker architecture with high availability for managers and workers. Managers are administrator-facing, and you use the active manager to manage the cluster and the resources running on the cluster. Workers are user-facing, and they run the containers for your application services.
Swarm managers can also run containers for your applications, which is unusual in manager-worker architectures. The overhead of managing a small swarm is relatively low, so if you have 10 nodes and three are managers, the managers can also run a share of the application workload.
Swarms can be practically any size. You can run a single-node swarm on your laptop to test the functionality, and you can scale up to thousands of nodes. You start by initializing the swarm with the docker swarm init
command:
> docker swarm init --listen-addr 192.168.2.232 --advertise-addr 192.168.2.232 Swarm initialized: current node (60biyvlde1wche3oldbviac1v) is now...