DEV Community

Discussion on: Increase Node JS Performance With Libuv Thread Pool

Collapse
 
tomeraitz profile image
Tomer Raitz

Great article, thank you for that!
I did not know about this ability in nodejs, so I have a nuby question, is it make a difference if I run one project on the machine or several projects? For example, I use a host cloud like Heroku, and I believe they run many nodejs projects on a single machine. Is this important?

Collapse
 
bleedingcode profile image
💻 Bleeding Code-By John Jardin

Hi Tomer. Thanks for the response and sorry for the late reply. It seems Dev.to doesn't notify me when users comment on my articles.

To answer your question simply, you need to balance how many nodejs apps you run on a machine, because each nodejs app requires resources to initiate and keep running. If you have 5 web services running as 1 nodejs app, it would be less resource intensive than running 1 nodejs app per web services (i.e. 5 nodejs apps).

However, you don't want to put yourself in a position where all your services are now running as 1 nodejs application...this would start looking like a monolithic app, which is not what you want.

I would group together a subset of services that make sense to be together and run them as a nodejs application.

Make sense?

Collapse
 
tomeraitz profile image
Tomer Raitz

Yes, Thank you for the answer, I think this information is essential, even though it's something the DevOps team / CTO need to deal with this, but it's good to know this kind of configuration to help them make the project better.