# Docker Swarm

With using Docker Swarm we can combine mutiple Docker machines together into a single cluster .

\>>Docker swarm take care of distributing our services & application instances into separate HOSTS for high availability & for LOAD balancing across different systems & hardware .

![](/files/-MEaigv5U1mhn2xpBuNQ)

To setup Docker swarm we need multiple DOCKER HOST with Docker installed on them. The we designate one HOST to be the manager or the master /Swarm Manager & other as Workrs .

Run docker swarm init on manager & that will initialize the swarm manager&#x20;

![](/files/-MEajMd-Z8JvHNav6jI-)

![](/files/-MEajZumIhg4jQhtVZY7)

The key component of Swarm orchestartor is docker service ..

Docker service are one or more instances of single application that runs the nodes of swarm clsuter .


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://architectures.gitbook.io/project/docker/container-orchestration-docker-swarm-and-kubernetes/docker-swarm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
