Skip to content

Getting Started

david edited this page Jul 18, 2026 · 2 revisions

Getting Started

中文: 快速开始

Prerequisites

  • Rust (recent stable; check rustc --version)
  • macOS / Linux
  • Demo / Jepsen: optional Java 17+ and Leiningen (lein)
export PATH="$HOME/.cargo/bin:$HOME/bin:$PATH"

Clone & test

git clone https://github.com/lanpishu6300/multiraft.git
cd multiraft
cargo test --workspace

Multi-process demo

./scripts/run_demo_cluster.sh

Default --base-port 21000:

Node Raft gRPC Admin HTTP
1 127.0.0.1:21000 http://127.0.0.1:21100
2 127.0.0.1:21001 http://127.0.0.1:21101
3 127.0.0.1:21002 http://127.0.0.1:21102
curl -s http://127.0.0.1:21100/groups/0/value
curl -s -X POST http://127.0.0.1:21100/groups/0/inc \
  -H 'content-type: application/json' -d '{"delta":1}'

Acceptance / chaos / Jepsen

./scripts/acceptance.sh
./scripts/chaos.sh
./scripts/run_jepsen.sh          # ~30s smoke
./scripts/test_all.sh            # CHAOS=1 includes chaos.sh

Clean target/ before large rebuilds if disk is tight.

More: README.md · jepsen.md

Clone this wiki locally