chanh-masterha-plugin

0.0.4 • Public • Published

chanh-masterha-plugin

master ha plugin for chanh, it can be used in chanh(>=0.6).

chanh-masterha-plugin is a master ha plugin for chanh, which uses zookeeper to make master as high availability cluster.

Installation

npm install chanh-masterha-plugin

Usage

Make sure you have installed zookeeper first, then you have built the path you pass to chanh. The configure code in app.js is as follows:

var masterhaPlugin = require('chanh-masterha-plugin');

app.configure('production|development', function() {
  
  app.use(masterhaPlugin, {
    zookeeper: {
      server: '127.0.0.1:2181',
      path: '/chanh/master'
    }
  });

});

You can start your application using chanh start as before, then use chanh-daemon to start a slave master.

Readme

Keywords

none

Package Sidebar

Install

npm i chanh-masterha-plugin

Weekly Downloads

2

Version

0.0.4

License

none

Last publish

Collaborators

  • chanhproject