课程总结
容错次数 2f + 1, f个fail了,还有大多数
架构
log entry contain command term and leader's team
raft有一些错误是靠发出请求端重试来弥补的
这张图要搞懂哦。。。。。。。。
raft动画总结
1.一个node有3个状态 follower, candiate, leader
2. 两个超时First is the election timeout.The election timeout is the amount of time a follower waits until becoming a candidate.The election timeout is randomized to be between 150ms and 300ms.After the election timeout the follower becomes a candidate and starts a new election term...Raft 中有两个控制选举的超时设置,第一个是选举超时时间(election timeout),另一个是心跳超时时间(heartbeat timeout)。 Leader 发送心跳消息是以心跳超时指定的时间间隔进行的,也就是根据heartbeat timeout 发送心跳信息。
3.uncommited,但网络分区结束后可能会roll back
因为动画很简洁,就不打算记录了,直接看动画吧orz
墙裂推荐阅读下面的参考资料,复习时要记得看啊
参考资料:Raft