npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ZooKeeper

v0.2.2

Published

ZooKeeper is a NodeJS process manager focused on managing cluster processes.

Downloads

8

Readme

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