Skip to content

rothvann/simpleRAFT

Repository files navigation

simpleRAFT — a minimal Raft-based KV store

Overview simpleRAFT is an educational, minimal Raft implementation used as a key-value store. It focuses on clarity and approachability over completeness.

Features

  • Leader election
  • Log replication
  • Read/write client requests
  • In-memory KV state machine

Not Included (Non-Goals)

  • Snapshotting
  • Cluster membership changes
  • Persistence / durable log

These are intentionally omitted to keep the implementation small and easy to follow.

How It Works (High Level)

  • Clients send reads/writes to any node; the leader handles writes.
  • Followers replicate entries via AppendEntries.
  • Once committed, entries are applied to the in-memory KV store.
  • Reads are served from the current KV state.
  • gRPC uses a single bidirectional streaming RPC (Raft/Connect).
  • All requests/responses are wrapped in RaftMessage (oneof payload + replica_id).
  • Nodes and clients send Raft messages over the stream and receive responses on the same stream.

Running (High Level)

  • Kubernetes via k3d scripts: scripts/k3d_reset_and_verify.sh, scripts/run_raft_client.sh, scripts/run_raft_tests.sh
  • Local build via Bazel or Dockerfiles
  • This does not build on MACOS Tahoe! The grpc build step strips the LC_UUID right now and tahoe is strict about this.

About

Simple Raft implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors