Docker Swarm Architecture
This is a high-level architectural view of Docker Swarm. In the diagram we have three manager nodes (similar to the Master nodes of Kubernetes). A node is an individual Docker Engine participating in the swarm. Swarm is a Mode which consists of multiple Docker hosts which run in a cluster. We always have an odd number of manager nodes. If we have a development or test environment where availability is not a big concern we can only use one manager node, but in production we will generally have either three or five manager nodes. Worker nodes are nodes where where the actual workloads are run. The workers nodes communicate with each other using the gossip protocol.
Swarm Nodes Breakdown
Docker Swarm has two types of nodes – Manager nodes and Worker nodes.
1. Manager nodes
Manager nodes are the machines that we communicate with. Manager nodes are used to assign work to the other nodes. It accepts command from client and creates service object(s).
Manager nodes handle cluster management tasks like maintaining the cluster state, scheduling the services, and serving the swarm mode HTTP API endpoints. It maintains a consistent state of the swarm and services running on it. It Allocates IP addresses to tasks, Assigns nodes to tasks and Checks in on workers
2. Worker nodes
Worker nodes are the nodes where the containers run actually. Worker nodes connects to the dispatcher to check the assigned tasks and executes the tasks assigned to it.
Docker Swarm: Building a Highly Scalable Cluster
Docker Swarm is one of the most popular container orchestration engines. It is not only used by professional engineers but also by people is their learning phase of how operations work. What makes Docker Swarm so popular is the fact that is very lightweight and very simple to understand – you don’t even have to learn a new CLI for Docker Swarm, we can use it with Docker CLI.
In this article, we will learn about Docker Swarm, its features, and use cases and will also go through a tutorial to create highly scalable clusters in Docker Swarm.
Contact Us