upsight / dinghy Goto Github PK
View Code? Open in Web Editor NEWDinghy implements leader election using the raft protocol
License: MIT License
Dinghy implements leader election using the raft protocol
License: MIT License
I am experimenting with dinghy using 3 nodes each in their own container. I noticed that when I shutdown 2 of the nodes the remaining node becomes the leader. This would mean, i think, that if there was a network issue such that the node "a" was cut off from nodes "b" and "c", then node "a" would become a leader and "b" and "c" would elect a leader as well.
This was different from my assumption in that I expected that in the case where a consensus could not be reached no leader would be elected. Is my assumption just incorrect for this implementation?
It looks like the errors returned by OnFollower
and OnLeader
are just logged, is that the intended behavior?
I feel like if OnLeader returns an error, the node should StepDown, not sure what a OnFollower error should do though.
If you agree w/ that change, for symmetry how do you feel about adding an OnCandidate
that if it returns a non-nil error, just goes back to being a Follower instead of trying to initiate an election for itself?
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.