Raft implementation on a key-value pair store
This document guides you through setting up, building, and testing the Raft consensus algorithm implementation.
To run this project, you need:
- Go 1.16 or higher
- git
- A macOS environment (macOS M4 MacBook)
- Clone the repository:
git clone https://github.com/sauravfouzdar/raft.git
cd raft- Initialize the Go module (if needed):
go mod tidymake buildmake run-kvstep 3: wait for leader election Wait a few seconds for the cluster to elect a leader. Check which node is the leader:
curl http://localhost:8082/statuscurl -X PUT -d "value=hello_world" http://localhost:8081/kv/mykey
curl http://localhost:8082/kv/mykey
curl -X DELETE http://localhost:8081/kv/mykey
Pull requests are welcome. Would love to hear your feedback and suggestions.