Question: sequenceNum

Skip to first unread message

Oct 14, 2023, 9:04:22 AM10/14/23
to raft-dev
In $6.3 of the dissertation, it explains how we can handle duplicated requests which causes problem in a situation like Fig. 6.2.
It introduces unique client id and sequence number. It sounds like every servers in the group maintain a map of (client id, sequence number) -> response data so it can return a stored response in case of leader crash and subsequent retry request to the new leader.

But how can we implement this? We have to distribute the connection of command and the pair (client id, sequence number) among the group.
My idea is add client id and sequence number to the log entry so the pair is replicated to followers alongside the command. This way, followers can find the connection between them.

This is to me a straightforward solution but also brings me a question: Why do we need a RegisterClient RPC in this case? Does the author have other excellent implementation detail in his mind?

Thanks in advance.

- Akira

Reply all
Reply to author
0 new messages