All Projects → datafuselabs → openraft

datafuselabs / openraft

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
rust raft with improvements

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to openraft

X0
Xzero HTTP Application Server
Stars: ✭ 111 (-86.56%)
Mutual labels:  raft, consensus
Etcd
Distributed reliable key-value store for the most critical data of a distributed system
Stars: ✭ 38,238 (+4529.3%)
Mutual labels:  raft, consensus
Consensus Yaraft
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.
Stars: ✭ 30 (-96.37%)
Mutual labels:  raft, consensus
Atomix
A reactive Java framework for building fault-tolerant distributed systems
Stars: ✭ 2,182 (+164.16%)
Mutual labels:  raft, consensus
Verdi Raft
An implementation of the Raft distributed consensus protocol, verified in Coq using the Verdi framework
Stars: ✭ 143 (-82.69%)
Mutual labels:  raft, consensus
Copycat
A novel implementation of the Raft consensus algorithm
Stars: ✭ 551 (-33.29%)
Mutual labels:  raft, consensus
Tikv
Distributed transactional key-value database, originally created to complement TiDB
Stars: ✭ 10,403 (+1159.44%)
Mutual labels:  raft, consensus
Raft
Raft Consensus Algorithm
Stars: ✭ 370 (-55.21%)
Mutual labels:  raft, consensus
Sofa Jraft
A production-grade java implementation of RAFT consensus algorithm.
Stars: ✭ 2,618 (+216.95%)
Mutual labels:  raft, consensus
Trepang
Trepang is an implementation of Raft Algorithm in Go
Stars: ✭ 111 (-86.56%)
Mutual labels:  raft, consensus
Async Raft
An implementation of the Raft distributed consensus protocol using the Tokio framework.
Stars: ✭ 510 (-38.26%)
Mutual labels:  raft, consensus
Zatt
Python implementation of the Raft algorithm for distributed consensus
Stars: ✭ 119 (-85.59%)
Mutual labels:  raft, consensus
Ratis
Open source Java implementation for Raft consensus protocol.
Stars: ✭ 443 (-46.37%)
Mutual labels:  raft, consensus
Hraftd
A reference use of Hashicorp's Raft implementation
Stars: ✭ 732 (-11.38%)
Mutual labels:  raft, consensus
Nuraft
C++ implementation of Raft core logic as a replication library
Stars: ✭ 428 (-48.18%)
Mutual labels:  raft, consensus
Rqlite
The lightweight, distributed relational database built on SQLite
Stars: ✭ 9,147 (+1007.38%)
Mutual labels:  raft, consensus
Floyd
A raft consensus implementation that is simply and understandable
Stars: ✭ 259 (-68.64%)
Mutual labels:  raft, consensus
Dragonboat
Dragonboat is a high performance multi-group Raft consensus library in pure Go.
Stars: ✭ 3,983 (+382.2%)
Mutual labels:  raft, consensus
Yaraft
Yet Another RAFT implementation
Stars: ✭ 109 (-86.8%)
Mutual labels:  raft, consensus
raft-badger
Badger-based backend for Hashicorp's raft package
Stars: ✭ 27 (-96.73%)
Mutual labels:  raft, consensus

Openraft

Advanced Raft in 🦀 Rust using Tokio. Please on github!

Crates.io docs.rs guides
CI License Crates.io Crates.io

🪵🪵🪵 Raft is not yet good enough. This project intends to improve raft as the next-generation consensus protocol for distributed data storage systems (SQL, NoSQL, KV, Streaming, Graph ... or maybe something more exotic).

Currently, openraft is the consensus engine of meta-service cluster in databend.

Status

  • Openraft API is not stable yet. Before 1.0.0, an upgrade may contain incompatible changes. Check our change-log. A commit message starts with a keyword to indicate the modification type of the commit:

    • DataChange: on-disk data types changes, which may require manual upgrade.
    • Change: if it introduces incompatible changes.
    • Feature: if it introduces compatible non-breaking new features.
    • Fix: if it just fixes a bug.
  • Branch main has been under active development.

    The main branch is for the 0.8 release.

    • The features are almost complete for building an application.
    • The performance isn't yet fully optimized. Currently, it's about 48,000 writes per second with a single writer.
    • Unit test coverage is 91%.
    • The chaos test is not yet done.
  • Branch release-0.8: Latest published: v0.8.1 | Change log v0.8.1 | ⬆️ 0.7 to 0.8 upgrade guide |

  • Branch release-0.7: Latest published: v0.7.4 | Change log v0.7.4 | ⬆️ 0.6 to 0.7 upgrade guide | release-0.7 Won't accept new features but only bug fixes.

  • Branch release-0.6: Latest published: v0.6.8 | Change log v0.6 | release-0.6 won't accept new features but only bug fixes.

Roadmap

  • 2022-10-31 Extended joint membership

  • 2023-02-14 Minimize confliction rate when electing; See: Openraft Vote design; Or use standard raft mode with feature flag single-term-leader.

  • Reduce the complexity of vote and pre-vote: get rid of pre-vote RPC;

  • Support flexible quorum, e.g.:Hierarchical Quorums

  • Consider introducing read-quorum and write-quorum, improve efficiency with a cluster with an even number of nodes.

  • Goal performance is 1,000,000 put/sec.

    Bench history:

    • 2022 Jul 01: 41,000 put/sec; 23,255 ns/op;
    • 2022 Jul 07: 43,000 put/sec; 23,218 ns/op; Use Progress to track replication.
    • 2022 Jul 09: 45,000 put/sec; 21,784 ns/op; Batch purge applied log
    • 2023 Feb 28: 48,000 put/sec; 20,558 ns/op;

    Run the benchmark: make bench_cluster_of_3

    Benchmark setting:

    • No network.
    • In memory store.
    • A cluster of 3 nodes on one server.
    • Single client.

Features

  • It is fully reactive and embraces the async ecosystem. It is driven by actual Raft events taking place in the system as opposed to being driven by a tick operation. Batching of messages during replication is still used whenever possible for maximum throughput.

  • Storage and network integration is well defined via two traits RaftStorage & RaftNetwork. This provides applications maximum flexibility in being able to choose their storage and networking mediums.

  • All interaction with the Raft node is well defined via a single public Raft type, which is used to spawn the Raft async task, and to interact with that task. The API for this system is clear and concise.

  • Log replication is fully pipelined and batched for optimal performance. Log replication also uses a congestion control mechanism to help keep nodes up-to-date as efficiently as possible.

  • It fully supports dynamic cluster membership changes with joint config. The buggy single-step membership change algo is not considered. See the dynamic membership chapter in the guide.

  • Details on initial cluster formation, and how to effectively do so from an application's perspective, are discussed in the cluster formation chapter in the guide.

  • Automatic log compaction with snapshots, as well as snapshot streaming from the leader node to follower nodes is fully supported and configurable.

  • The entire code base is instrumented with tracing. This can be used for standard logging, or for distributed tracing, and the verbosity can be statically configured at compile time to completely remove all instrumentation below the configured level.

Who use it

Contributing

Check out the CONTRIBUTING.md guide for more details on getting started with contributing to this project.

License

Openraft is licensed under the terms of the MIT License or the Apache License 2.0, at your choosing.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].