Is it possible to avoid a multi leader context

55 views
Skip to first unread message

Adrien Zinger

unread,
Dec 1, 2023, 12:08:44 PM12/1/23
to raft-dev
Hi all,

There is some situations with raft where two nodes can lead at the same time (for at least a small instant). I would like to use raft in a project, but I cannot permits that kind of ambiguous situation. Actually, the idea is to avoid all situations where two or more leaders exist and produce logs simultaneously. Intuitively, I don't think that is possible to do that efficiently.

Is there someone here who already got that usecase? Or any idea about an hypothetical trick to achieve that?

Thanks!

Best regards,
Adrien

Archie Cobbs

unread,
Dec 1, 2023, 12:29:26 PM12/1/23
to raft...@googlegroups.com
You said two different things: (a) avoiding where "two nodes can lead at the same time" and (b) "avoid all situations where two or more leaders exist and produce logs simultaneously".

The verb "lead" there is a little ambiguous, but I think I know what you mean.

In any case, Raft prevents (b) but not (a)...

In other words, it's OK if two nodes *think* that they are leaders at the same time - as long as they can't both actually commit conflicting log entries; this is what the Raft protocol guarantees.

-Archie

--
You received this message because you are subscribed to the Google Groups "raft-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/a4aeaf8e-ee24-4d0e-a9dd-dad80eb21f13n%40googlegroups.com.


--
Archie L. Cobbs
Reply all
Reply to author
Forward
0 new messages