https://github.com/netease/pomelo-masterha-plugin
master ha plugin for pomelo
https://github.com/netease/pomelo-masterha-plugin
Last synced: about 1 year ago
JSON representation
master ha plugin for pomelo
- Host: GitHub
- URL: https://github.com/netease/pomelo-masterha-plugin
- Owner: NetEase
- Created: 2013-08-15T09:56:31.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-11-14T07:07:14.000Z (over 12 years ago)
- Last Synced: 2025-04-14T17:07:41.975Z (about 1 year ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 6
- Watchers: 12
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
pomelo-masterha-plugin
======================
master ha plugin for pomelo, it can be used in pomelo(>=0.6).
pomelo-masterha-plugin is a master ha plugin for pomelo, which uses zookeeper to make master as high availability cluster.
##Installation
```
npm install pomelo-masterha-plugin
```
##Usage
Make sure you have installed zookeeper first, then you have built the path you pass to pomelo. The configure code in app.js is as follows:
```
var masterhaPlugin = require('pomelo-masterha-plugin');
app.configure('production|development', function() {
app.use(masterhaPlugin, {
zookeeper: {
server: '127.0.0.1:2181',
path: '/pomelo/master'
}
});
});
```
You can start your application using pomelo start as before, then use [pomelo-daemon](https://github.com/fantasyni/pomelo-daemon) to start a slave master.