Swarm Manager High Availability (HA)

Let's learn about Swarm managers' native support for high availability (HA).

So far, we’ve added three manager nodes to a swarm. Why three? And how do they work together?

Swarm managers

Swarm managers have native support for high availability (HA). This means one or more can fail, and the survivors will keep the swarm running.

Technically speaking, swarm implements a form of active-passive multi-manager HA. This means that although you have multiple managers, only one of them is active at any given moment. This active manager is called the “leader”, and the leader is the only one that will ever issue live commands against the swarm. So, it’s only ever the leader that changes the config, or issues tasks to workers. If a follower manager (passive) receives commands for the swarm, it proxies them across to the leader.

Command execution in a swarm

This process is shown in the figure below. Step 1 is the command coming into a manager from a remote Docker client. Step 2 is the non-leader manager receiving the command and proxying it to the leader. Step 3 is the leader executing the command on the swarm.

Get hands-on with 1200+ tech skills courses.