Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 992 Bytes

README.md

File metadata and controls

31 lines (24 loc) · 992 Bytes

Raft

This is simplified implementation of the Raft Consensus Algorithm. There is no log replication yet, current implementation can be used to do leader election.

The implementation supports the contract described there. It is recommended to run dashboard for watching changes.

Dashboard

Build

go build ./...

Test

go test ./...

Run

The first argument is an address that node will bind to. The rest of the arguments are peers. To run 3 nodes that connect with each other:

go cmd/main.go localhost:9001 localhost:9002 localhost:9003
go cmd/main.go localhost:9002 localhost:9001 localhost:9003
go cmd/main.go localhost:9003 localhost:9001 localhost:9002

Known issues

There are race conditions. All requests and events from timer should be processed on one queue to avoid concurrent modifications.