Docker Community Forums

Share and learn in the Docker community.

Recommended Maximum of Worker Nodes for a Swarm


(Gzdh) #1


In this document ( ), there is an important note like this:

Docker recommends a maximum of seven manager nodes for a swarm.
Adding more managers does NOT mean increased scalability or higher performance. In general, the opposite is true.

How about the number of worker nodes? Does anyone have any statistics or test reports showing a recommended maximum of worker nodes for a swarm? (under the condition that a max of seven manager nodes for a swarm)

(Manglu) #2

Are you looking for phjysical limits here or general best practice?

The limits are generally high and unless you are running apps at an extremely large scale, you need not worry about these size limits.

Having said that, If you look at the Kubernetes space, they do state some limits

At v1.11, Kubernetes supports clusters with up to 5000 nodes. More specifically, we support configurations that meet all of the following criteria:

  • No more than 5000 nodes
  • No more than 150000 total pods
  • No more than 300000 total containers
  • No more than 100 pods per node

From -

I don’t know of similar limits in Docker Swarm and I would use these values above (from K8s) as a reference guideline for Docker Swarm as well.

In general, higher the number of pods /containers that you need to run, larger the number of nodes that you need.

I don’t even believe there is a need for 7 Master nodes. You should be in reasonable shape with 3 or 5. As the document suggest, using 7 does not increase your performance or scalability. I would start with 3 Managers and see how reliable my masters are and then if need be increase it to 5 Manager nodes.