/cpp-raft

A C++ implementation(Demo) of RAFT consensus algorithm.

Primary LanguageC++MIT LicenseMIT

cpp-raft

This is a C++ implementation of the RAFT distributed consensus protocol. Just for learning.

For more details on Raft, you can read In Search of an Understandable Consensus Algorithm by Diego Ongaro and John Ousterhout.

Also have some reference from chishaxie/py-raft.

Todo:

  • Cluster membership changes
  • Log compaction

Dep

Build

$ mkdir build 
$ cd build
$ cmake ../ && make

Run

Back to the source dir.

$ make node1  	
$ make node2	
$ make node3	
$ make server   

Test

$ make test