Replicated vs Global Services In Docker Swarm
Feature |
Replicated Service |
Global Service |
---|---|---|
Scaling |
Scaling up or down by giving a desired number of replicas |
Can not scale up or down by giving a desired number. |
Node-centric deployment |
It does not guarantee to run one replica on each node. |
It guarantees to run one replica on each node. |
On Node Failure or Delete |
After deleting a worker node, it will still distribute the same number of replicas mentioned while running to the available nodes. |
After deleting a node, the total replica number will decrease by one. |
Use cases |
Applications are horizontally scaled up or down. |
Ideal for those that need one instance per node, like a monitoring agent. |
Examples |
A web server has 5 replicas. |
A log collector is running on each node to collect logs. |
Replicated VS Global Services In Docker Swarm
Docker Swarm is a container orchestration tool used to manage multiple Docker containers across a cluster. In this guide, I will first discuss what Docker Swarm is. Then I will discuss the difference between the key services, which are replicated services and global services. After this, I will walk you through the different steps to perform both replication service and global service in a Docker Swarm.
Contact Us