https://github.com/fiws/clu
A nodejs cluster manager.
https://github.com/fiws/clu
Last synced: 8 months ago
JSON representation
A nodejs cluster manager.
- Host: GitHub
- URL: https://github.com/fiws/clu
- Owner: fiws
- License: mit
- Created: 2013-10-04T23:15:07.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2017-04-29T20:13:08.000Z (about 9 years ago)
- Last Synced: 2025-04-12T20:55:13.203Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 510 KB
- Stars: 9
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
clu
========
**UNMAINTAINED** – But turns out this module still works with node 6
A cluster manager with a built in CLI and a simple API for plugins.
clu will spawn the requested number of workers, which will share the same port. This way the load gets distributed across all workers and multiple cores can be used effectively. It uses the [node cluster API](http://nodejs.org/api/cluster.html) to do this.
Inspired by [cluster](https://github.com/LearnBoost/cluster).

**Features:**
* built in CLI (optional)
* zero downtime restarts
* restarts workers one after another
* add or remove workers on the fly
* uses the node cluster API
[](https://travis-ci.org/fiws/clu) [](https://david-dm.org/fiws/clu)
## Getting Started
1. `npm install --save clu`
2. Create a server.js that starts your app.
``` JavaScript
var clu = require('clu');
clu.createCluster({
exec: './app.js',
workers: 2,
silent: false,
silentWorkers: true,
cli: true
});
// short: clu.createCluster('./app.js');
clu.use(clu.repl());
```
3. **Start your cluster with `node server start`**
**Use `node server --help` for a list of all commands.**
You can also start the server with `node server`. This will start the server in the foreground.
## Documentation
* [Command Line](https://github.com/fiws/clu/wiki/Commands)
* [API](https://github.com/fiws/clu/wiki/API)
## Plugins
Plugins can be used like this:
``` JavaScript
var cluDnode = require('clu-dnode');
clu.use(cluDnode());
clu.use(clu.repl('myRepl.sock'));
```
**Built in:**
* clu.repl() - a repl interface
**Official:**
* [clu-dnode](https://github.com/fiws/clu-dnode) - dnode interface for clu
**3rd Party:**
contact me if you create any :)
## License
MIT