Replicated and global services

There are two quite different types of services that we might want to run in a cluster managed by an orchestrator. They are replicated and global services. A replicated service is a service which is required to run in a specific number of instances, say 10. A global service, in turn, is a service that is required to have an instance running on every single worker node of the cluster. I have used the term worker node here. In a cluster managed by an orchestrator, we typically have two types of nodes, managers and workers. A manager node is usually exclusively used by the orchestrator to manage the cluster and does not run any other workload. Worker nodes, in turn, run the actual applications.

So, the orchestrator makes sure that, for a global service, an instance of it is running on every single worker node, no matter how many there are. We do not need to care about the number of instances, but only that on each node it is guaranteed to run a single instance of the service.

Once again, we can fully rely on the orchestrator to take care of this feat. In a replicated service, we will always be guaranteed to find the exact desired number of instances, while for a global service, we can be assured that on every worker node, there will always run exactly one instance of the service. The orchestrator will always work as hard as it can to guarantee this desired state.

In Kubernetes, a global service is also called a daemon set.