Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Etcd | 44,541 | 4,048 | 2,844 | 19 hours ago | 401 | May 11, 2023 | 231 | apache-2.0 | Go | |
Distributed reliable key-value store for the most critical data of a distributed system | ||||||||||
Rqlite | 14,037 | 3 | 2 | 2 days ago | 42 | April 14, 2021 | 60 | mit | Go | |
The lightweight, distributed relational database built on SQLite | ||||||||||
Tikv | 13,623 | 21 hours ago | 1,533 | apache-2.0 | Rust | |||||
Distributed transactional key-value database, originally created to complement TiDB | ||||||||||
Dragonboat | 4,743 | 33 | a day ago | 142 | June 14, 2023 | 34 | apache-2.0 | Go | ||
A feature complete and high performance multi-group Raft library in Go. | ||||||||||
Sofa Jraft | 3,309 | 5 | 15 | 4 days ago | 31 | April 10, 2023 | 54 | apache-2.0 | Java | |
A production-grade java implementation of RAFT consensus algorithm. | ||||||||||
Raft Rs | 2,584 | 17 | 16 | 8 days ago | 12 | June 16, 2021 | 58 | apache-2.0 | Rust | |
Raft distributed consensus algorithm implemented in Rust. | ||||||||||
Atomix | 2,333 | 24 | a month ago | 14 | February 07, 2023 | 7 | apache-2.0 | Go | ||
A Kubernetes toolkit for building distributed applications using cloud native principles | ||||||||||
Fisco Bcos | 2,174 | a day ago | 161 | apache-2.0 | Shell | |||||
FISCO BCOS(发音为/ˈfɪskl bi:ˈkɒz/)是一个稳定、高效、安全的许可区块链平台,已被广泛应用于现实的行业应用。截至目前,已拥有4000多家企事业单位,300多个行业数字标杆应用,涵盖文化版权、司法服务、政府服务、物联网、金融、智慧社区、房地产建设、社区治理、乡村振兴等领域。FISCO BCOS (pronounced /ˈfɪskl bi:ˈkɒz/) is a stable, efficient, and secure permissioned blockchain platform that has been widely used in real-world industry applications. | ||||||||||
Awesome Consensus | 1,504 | 2 years ago | 1 | |||||||
Awesome list for Paxos and friends | ||||||||||
Summitdb | 1,327 | a year ago | 12 | other | Go | |||||
In-memory NoSQL database with ACID transactions, Raft consensus, and Redis API |
Floyd is an C++ library based on Raft consensus protocol.
When we want to coordinate services, ZooKeeper is always a good choice.
In our opion, a single service is much more simple than two services. As a result, an embeded library could be a better choice.
type | API | Status |
---|---|---|
Consensus | Read | support |
Consensus | Write | support |
Consensus | Delete | support |
Local | DirtyRead | support |
Local | DirtyWrite | support |
Query | GetLeader | support |
Query | GetServerStatus | support |
Debug | set_log_level | support |
Language | Leader election + Log Replication | Membership Changes | Log Compaction |
---|---|---|---|
C++ | Yes | No | No |
Dependencies
Get source code and submodules recursively.
git clone --recursive https://github.com/Qihoo360/floyd.git
make
Then right now there is three examples in the example directory, go and compile in the corresponding directory
contains many cases wrapped floyd into small example
Get all simple example will make command, then every example will start floyd with five node
make
raftis is a consensus server with 5 nodes and supporting redis protocol(get/set command). raftis is an example of building a consensus cluster with floyd(floyd is a simple implementation of raft protocol). It's very simple and intuitive. we can test raftis with redis-cli, benchmark with redis redis-benchmark tools.
compile raftis with command make and then start with run.sh
make && sh run.sh
#!/bin/sh
# start with five node
./output/bin/raftis "127.0.0.1:8901,127.0.0.1:8902,127.0.0.1:8903,127.0.0.1:8904,127.0.0.1:8905" "127.0.0.1" 8901 "./data1/" 6379 &
./output/bin/raftis "127.0.0.1:8901,127.0.0.1:8902,127.0.0.1:8903,127.0.0.1:8904,127.0.0.1:8905" "127.0.0.1" 8902 "./data2/" 6479 &
./output/bin/raftis "127.0.0.1:8901,127.0.0.1:8902,127.0.0.1:8903,127.0.0.1:8904,127.0.0.1:8905" "127.0.0.1" 8903 "./data3/" 6579 &
./output/bin/raftis "127.0.0.1:8901,127.0.0.1:8902,127.0.0.1:8903,127.0.0.1:8904,127.0.0.1:8905" "127.0.0.1" 8904 "./data4/" 6679 &
./output/bin/raftis "127.0.0.1:8901,127.0.0.1:8902,127.0.0.1:8903,127.0.0.1:8904,127.0.0.1:8905" "127.0.0.1" 8905 "./data5/" 6779 &
└─[$] ./src/redis-benchmark -t set -n 1000000 -r 100000000 -c 20
====== SET ======
1000000 requests completed in 219.76 seconds
20 parallel clients
3 bytes payload
keep alive: 1
0.00% <= 2 milliseconds
0.00% <= 3 milliseconds
8.72% <= 4 milliseconds
95.39% <= 5 milliseconds
95.96% <= 6 milliseconds
99.21% <= 7 milliseconds
99.66% <= 8 milliseconds
99.97% <= 9 milliseconds
99.97% <= 11 milliseconds
99.97% <= 12 milliseconds
99.97% <= 14 milliseconds
99.97% <= 15 milliseconds
99.99% <= 16 milliseconds
99.99% <= 17 milliseconds
99.99% <= 18 milliseconds
99.99% <= 19 milliseconds
99.99% <= 26 milliseconds
99.99% <= 27 milliseconds
100.00% <= 28 milliseconds
100.00% <= 29 milliseconds
100.00% <= 30 milliseconds
100.00% <= 61 milliseconds
100.00% <= 62 milliseconds
100.00% <= 63 milliseconds
100.00% <= 63 milliseconds
4550.31 requests per second
A simple consensus kv example contain server and client builded with floyd
floyd has pass the jepsen test, you can get the test case here jepsen
Anyone who is interested in raft protocol, used floyd in your production or has wrote some article about souce code of floyd please contact me, we have a article list.