algorithm - Raft算法: When will term increase?

标签 algorithm raft

enter image description here

Raft divides time into terms of arbitrary length, as shown in Figure 5. Terms are numbered with consecutive integers. Each term begins with an election, in which one or more candidates attempt to become leader as described in Section 5.2. If a candidate wins the election, then it serves as leader for the rest of the term. In some situations an election will result in a split vote. In this case the term will end with no leader; a new term (with a new election) will begin shortly. Raft ensures that there is at most one leader in a given term.

Terms act as a logical clock [14] in Raft, and they allow servers to detect obsolete information such as stale leaders. Each server stores a current term number, which increases monotonically over time.

从此paper ,我们知道任期从选举开始并且单调增加。

我的问题是任期什么时候会增加?

  1. 随着物理时间的推移,它会增加吗?例如每分钟或每小时。

  2. 与逻辑时间有关吗?

  3. 只有在新的选举发生时才会增加吗?

  4. 术语多久更改一次?

  5. 一个期限内将生成多少日志条目?

最佳答案

术语逻辑时间戳,或者在分布式系统中更普遍地称为纪元。术语更改的频率完全取决于节点和网络状况。仅当成员开始新的选举时,任期才会增加。因此,该术语将增加,例如领导者崩溃后,如果网络分区导致某些成员的选举计时器到期,网络中是否有足够的延迟使选举计时器到期,或者选举在没有获胜者的情况下结束。

关于algorithm - Raft算法: When will term increase?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52732010/

相关文章:

python - 检查四的幂 - 边缘情况

共识算法 : what will happen if an odd cluster becomes even because of a node failure?

distributed-computing - 网络断开后,筏跟随者如何重新加入?

algorithm - 如果有多个领导者,Raft 算法如何保证共识?

algorithm - 在 RAFT 中,是否有可能对日志条目达成多数共识但该条目未提交?

algorithm - 数的模逆

algorithm - 同一对角线上的元素列表

java - 找到打开所有灯泡的最少开关数

algorithm - 如何找到任何整数的乘法分区?

mongodb - Raft Vs MongoDB 初选