S
S
serg_nik2017-06-15 17:20:29
Node.js
serg_nik, 2017-06-15 17:20:29

How to reduce everything to one nodejs server?

At first, for each web application, I created my own server on a separate port. For half a year, the list of processes in pm2 has a vertical scroll)))
Now I want to optimize everything - create one server that will listen to all requests to the domain. The question is how to deal with sockets. In the correct (KMK) method, there is only one port, and there are more than 5 projects on sockets.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Korobkov, 2017-06-15
@BorisKorobkov

If the applications are independent, it is better to leave them separate.
Unless, for convenience, let everyone listen to one port, but on different domains.

S
serg_nik, 2017-06-15
@serg_nik

That's right, all applications are independent of each other.
Now 42 nodejs servers, 12 sockets are running on vps. All this is routed through nginx proxy (another "sheet" from upstream). There is one voice from Boris that it is better not to touch anything. Is there another opinion?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question