cluster control module, allowing run-time control and monitoring of cluster
JavaScript Makefile
Latest commit 620b903 Feb 16, 2017 @sam-github sam-github committed on GitHub Merge pull request #61 from strongloop/update-deps
Update eslint
Permalink
Failed to load latest commit information.
lib
test update/insert copyright notices May 3, 2016
.eslintrc
.gitignore
CHANGES.md
CONTRIBUTING.md
LICENSE.md relicense as Artistic-2.0 only May 3, 2016
Makefile First tests for master passing Jul 4, 2013
README.md Update README for strong-pm.io Mar 25, 2015
api.md Record and report startTime of every process Apr 24, 2015
docs.json Update docs.json Nov 21, 2013
index.js update/insert copyright notices May 3, 2016
package.json

README.md

strong-cluster-control

node cluster API wrapper and extensions

It is an extension of the node cluster module, not a replacement.

  • runs size workers (optionally), and monitors them for unexpected death
  • soft shutdown as well as hard termination of workers
  • throttles worker restart rate if they are exiting abnormally

It can be added to an existing application using the node cluster module without modifying how that application is currently starting up or using cluster, and still make use of additional features.

This is a component of the StrongLoop process manager, see http://strong-pm.io.

Install

npm install --save strong-cluster-control

Example

To instantiate cluster-control:

var cluster = require('cluster');
var control = require('strong-cluster-control');

// global setup here...

control.start({
    size: control.CPUS
}).on('error', function(er) {
    console.error(er);
});

if(cluster.isWorker) {
    // do work here...
}

API

See http://apidocs.strongloop.com/strong-cluster-control/

License

strong-cluster-control uses a dual license model.

You may use this library under the terms of the Artistic 2.0 license, or under the terms of the StrongLoop Subscription Agreement.