Process cluster
process-cluster
will asist you in creating any child process cluster, it uses
forever-process
to makes sure that cluster will run forever.
Features
- Fork a child process
- Spawn any process
- Fork a chile process with node cluster capabilities
- To any size of cluster
- Cluster will run forever, we use
forever-process
to make sure it does.
Simple usage
Creating a cluster of Node cluster module. Notice, the with this multiple nodejs process will be able to "share"(over IPC) the same port when receiving any net requst such as http.
const ProcessCluster = ;const cluster = ;const processCluster = size : 3 { cluster; return cluster; };processCluster;processCluster;processClusterstart;
Creating a cluster of Node process with IPC communication without 'port' sharing.
const ProcessCluster = ;const fork = ;const processCluster = size : 3 { return ; };processCluster;processCluster;processClusterstart;
API
Well, the API is quite simple. You can see this TypeScript declaration.
declare