Stacks, services, and tasks
When using a Docker Swarm versus a single Docker host, there is a paradigm change. Instead of talking about individual containers that run processes, we are abstracting away to services that represent a set of replicas of each process, and, in this way, become highly available. We also do not speak anymore of individual Docker hosts with well-known names and IP addresses to which we deploy containers; we’ll now be referring to clusters of hosts to which we deploy services. We don’t care about an individual host or node anymore. We don’t give it a meaningful name; each node rather becomes a number to us.
We also don’t care about individual containers and where they are deployed any longer—we just care about having a desired state defined through a service. We can try to depict that as shown in the following diagram:
Figure 14.5 – Containers are deployed to well-known servers
Instead...