Docker swarm multiple managers and workers Vs

♀尐吖头ヾ 提交于 2019-12-04 10:21:04

A Docker swarm with two managers is not recommended.

Why?

Docker swarm implements a RAFT consensus:

Raft tolerates up to (N-1)/2 failures and requires a majority or quorum of (N/2)+1 members to agree on values proposed to the cluster. This means that in a cluster of 5 Managers running Raft, if 3 nodes are unavailable, the system will not process any more requests to schedule additional tasks

So with 2 managers, if one is down, the other will not be able to schedule additional tasks (no cluster upgrades, no new services, etc...).

The docs is also clear about the number of managers you should have for high availability :

Size your deployment

To make the cluster tolerant to more failures, add additional replica nodes to your cluster.

Manager nodes Failures tolerated
    1                 0
    3                 1
    5                 2
    7                 3

So in brief, as the doc states here:

Adding more managers does NOT mean increased scalability or higher performance. In general, the opposite is true.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!