0

I am new to the node.js and read about event loop, but I am curious to know how does event loop work when we use cluster module.

imv_90
  • 145
  • 1
  • 2
  • 9
  • Hi! I think it would be a good idea to expand your question by adding what you've tried so far and making the question more specific. See https://stackoverflow.com/help/how-to-ask – Jakob Runge Sep 20 '16 at 10:46

1 Answers1

2

When you use clustering in Node then you're running several Node processes.

Every Node process has its own event loop. All processes in the cluster can share the server ports but they don't actually share any state, and they don't share the event loops - every process has its own one.

For more info on the Node event loop, see this answer.

Community
  • 1
  • 1
rsp
  • 107,747
  • 29
  • 201
  • 177