R
R
root092016-10-20 13:10:41
Node.js
root09, 2016-10-20 13:10:41

Two nodejs apps on two cores?

There are two completely different applications on nodejs, there is a 4-core server, how can I run these two applications each on a separate core?
I googled, found cluster, but as I understand it, it just can run the same application on several cores, and I need 2 applications - 2 different cores.
I also use pm2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vit, 2016-10-20
@root09

What is there to invent? You start two node processes and that's it.

node first_app.js
node second_app.js

Well, with pm2, as far as I understand, you just need to replace node with pm2 start.
You will start two different processes. The operating system itself will scatter them over different cores if possible and necessary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question