To take advantage of multiple processors in a server with your Node.js applications, you need to farm work off to child processes. The child_process
module allows you to spawn, fork, and execute work on other processes. The following sections discuss the process of executing tasks on other processes.
Note
Keep in mind that child processes do not have direct access to the global memory in each other or in the parent process. Therefore, you need to design your applications to run in parallel.