DEV Community

Discussion on: Is Node.js really single-threaded?

Collapse
 
aminmansuri profile image
hidden_dude

So does this mean that there's no advantage in running Node on a super beefy 16 core machine?

Collapse
 
dealloc profile image
Wannes Gennar

Honestly, if you're looking to make use of heavy multithreading; Javascript just isn't the language you should be looking at I'm fraid

Collapse
 
santhoshrt profile image
Santhosh Reddy

It's a practice to spawn multiple instances of the app with this type of setup.
Have a look at cluster module.

nodejs.org/api/cluster.html

Collapse
 
haseebsaeed profile image
haseebsaeed

To get started with multiple instances, have a look at pm2. You can spawn as many instances as your cpu cores.

pm2.keymetrics.io/