3 ms·
Most likely using the cluster module and your favorite IPC module. https://nodejs.org/api/cluster.html https://nodejs.org/api/cluster.html
by numlock86 4y ago
Most likely using the cluster module and your favorite IPC module.
https://nodejs.org/api/cluster.html https://nodejs.org/api/cluster.html
- yrgulation 4y agoThat or https://nodejs.org/api/worker_threads.html#worker-threads https://nodejs.org/api/worker_threads.html#worker-threads
- ksbrooksjr 4y agoMy go-to method of inter-process communication in Node without using any third party modules is to just use process.send[1] to a send a message to the main thread, and then have it forward messages to the workers in the cluster, which you can listen for using the message event [2]. [1] https://nodejs.org/api/process.html#processsendmessage-sendhandle-options-callback https://nodejs.org/api/process.html#processsendmessage-sendh... [2] https://nodejs.org/api/process.html#event-message https://nodejs.org/api/process.html#event-message