Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note
titleContent Freeze

As of July 25th, 2023, there is a content freeze on this page.

Node.js by default is using a single core of a processor for code execution. Therefore, Node.js introduced a cluster module to spawn processes. “Cluster” was introduced to scale an application execution on multiple processor cores by creating worker processes. Worker processes share a single port, therefore, requests are routed through a shared port.

...

You can read more about that cluster module on the Node.js website https://nodejs.org/api/cluster.html

 


Create a new config file for the cluster module in your Profound.js installation directory (/profoundjs by default) called cluster.json

Code Block
languagejavascript
titleprofoundjs/cluster.json
{                    
"workers": 4,    
"min_workers": 4     
}                    

...


Modify the start.js file to include the cluster module

...