No description
Find a file
Zhang Yanpo d6b2262cee
Some checks failed
ci / rt-compio (push) Has been cancelled
ci / Build (push) Has been cancelled
ci / openraft-test-bench (nightly) (push) Has been cancelled
ci / test-openraft-core-crates (, nightly) (push) Has been cancelled
ci / test-openraft-core-crates (, stable) (push) Has been cancelled
ci / test-crate-tests (, 0, stable) (push) Has been cancelled
ci / test-crate-tests (, 30, nightly) (push) Has been cancelled
ci / test-crate-tests (single-term-leader, 0, nightly) (push) Has been cancelled
ci / stores (stores/memstore) (push) Has been cancelled
ci / cluster-benchmark (cluster_benchmark) (push) Has been cancelled
ci / rt-monoio (push) Has been cancelled
ci / openraft-feature-test (, nightly) (push) Has been cancelled
ci / openraft-feature-test (serde, nightly) (push) Has been cancelled
ci / openraft-feature-test (serde,singlethreaded, nightly) (push) Has been cancelled
ci / tests-feature-test (, nightly) (push) Has been cancelled
ci / tests-feature-test (single-term-leader, nightly) (push) Has been cancelled
ci / lint (push) Has been cancelled
ci / examples (mem-log, stable) (push) Has been cancelled
ci / examples (raft-kv-memstore, nightly) (push) Has been cancelled
ci / examples (raft-kv-memstore, stable) (push) Has been cancelled
ci / examples (raft-kv-memstore-grpc, nightly) (push) Has been cancelled
ci / examples (raft-kv-memstore-grpc, stable) (push) Has been cancelled
ci / examples (raft-kv-memstore-network-v2, nightly) (push) Has been cancelled
ci / examples (raft-kv-memstore-network-v2, stable) (push) Has been cancelled
ci / examples (raft-kv-memstore-opendal-snapshot-data, nightly) (push) Has been cancelled
ci / examples (raft-kv-memstore-opendal-snapshot-data, stable) (push) Has been cancelled
ci / examples (mem-log, nightly) (push) Has been cancelled
ci / examples (raft-kv-memstore-singlethreaded, nightly) (push) Has been cancelled
ci / examples (raft-kv-memstore-singlethreaded, stable) (push) Has been cancelled
ci / examples (raft-kv-rocksdb, nightly) (push) Has been cancelled
ci / examples (raft-kv-rocksdb, stable) (push) Has been cancelled
ci / examples (rocksstore, nightly) (push) Has been cancelled
ci / examples (rocksstore, stable) (push) Has been cancelled
commit-message-check / check-subject (push) Has been cancelled
Unit test coverage / coverage (push) Has been cancelled
feat: example: handle gRPC payload size limit in append_entries
Implement automatic chunking for append_entries when gRPC payload exceeds
message size limits. When the server returns OutOfRange error, the client
automatically retries by splitting log entries into smaller chunks.

Changes:
- Detect OutOfRange error from gRPC append_entries RPC
- Implement chunked transmission with CHUNK_SIZE=2
- Configure server with 1KB message limit to demonstrate chunking
- Add test_chunk.rs to verify chunking behavior
- Update README with chunking documentation

- Fix: #1496
2025-11-10 13:46:36 +00:00
.github CI: migrate GitHub Actions from deprecated actions-rs to maintained alternatives 2025-10-28 00:30:27 +08:00
change-log docs: Revise documentation comments 2025-08-13 00:35:20 +08:00
cluster_benchmark change: Migrate RaftStateMachine::apply() from Iterator to Stream 2025-11-06 16:04:51 +08:00
examples feat: example: handle gRPC payload size limit in append_entries 2025-11-10 13:46:36 +00:00
guide CI: upgrade workflow actions 2024-10-15 11:33:53 +08:00
macros chore: standardize Cargo.toml formatting across all workspace members 2025-10-30 07:16:52 +00:00
openraft refactor: progress: remove last_log_id from Inflight::Snapshot 2025-11-10 08:16:12 +00:00
rt-compio chore: standardize Cargo.toml formatting across all workspace members 2025-10-30 07:16:52 +00:00
rt-monoio chore: standardize Cargo.toml formatting across all workspace members 2025-10-30 07:16:52 +00:00
scripts chore: Add helper script to sync branch required checks 2025-10-31 22:10:07 +08:00
stores change: Migrate RaftStateMachine::apply() from Iterator to Stream 2025-11-06 16:04:51 +08:00
tests change: Remove PayloadTooLarge error and automatic retry logic 2025-11-07 11:10:08 +08:00
.gitignore Change: Add read_policy parameter to ensure_linearizable and get_read_log_id 2025-05-13 20:05:40 +08:00
.mergify.yml CI: fix mergify condition according to CI name changes 2023-04-26 14:42:18 +08:00
book.toml Chore: change repo url to https://github.com/databendlabs/openraft 2024-12-02 19:20:43 +08:00
Cargo.toml chore: standardize Cargo.toml formatting across all workspace members 2025-10-30 07:16:52 +00:00
change-log.md docs: Revise documentation comments 2025-08-13 00:35:20 +08:00
clippy.toml Prep for 0.5.1 release. 2020-10-05 21:54:53 -05:00
CONTRIBUTING.md CI: PR has to pass fmt check to merge 2022-01-06 16:01:30 +08:00
derived-from-async-raft.md Chore: change repo url to https://github.com/databendlabs/openraft 2024-12-02 19:20:43 +08:00
LICENSE-APACHE Add license info. 2019-08-05 23:00:58 -05:00
LICENSE-MIT Add license info. 2019-08-05 23:00:58 -05:00
Makefile change: avoid Vec allocation in RaftStateMachine::apply() 2025-10-30 09:55:43 +00:00
raft-essentials.md Doc: correct a typo in the raft-essentials.md 2025-04-14 23:27:18 +08:00
README.md docs: comprehensive documentation improvements across codebase 2025-10-08 11:49:31 +08:00
rust-toolchain chore: update toolchain 2025-10-26 17:22:48 +08:00
rustfmt.toml Chore: disable inline attribute 2024-07-03 19:03:00 +08:00

OpenRaft

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

Crates.io docs.rs DeepWiki guides Discord Chat
CI Coverage Status License Crates.io Crates.io

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.

Whatever your style, we're here to support you. 🚀 Let's make something awesome together!

Status

  • The features are almost complete for building an application.
  • Performance: Supports 70,000 writes/sec for a single writer, and 1,000,000 writes/sec for 256 writers. See: Performance
  • Unit test coverage stands at 92%.
  • The chaos test has not yet been completed, and further testing is needed to ensure the application's robustness and reliability.

API 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.

Versions

Roadmap

Performance

The benchmark is focused on the OpenRaft framework itself and is run on a minimized store and network. This is NOT a real world application benchmark!!!

clients put/s ns/op
256 1,014,000 985
64 730,000 1,369
1 70,000 14,273

For benchmark detail, go to the ./cluster_benchmark folder.

Features

  • Async and Event-Driven: Operates based on Raft events without reliance on periodic ticks, optimizing message batching for high throughput.
  • Extensible Storage and Networking: Customizable via RaftLogStorage, RaftStateMachine and RaftNetwork traits, allowing flexibility in choosing storage and network solutions.
  • Unified Raft API: Offers a single Raft type for creating and interacting with Raft tasks, with a straightforward API.
  • Cluster Formation: Provides strategies for initial cluster setup as detailed in the cluster formation guide.
  • Built-In Tracing Instrumentation: The codebase integrates tracing for logging and distributed tracing, with the option to set verbosity levels at compile time.

Functionality:

Who uses it

Contributing

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

Contributors

Made with contributors-img.

License

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