Answer the question
In order to leave comments, you need to log in
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
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.
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 questionAsk a Question
731 491 924 answers to any question