Kraft is a distributed, strongly consistent Key-Value store implemented in Rust. It relies on the Raft consensus algorithm to manage log replication and ensure fault tolerance across a cluster of nodes.
Designed for performance and safety, Kraft aims to provide a reliable storage solution while leveraging Rust's memory safety guarantees and asynchronous capabilities.
β οΈ Note: This project is currently under active development (WIP).
- Raft Consensus: Implements Leader Election, Log Replication, and Safety guarantees.
- Strong Consistency: Ensures that all committed data is consistent across the cluster.
- Fault Tolerance: The system remains operational as long as a quorum (majority) of nodes are available.
- Async I/O: Built on top of Tokio for high-performance non-blocking networking.
- Persistent Storage: Logs and state are persisted to disk to survive crashes.
- Simple API: Basic
GET,PUT, andDELETEoperations.
Kraft follows the standard Raft architecture:
- Leader: Handles all client requests and replicates log entries to followers.
- Follower: Passive node that responds to requests from leaders and candidates.
- Candidate: A node attempting to become the new leader.
Communication between nodes is handled via gRPC (or TCP/UDP depending on implementation), ensuring efficient serialization of Raft RPCs (RequestVote, AppendEntries).
- Rust (latest stable version)
- Cargo
git clone [https://github.com/username/kraft.git](https://github.com/username/kraft.git)
cd kraft
cargo build --release