- Leader election
- Log replication
- master: Leader election & Log replication
- election:Leader election
- replication:Log replication
go build -o simple-raft
go get go get github.com/mattn/goreman
goreman start
simple implementation of raft consensus algorithm
License: Apache License 2.0
注释中说 leader 维护的 LogIndex 大于当前 Follower 的 LogIndex 代表当前 Follower 失联过,所以 Follower 要告知 Leader 它当前的最大索引,以便下次心跳 Leader 返回。
如果 Follower 失联,leader 收不到 heartbeat reply 是不会更新 nextIndex 的, 也就不会漏发 log entries
Hello. Do you intend to keep updating and maintaining this project? I think it's very interesting and convenient for small projects. I doesn't have any updates really or more commits. I wish I could be maintaining the project, so I would like to talk if it's possible or if not interested, perhaps there's a way for collaboration?
Hi ,
在学习raft过程中发现两个问题:
sendRequestVote
中的判断有误,导致现在需要大于(节点数/2+1)个节点赞同才能选举成功提了PR,麻烦帮忙review
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.