title: Docker Swarms and Stacks: What's the difference?
body: <p>I just read Docker's excellent <a href="https://docs.docker.com/get-started/" rel="noreferrer">Getting Started</a> guide, and just wanted to confirm I understand the basic Docker parlance before I go much further. These definitions are <em>somewhat</em> provided in the docs, but a lot of those docs are example-based without giving concrete form to the following concepts.</p>
  
  <p>As such, my <em>understanding</em> is that:</p>
  
  <ul>
  <li><strong>Services</strong>: Docker Services are the different components of your application: the frontend might be a React UI, the backend might be a Spring Boot web service, you might have a MySQL DB as well as a RabbitMQ broker; these would all be different <em>Services</em> all comprising your application.</li>
  <li><strong>Cluster</strong>: Docker Clusters are when you have a Swarm managing 1+ Services for an application across 2+ Docker Hosts; the Cluster simply refers to all the Docker Hosts where your Service containers are running.</li>
  <li><strong>Compose</strong>: Docker Compose is a tool used to manage Services, Swarms and Stacks.</li>
  <li><strong>Stack</strong>: Docker Stacks occur when a Swarm Manager is managing <strong>multiple Swarms for multiple Services</strong>, on a given Cluster, for a given application; hence the difference between a Swarm and a Stack is that a Swarm simply applies to a single Service, whereas a Stack manages multiple Swarms and hence multiple Services that all comprise a scalable and distributed application.</li>
  </ul>
  
  <p>So I ask: am I correct in my understanding of these fundamental terms or am I misled in some way?</p>