zio / zio-keeper

A ZIO library for building distributed systems
https://zio.dev/zio-keeper
Apache License 2.0
199 stars 41 forks source link

Leader election #101

Open pshemass opened 4 years ago

pshemass commented 4 years ago

we should support leader election to be able to assign role to particular node in the cluster.

mijicd commented 4 years ago

The purpose of this ticket is to come up with the simplest leader election protocol as possible. @pshemass has an idea, and egalitarian paxos might be the alternative.

I propose to keep this issue as research ticket until we come up with the decision / prototypes / follow-up tickets.

vpavkin commented 4 years ago

So I did a small research of my own:) EPaxos doesn't actually look even close to simple, IMO. Then there's CASPaxos which is known to be somewhat simpler than raft, but is not quite battle-tested. Although people are trying to make it work in real systems. Overall, I'd probably still go with raft, as it's proven to work and is relatively simple.

mijicd commented 4 years ago

@vpavkin I've started some drafts with Raft, so we can probably pair up on that. Let us wait for all updates to land, and I'll try to systematize the ticket and sum it up separately so that we can work together on it. Meanwhile, I don't think we should drop any alternatives, regardless of how simple / complicated they are. If there's volunteers to work - why not have them :).

vpavkin commented 4 years ago

Sure, having alternatives is even better:) I'll stay tuned then for when I can pick something up wrt to this task.