Postgres 自动故障转移:Manatee

jopen 9年前

Manatee 是一个基于ZooKeeper的系统能够管理Postgres的备份和自动故障转移,Manatee和Moray共同提供高可用的键值服务。

特性:

  • Automated liveliness detection, failover, and recovery. Reads are always available, even during a failover. Writes are available as soon as the failover is complete.

  • Automated bootstrap. New peers will bootstrap and join the shard without human intervention.

  • Data integrity. Built atop ZFS andPostgreSQL synchronous replication for safe, reliable storage.

客户端代码:

var manatee = require('node-manatee');     var client = manatee.createClient({     "path": "/manatee/1",     "zk": {         "connectTimeout": 2000,         "servers": [{             "host": "172.27.10.97",             "port": 2181         }, {             "host": "172.27.10.90",             "port": 2181         }, {             "host": "172.27.10.101",             "port": 2181         }],         "timeout": 20000     }  });  client.once('ready', function () {      console.log('manatee client ready');  });     client.on('topology', function (urls) {      console.log({urls: urls}, 'topology changed');  });     client.on('error', function (err) {      console.error({err: err}, 'got client error');  });

项目主页:http://www.open-open.com/lib/view/home/1415520972887