ZooKeeper
ZooKeeper is a NodeJS process manager focused on managing cluster processes.
Last updated 4 years ago by ajeo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ZooKeeper 
SYNC missed versions from official npm registry.

ZooKeeper

ZooKeeper is a production process manager for Node.JS with a build in cluster manager. ZooKeeper allows you to manage and control your production applications. ZooKeeper keeps your applications alive and enables you to reload your applications without down time.

The aim with ZooKeeper is to create and manage cluster environments easily through a intuitive command line interface and a robust API. ZooKeeper uses process events to check the health of a process and truly update a process without downtime.


ZooKeeper is currently in alpha development and it is strongly advised to not use it in a production environment.

Getting started

In order to start your application do we first need to make a few preparations. ZooKeeper makes use of process events and we need to add the required process events to let ZooKeeper manage your processes without any trouble.

When your application is ready to use do you need to send a 'ready' event to the master cluster manager. You can do this via 'process.send'

process.send('ready');

To gracefully shutdown your application do you have to catch the 'SIGTERM' signal that is send by the master cluster manager and gracefully shutdown your application before a new worker is spawned.

process.on('SIGTERM', function() {
  process.exit(0);
});

Start your application

You can start your application by simply running the following command TIP: use the shortcut zk instead of zookeeper

zookeeper start <path> [-n (name of worker) -w (ammount of workers)]

Status of your running processes

To see the status of your running processes simply run:

zookeeper status

Workers

You can also easily add extra workers to your cluster:

zookeeper add <process> <amount>

Or if you want to reduce the amount of workers running:

zookeeper kill <process> <amount>

And that's it run zookeeper with the help flag in order to see all available remaining commands:

zookeeper --help

Current Tags

  • 0.2.2                                ...           latest (4 years ago)

6 Versions

  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 2
Last Month 5
Dependencies (10)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |