When is the random election timeout is chosen?

78 views
Skip to first unread message

M Keyer

unread,
Dec 10, 2022, 11:51:06 AM12/10/22
to raft-dev
Is the election timeout of a node chosen at the startup of a node and then used for the whole lifetime of the node (until it crashes or is shut down)? Or is a new election timeout also chosen during the lifetime of a node?

John Ousterhout

unread,
Dec 10, 2022, 4:31:12 PM12/10/22
to raft...@googlegroups.com
No, a new election timeout must be chosen for each election. This ensures that if multiple nodes happen to start elections at the same time and split the vote, they won't all pick the same timeout for the next election and conflict again.

-John-

On Sat, Dec 10, 2022 at 8:51 AM 'M Keyer' via raft-dev <raft...@googlegroups.com> wrote:
Is the election timeout of a node chosen at the startup of a node and then used for the whole lifetime of the node (until it crashes or is shut down)? Or is a new election timeout also chosen during the lifetime of a node?

--
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/e08d881e-a105-48a7-821e-e2b9d8e3fc4fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages