Home

Awesome

Nexus - Raft Protocol Based Cluster Coordinator

Build Status Coverity Scan Build Status Documentation Status

nexus, used to be known as i name service(ins), is a high available key-value store to hold crucial meta data, which also support mechanism to coordinate large scale services.

nexus is based on Raft protocol to keep consistency between multi-nodes, and provide key-value data access, distributed lock mechanism(lock) and event callback function(watch).

Who Is Using Nexus

nexus was born to provide a Google Chubby style service in Galaxy, a cluster manager system. Now it supports several online services in Baidu, Inc., including Galaxy and Tera.

For those who want to save their important data, who want to keep uniqueness in a cluster, or who want to manage large scale services, please refer to this for some classical usage.

Installation and Usage

Use build.sh to solve dependency problem, or export proper environment variable to tell Makefile to find proper headers and libraries. All necessary dependencies are listed at the beginning of Makefile. Proved on g++ and clang++.

The sandbox directory holds a few scripts for starting a test cluster on localhost and old-fashioned client tools.

Cluster and client use GFlags to parse command line to alter inner parameters. For more information, please refer to this document.

In addition to script version of client, we introduced a new C++ version client, providing more convenient functions for testing and online operations. This client also gives an example on how to work with nexus SDK.

When deploying to online servers, please use control.sh for a single node to start/stop/restart or check the status of health.

Integration and API

Dependencies

To build the whole project, following dependencies must be meet:

For unittest, following dependency must be meet:

Raft defined log compaction function needs a slight change in LevelDB, the modified code is located in thirdparty/leveldb.

Contributing

We welcome any kind of contributions. If there are any developing questions or complaints, please feel free to contact us: opensearch.