0.0.4 • Published 8 years ago

chanh-masterha-plugin v0.0.4

Weekly downloads
3
License
-
Repository
-
Last release
8 years ago

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.