consensus-yaraft is a library for distributed, strong consistent, highly replicated log storage. It's based on yaraft, which is an implementation of the Raft protocol.
consensus-yaraft is an embeddable distributed log storage library that provides strong consistency based on the Raft algorithm.
ReadyFlusher
), even the FSM task queue, can be shared between raft nodes.ReplicatedLog::Write
.consensus-yaraft is written in C++11, please ensure a compiler with C++11 support is installed.
Ensure you have cmake, unzip, libtool, autoconf installed on your system.
Ensure you have leveldb, zlib, openssl installed, because brpc relies on them.
On Ubuntu 14.04
sudo apt install zlib1g-dev libboost-all-dev libsnappy-dev
bash install_dependencies.sh
bash compile_proto.sh
bash run.sh build
Once the building becomes success, the library would be installed in the directory output/
.
For more details about the architecture and design of consensus-yaraft, please read this article. Currently we relies on brpc to implement network communication.
apps/memkv is a prototype of using consensus-yaraft to implement a raft-based in-memory key-value store.
consensus-yaraft is under the Apache 2.0 license. See the LICENSE file for details.