Swarm nodes, managers and quorum
Worked example
This is an offline lesson. Data are fictional and Docker commands are unexecuted. Any optional execution requires an authorized disposable VM, a verified context, synthetic data, restricted access and no external transmission. Do not collect secrets or private output. Use only the fictional worksheet for this exercise. Before a separately authorized read-only server query, verify the effective endpoint including environment overrides, project or cluster identity, and access scope. Never deploy the fragments, use real credentials or transmit private inspection output.
Fictional manager inventory (offline):3 managers: m1, m2, m32 workers: w1, w2Majority required = floor(3 / 2) + 1 = 2m3 unavailable: 2 managers reachable -> majority possiblem2 and m3 unavailable: 1 reachable -> no majorityRead-only manager commands, staged only:docker node lsdocker infoManagers use Raft to agree on cluster state. A majority of configured voting managers must communicate to commit changes. A worker does not count toward that majority. With three managers, one manager failure is tolerable if the other two can communicate; five managers can tolerate two under the same assumption. Two managers still require both and do not tolerate a manager failure. Place managers in independent failure domains with reliable communication; quorum arithmetic alone does not establish real availability. Losing quorum can leave existing tasks running while management changes and rescheduling are unavailable. Do not initialize a swarm on an existing production Engine merely to try the feature. Join tokens are credentials; never place them in course fixtures or logs. The denominator is the configured manager membership, not the currently reachable count. Two reachable managers make majority possible in the three-manager model, but reachability alone does not prove consensus or leader health. Existing tasks may continue during loss of quorum while management operations cannot make progress.
Common mistake
Do not count worker nodes as Raft voters or assume that three managers on one physical host tolerate loss of that host.
Manual practice
Calculate majority and tolerated manager failures for 1, 2, 3 and 5 managers. For five managers split into groups of two and three, identify the partition that could commit changes and state the connectivity assumption.
Worksheet: lab-fixtures/docker-swarm-orchestration/01-nodes-quorum/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Swarm nodes, managers and quorum — Knowledge check
Interpret cluster orchestration evidence and make a safe operational decision.
How many voting managers are needed for a five-manager majority?
Do worker nodes contribute to manager quorum?
What may happen after manager quorum is lost?