# strong-cluster-control

> node cluster API wrapper and extensions

Latest version **2.2.4** (published 2018-11-27) · Artistic-2.0 license · 0 weekly downloads

## Install

```sh
npm install strong-cluster-control
pnpm add strong-cluster-control
yarn add strong-cluster-control
bun add strong-cluster-control
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.4 |
| Published | 2018-11-27 |
| First published | 2013-07-16 |
| Weekly downloads | 0 |
| License | Artistic-2.0 |
| TypeScript types | separate (@types/strong-cluster-control) |
| Module format | CommonJS |
| Node | * |
| Dependencies | 2 |
| Unpacked size | 48.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 100 |
| Author | Sam Roberts |
| Maintainers | 0candy, amir-61, b-admike, bajtos, davidcheung, hacksparrow, jannyhou2016, kjdelisle, kraman, octet, qpresley, rfeng, ritch, rmg, superkhau, thegman, tonyf-ibm |
| Keywords | cluster, forever, master, pm, runner, strongloop, strongops, supervisor |

## Links

- npm: https://www.npmjs.com/package/strong-cluster-control
- Repository: https://github.com/strongloop/strong-cluster-control
- Homepage: https://github.com/strongloop/strong-cluster-control#readme
- Issues: https://github.com/strongloop/strong-cluster-control/issues
- npm.io page: https://npm.io/package/strong-cluster-control

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^2.1.3
- [lodash](https://npm.io/package/lodash.md) ^4.17.5

## Recent versions

- 2.2.4 (latest) — 2018-11-27
- 2.2.3 — 2016-05-03
- 2.2.2 — 2016-04-11
- 2.2.1 — 2015-10-01
- 2.2.0 — 2015-09-15
- 2.1.2 — 2015-07-24
- 2.1.1 — 2015-05-21
- 2.1.0 — 2015-05-06
- 2.0.1 — 2015-03-31
- 2.0.0 — 2015-01-13
- 1.0.2 — 2014-12-12
- 1.0.1 — 2014-11-03
- 0.5.1 — 2014-08-21
- 0.5.0 — 2014-07-22
- 0.4.0 — 2014-02-19
- … 7 more at https://npm.io/package/strong-cluster-control/versions

## README

# 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:

```javascript
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](./api.md).


## 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][].

[Artistic 2.0 license]: http://opensource.org/licenses/Artistic-2.0
[StrongLoop Subscription Agreement]: http://strongloop.com/license

---
_Source: https://npm.io/package/strong-cluster-control · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
