Skip to content

Simplified implementation of the Raft Consensus Algorithm

Notifications You must be signed in to change notification settings

jakubdyszkiewicz/raft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simplified implementation of the Raft Consensus Algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages