Overview

In other technologies we have clusters, in docker, we have Swarm. Same concept, different name :)

A swarm in docker is set of servers who act as one and each server can be either: Manager or Worked. It is important to note, that manager is also a worked, but the reverse isn't so. Managers manage workers and workers obey, nothing different than clusters.

Below, you can see basic overview of the swarm:

Setup

Let's set it up. We will have 3 servers:

1 Manager

2 Workers

You can see the creation in the Vagrant section: Multiple Servers Configuration with Vagrant

After the setup is done, please be sure that workers, have joined, we can create the service as follows:

Create service

The creation of the service is rather easy: