DEV Community

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

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/