Git Product home page Git Product logo

raftkeeper's Introduction

logo.png

RaftKeeper is a high-performance distributed consensus service. It is fully compatible with Zookeeper and can be accessed through the Zookeeper client. It implements most of the functions of Zookeeper (except: Container node, TTL node, quota etc.) and provides some additional functions, such as more monitoring indicators, manual Leader switching and so on.

RaftKeeper provides a multi-thread processor for performance consideration. But also it provides below guarantee:

  1. Requests response must be returned in order in one session.
  2. All committed write requests must be handled in order, across all sessions.

RaftKeeper data resides in memory and provides snapshot + operation log data persistence capabilities. The execution framework adopts pipeline and batch execution methods to greatly improve system throughput, see Benchmark for details.

RaftKeeper is derived from ClickHouse and take NuRaft as Raft implementation. We really appreciate the excellent work of the ClickHouse and NuRaft team.

How to start?

1. Build RaftKeeper

Build on Centos

Requirement: Centos 7.4+, Gcc 10.2.0+, Cmake 3.12+

# clone project
git clone https://github.com/JDRaftKeeper/RaftKeeper.git
git submodule sync && git submodule update --init --recursive

# build project
export CC=`which gcc-10` CXX=`which g++-10`
cd RaftKeeper && sh build.sh

Build on Ubuntu

Requirement: Ubuntu 20.04+, Clang 13+, Cmake 3.12+

# install tools
sudo apt-get install cmake llvm-13
 
# clone project
git clone https://github.com/JDRaftKeeper/RaftKeeper.git
git submodule sync && git submodule update --init --recursive
 
# build project
export CC=`which clang-13` CXX=`which clang++-13`
cd RaftKeeper && /bin/bash build.sh

Build on macOS

Requirement: macOS 10+, Clang 13+, Cmake 3.12+

# install tools
brew install cmake llvm@13
 
# clone project
git clone https://github.com/JDRaftKeeper/RaftKeeper.git
git submodule sync && git submodule update --init --recursive
 
# build project
export CC=/usr/local/opt/llvm@13/bin/clang CXX=/usr/local/opt/llvm@13/bin/clang++
cd RaftKeeper && sh build.sh

2. Deploy RaftKeeper

Deploy a three nodes cluster.

# use tar.gz file in step 1.
tar -xzvf RaftKeeper.tar.gz
 
# configure it: replace my_id under <my_id> 
# If you deploy a multi nodes cluster, configure id & host under <cluster>. 
#     Pls note that nodes must has different id.
vim RaftKeeper/conf/config.xml
 
# start it
cd RaftKeeper/bin && sh start.sh

3. Access RaftKeeper

You can use ZooKeeper's shell client zkCli.sh to access to RaftKeeper, or you can use Java, python or C ZooKeeper clients to access. Also, RaftKeeper supports Zookeeper's 4lw command.

How to migrate from Zookeeper?

RaftKeeper provides tool to translate Zookeeper data to RaftKeeper format. So you can simply move data into RaftKeeper, detail is in migrate-from-zookeeper.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.