Dmitry Istomin
Dmitry Istomin

Reputation: 485

Number of workers for Node.js cluster

I read a few articles about Node.js cluster and normally in examples number of workers matches a number of CPU cores.

What happens if I specify more? Will it bring any benefit?

Upvotes: 1

Views: 255

Answers (1)

Remy
Remy

Reputation: 540

If you have available resources on the system, then you can take advantage of those resources through having multiple node workers.

If you have too much workers, the OS will have to share the resources among your workers - no advantages here.

That's why in your examples the amount of workers matches the number of CPU cores.

Upvotes: 1

Related Questions