大网数据广告活动
服务器运维问答

Docker-Swarm 1.13 with 3 Nodes acting as Master/Worker

· 52CE 我爱测

We are just trying out Docker-Swarm with 3 Nodes, each node is acting as Master and as Worker. This works fine, but i don't know if the following behavior is "normal". If I shutdown one of those 3 nodes, the swarm handles the rea…

问题原文

原帖链接 · opHASnoNAME · CC BY-SA 3.0

We are just trying out Docker-Swarm with 3 Nodes, each node is acting as Master and as Worker. This works fine, but i don't know if the following behavior is "normal".

If I shutdown one of those 3 nodes, the swarm handles the reallocation of the services fine.

If I shutdown two of those 3 nodes, the services are still working but if i connect to the "last man standing" and try to get my swarm overview with:

docker node ls

i get the following error message:

Error response from daemon: rpc error: code = 4 desc = context deadline exceeded

I am not sure if the swarm can operate when only one node is left? i would guess .. yes?

已采纳解答

原帖链接 · Wee · CC BY-SA 3.0

You have an explanation here : https://docs.docker.com/engine/swarm/raft/

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.

When you are running 3 manager nodes, your cluster can accept to have one node down, because the remaining 2 can agree that the third one is dead.

If you have only one node remaining, maybe it's the one that have a problem. So it will not accept any changes, and you will not have an inconsistent state if your network split.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-06-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。