Docker聚集了多个管理人员和工作人员 [英] Docker swarm multiple managers and workers Vs
问题描述
我有一个3节点的docker swarm集群。我们可能想要2位经理。我知道一次只有一位领导人。由于它是一个3节点的集群,因此我试图寻找一些文献来了解多管理者的优缺点。我需要此信息,因为在我的3节点集群中,如果我有2个主节点,1个工作线程,那么如果我仅在集群中创建3个主节点,将会带来什么不利影响。任何想法都会有所帮助。
I have a 3 node docker swarm cluster. We might want to have 2 managers. I know at one time there is only one leader. Since it is a 3 node cluster, I am trying to find some literature to understand what are the pros and cons of multiple managers. I need this info since in my 3 node cluster if I have 2 masters, 1 worker, what is the downside if I simply create 3 masters in a cluster. Any thoughts would be helpful.
推荐答案
不推荐使用具有两个管理器的Docker集群 。
A Docker swarm with two managers is not recommended.
为什么?
筏最多可承受(N- 1)/ 2个失败,并且需要(N / 2)+1个成员的多数或法定人数来同意向集群提出的值。这意味着在由5个运行Raft的Manager组成的集群中,如果3个节点不可用,则系统将不再处理任何调度其他任务的请求
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
如果有2位管理者,则其中一个宕机,另一个将无法安排其他任务(无集群升级,无新服务等。)。
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...).
文档也很清楚关于您应该拥有的高级管理人员数量可用性:
调整部署大小
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.
这篇关于Docker聚集了多个管理人员和工作人员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!