Reputation: 145
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.
Upvotes: 0
Views: 901
Reputation: 111506
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.
Upvotes: 2