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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.1
    4
  • 1.1.0
    2
  • 1.0.0
    4

Package Sidebar

Install

npm i bigcluster

Weekly Downloads

4

Version

1.1.1

License

MIT

Last publish

Collaborators

  • vietor