imv_90
imv_90

Reputation: 145

How does event loop works when we use cluster module?

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

Answers (1)

rsp
rsp

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

Related Questions