How Docker Swarm Works?
The swarm manager nodes handle cluster management, and the main objective is to maintain a consistent state of both the swarm and the services running on it. This includes ensuring that the cluster is running at all times and that services are run and scheduled when needed.
As there are multiple managers running at the same time, this means there is fault tolerance, especially in a production environment. That is, if one manager is shut down, the cluster will still have another manager to coordinate services on the cluster. The sole purpose of worker nodes is to run Docker containers. They require at least one manager to function, but worker nodes can be promoted to being a manager, if needed.
Services permit you to deploy an application image to a Docker swarm. These are the containers to run and the commands to execute inside the running container. Service options are provided when you create a service, where you can specify the ports the application...