PikaLabs/floyd

Separate read and write operation

Closed this issue · 3 comments

Just read floyd code and raft paper. According to raft paper, read operation will be forwarded to leader and leader holds the whole committed log, that is, the complete meta info.

So is it possible to separate read operation and write operation apart? In this case, for read operation, leader just return to the client without waiting for majority of servers' append entry response. @CatKang @baotiao

For network partition, there is a change that two more leader exist. We need append entry to make sure the leader we read from is still leader.
However, it is possible to separate read and write operation by other method. For details check
https://mp.weixin.qq.com/s?__biz=MzI3NDIxNTQyOQ==&mid=2247484499&idx=1&sn=79acb9b4b2f8baa3296f2288c4a0a45b&scene=0#wechat_redirect

@whoiami according the auther's Phd paper, there is two ways to process read-only operation.

  1. through heartbeat to confirm that leader
  2. lease

I remember floyd had implement the hearbeat way by @CatKang

BTW: don't read article from others, read the origin paper.

Thx. I will check the phd paper later.