strong-cluster-control
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/strong-cluster-control package

    2.2.4 • Public • Published

    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 api.

    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.

    Install

    npm i strong-cluster-control

    DownloadsWeekly Downloads

    1,104

    Version

    2.2.4

    License

    Artistic-2.0

    Unpacked Size

    49.4 kB

    Total Files

    13

    Last publish

    Collaborators

    • rmg
    • ritch
    • rfeng
    • bajtos
    • 0candy
    • amir-61
    • hacksparrow
    • superkhau
    • kraman
    • thegman
    • davidcheung
    • tonyf-ibm
    • qpresley
    • kjdelisle
    • jannyhou2016
    • b-admike