E235
E235

Reputation: 13460

What is the difference between Manager Leader to Manager

On Docker website it is being written:

The MANAGER STATUS column shows node participation in the Raft consensus:

  • No value indicates a worker node that does not participate in swarm management.
  • Leader means the node is the primary manager node that makes all swarm management and orchestration decisions for the swarm.
  • Reachable means the node is a manager node participating in the Raft consensus quorum. If the leader node becomes unavailable, the node is eligible for election as the new leader.
  • Unavailable means the node is a manager that can’t communicate with other managers. If a manager node becomes unavailable, you should either join a new manager node to the swarm or promote a worker node to be a manager.

So the manager leader makes all swarm management and orchestration decisions.
But what are those decisions ?

I can create new service from any of the manager, I don't need to do it from the manager leader.

UPDATE:
It was mentioned in this article, like @Yunakun mentioned, that everything is going through:

Among the managers, the leader node is the one that logs all the actions that are done in the cluster (node added/removed, creation of a service, …). Swarm then ensures that the leader’s logs are replicated within each manager so one of them can take the leader role in case the current one becomes unavailable.

Upvotes: 4

Views: 2609

Answers (1)

Yuankun
Yuankun

Reputation: 7803

Swarm manager nodes use the Raft Consensus Algorithm to manage the swarm state.

Raft is leader-based, which means only the leader node has the ability to change the state of the swarm. If you send a request that requires a state change to a follower node, this request will be forwarded to the leader node.

Those decisions are decisions that can change the swarm state, such as, on which node to deploy a new service or should a running service be scaled.

And the decisions are handled internally by Raft. They should be transparent to users.

Upvotes: 7

Related Questions