Skip to content

Automated fault monitoring and leader-election system for strongly-consistent, highly-available writes to PostgreSQL (Joyent SDC, Manta).

License

Notifications You must be signed in to change notification settings

TritonDataCenter/manatee

Repository files navigation

Manatee

                   _.---.._
      _        _.-' \  \    ''-.
    .'  '-,_.-'   /  /  /       '''.
   (       _                     o  :
    '._ .-'  '-._         \  \-  ---]
                  '-.___.-')  )..-'
                           (_/

This repository is part of the Joyent SmartDataCenter project (SDC). For contribution guidelines, issues, and general documentation, visit the main SDC project page.

Overview

Manatee is an automated fault monitoring and leader-election system for strongly-consistent, highly-available writes to PostgreSQL. It can tolerate network partitions up to the loss of an entire node without loss of write (nor read) capability. Client configuration changes are minimal and failover is completely free of operator intervention. New shard members are automatically replicated upon introduction.

Check out the user-guide for details on server internals and setup.

Problems? Check out the Troubleshooting guide.

Migrating from Manatee 1.0 to 2.0? Check out the migration guide.

Working on Manatee? Check out the Working on Manatee guide.

Features

  • 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 and PostgreSQL synchronous replication for safe, reliable storage.

Quick Start

Client

Detailed client docs are here.

var manatee = require('node-manatee');

var client = manatee.createClient({
   "path": "/manatee/1",
   "zk": {
       "connStr": "172.27.10.97:2181,172.27.10.90:2181,172.27.10.101:2181",
       "opts": {
           "sessionTimeout": 60000,
           "spinDelay": 1000,
           "retries": 60
       }
   }
});

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');
});

About

Automated fault monitoring and leader-election system for strongly-consistent, highly-available writes to PostgreSQL (Joyent SDC, Manta).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published