created_at2019-08-24 04:16:12.981203
updated_at2020-04-18 17:46:04.370377
descriptionAn implementation of the Raft distributed consensus protocol using the Actix actor framework.
Anthony Dodd (thedodd)



actix raft

Build Status License GitHub issues open GitHub issues closed

An implementation of the Raft distributed consensus protocol using the Actix actor framework. Blazing fast Rust, a modern consensus protocol, an outstanding actor framework. This project intends to provide a backbone for the next generation of distributed data storage systems (SQL, NoSQL, KV, Streaming &c) built with Rust. Please ⭐ on github!

The guide is the best place to get started, followed by the docs for more in-depth details.

This crate differs from other Raft implementations in that:

  • It is fully reactive and embraces the async ecosystem. It is driven by actual Raft related 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 the two traits RaftStorage & RaftNetwork. This provides applications maximum flexibility in being able to choose their storage and networking mediums. This also allows for the storage interface to be synchronous or asynchronous based on the storage engine used, and allows for easy integration with the actix ecosystem's networking components for efficient async networking. See the storage & network chapters of the guide.
  • Submitting Raft RPCs & client requests to a running Raft node is also well defined via the Actix message types defined in the messages module in this crate. The API for this system is clear and concise. See the raft chapter in the guide.
  • It fully supports dynamic cluster membership changes according to the Raft spec. See the dynamic membership chapter in the guide.
  • Details on initial cluster formation, and how to effectively do so from an application level perspective, are discussed in the cluster formation chapter in the guide.

This implementation strictly adheres to the Raft spec (pdf warning), and all data models use the same nomenclature found in the spec for better understandability. This implementation of Raft has integration tests covering all aspects of a Raft cluster's lifecycle including: cluster formation, dynamic membership changes, snapshotting, writing data to a live cluster and more.

If you are building an application using this Raft implementation, open an issue and let me know! I would love to add your project's name & logo to a users list in this project.


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


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

NOTE: the appearance of the "section" symbols § throughout this project are references to specific sections of the Raft spec.

Commit count: 199

cargo fmt