Node.js on Windows

Node.js is designed as single threaded. For the production, in order to deal with heavy traffic, splitting Node processes over multiple CPU cores might be useful.

Here is good discussions about using Nodejs Cluster for multiple cores: 

https://www.sitepoint.com/how-to-create-a-node-js-cluster-for-speeding-up-your-apps/

https://medium.com/@snatera15/multithreading-multiprocessing-and-the-nodejs-event-loop-5b2929bd450b 

Overall, using cluster has high requirement of the memory, and it does not equal to multi-threading.


Here is a reference to the best practices: https://devcenter.heroku.com/articles/node-best-practices


The 1st solution came out is utilizing iisnode: https://github.com/tjanczuk/iisnode . Unfortunately, it does not work well with node-oracledb (https://github.com/oracle/node-oracledb).

Here is the error received for iisnode w/ node-oracledb:

 

Also, iisnode lacks maintainance: https://github.com/tjanczuk/iisnode/issues/483

Now I am researching on http://pm2.keymetrics.io/