bigcluster

1.1.1 • Public • Published

bigcluster

NPM Version NPM Downloads

Node.js Smart cluster framwork NodeJS

Installation

$ npm install bigcluster

Usage

var bigcluster = require('bigcluster');
 
bigcluster(0, function(workid) {
    console.log("work id: ", workid);
}, function(workcount) {
    console.log("work count: ", workcount);
});

Parameters

Name Type Description Requirement
count int required work count Y
onWorker function the worker processor Y
onMaster function the master processor N

About count:

Value Description
-1 or <0 workcount = 1, disable cluster mode.
0 workcount = cpu count, auto restart exited worker.
>0 workcount = count, auto restart exited worker.

License

MIT

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i bigcluster

      Weekly Downloads

      1

      Version

      1.1.1

      License

      MIT

      Last publish

      Collaborators

      • vietor