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.
- 🚀 Get started: Guide · Docs · FAQ · DeepWiki.
- 💡 Examples: 0.10.0-alpha.37 · 0.9.
- 🙌 Questions? Ask on Discord, in a GitHub discussion, in our Feishu group, or on WeChat:
drmingdrmer.
- Features: OpenRaft implements nearly all features needed to build applications with Raft.
- Performance: OpenRaft supports 33,000 writes/sec with a single writer and 5,615,000 writes/sec with batch writes. See the benchmarks.
- Coverage: Unit test coverage is 92%.
- Chaos testing: A deterministic simulation fuzzer runs in every CI build.
The Jepsen suite runs 8 nemesis scenarios on every push to
main: network partition, process pause, process kill, slow packets, flaky packets, clock skew, membership churn, and all seven combined.
OpenRaft's API continues to evolve. Upgrades before 1.0.0 may include incompatible changes.
See the changelog. Commit messages start with a keyword indicating the type of change:
data-change:changes on-disk data types and may require a manual upgrade.change:introduces incompatible changes.feat:adds compatible, non-breaking features.fix:contains only bug fixes.
| Branch | Status | Release | Upgrade guide |
|---|---|---|---|
main / release-0.10 |
Alpha; active development | 0.10.0-alpha.37 | 0.9 → 0.10 |
| release-0.9 | Bug fixes only | 0.9.25 (changelog) | 0.8 → 0.9 |
Unsupported releases
release-0.8, release-0.7, and release-0.6 are closed; their upgrade guides remain available.
This benchmark measures the OpenRaft framework with minimal storage and networking; see benchmark details.
| Clients | Single writes (put/s) | Batch writes (4 entries/batch, put/s) |
|---|---|---|
| 4096 | 3,548,000 | 5,615,000 |
| 1024 | 3,006,000 | — |
| 256 | 1,808,000 | — |
| 64 | 912,000 | — |
| 1 | 33,000 | — |
- ✅ Generalized membership changes: change any set of nodes in one operation, using one log entry when safe or joint consensus otherwise.
- ✅ Flexible quorums: choose threshold, weighted, hierarchical, grid, explicit, or custom rules, with separate election and commit quorums.
- ✅ High throughput: streaming replication and batch writes, backed by an async, event-driven core.
- ✅ Linearizable reads: reads confirmed by a quorum, lease reads, and follower reads.
- ✅ Fully pluggable: customize storage, networking, snapshot transport, and core Raft types.
- ✅ Runtime choice: Tokio, compio, or monoio, with support for
single-threadedapplications. - ✅ Tested with Turmoil and Jepsen: deterministic simulation and fault testing check Raft invariants, linearizability, and recovery.
See the full feature list.
- Databend - Cloud analytics.
- Walrus - Distributed message streaming.
- Hiqlite - Embedded SQLite with caching.
Check out the CONTRIBUTING.md guide for more details on getting started with contributing to this project.
Thanks to everyone who contributes to OpenRaft:
OpenRaft is licensed under the terms of the MIT License or the Apache License 2.0, at your choosing.
OpenRaft originated from async-raft.