node.js - Is there a single event loop for the entire Node runtime?

65 views Asked by At

After reading this post, it has given me the impression that Node starts its event loop only when I start a server, with the listen() method.

Is that true ?

What happens if I start multiple servers on different ports ? Does that mean there are multiple event loops per server ?

Also what happens if on one terminal I write-:

node server1.js

and on the second terminal I write

node server2.js

How may node processes will be there and how many event loops will be running ?

So does the event loop start up with the node.js runtime or is it specific to the starting of an app/server ?

0

There are 0 answers