For the main solution, you can use Socket.IO , if you already use it and know how it works, it will do its job since it allows you to communicate between the client and server, where the client can be another server in another language.
If you need a more robust solution with additional options and controls, or that can handle higher traffic bandwidth (although this should not be a problem if you ultimately just send it through a relatively slow Internet), you can look at something like ΓMQ ( ZeroMQ ). This is a message queue that gives you more control and many different communication methods besides request-response.
When you install both options, I would recommend using your server with an intensive processor as a stable end (server) and your web server as your client. Assuming you are using the same server for tasks with an intensive processor, and you are using multiple instances of the NodeJS server to use multi-core processors for your web server. This simplifies your communication, as you want to have one point to connect.
If you plan to use multiple CPU servers, you need to set up a routing server that can route between multiple web servers and multiple CPU servers, in which case I would recommend additional work on training ΓMQ.
source share