Mini RaFT-Consensus (Reliable and Fault-Tolerant)
- Simulates leader, candidate, and follower nodes in a distributed cluster.
- Supports voting and leader election among candidate nodes.
- Implements leader crash and recovery, demonstrating fault tolerance.
- Tie resolution: automatic revoting if multiple candidates receive the same maximum votes.
- Configurable number of nodes, number of candidates, and crash timing.
-
clone
git clone https://github.com/rohithr018/mini-raft.git
-
change directory
cd mini-raft
-
Adjust Number of Nodes at main.go file
numberOfNodes := X //Total Number of Nodes in the System numberOfCandidates := Y //Number or Candidate Nodes(must be lessthan numberOfNodes)
-
Run the main file:
go run main.go
-
Terminal Images
-
Initial Node Status
-
Normal Election Scenario
-
Tie Election Scenario
-
-
Output File
- Full simulation output: output.txt


