2
votes

For a system that implements Raft, if the leader node goes down and between the time the leader is down and a new leader is elected, a log write request arrives, then does it succeed or is the system unavailable during this period?

1

1 Answers

3
votes

The system is unavailable until a new leader is able to commit an entry from its current term. If a request reaches an old leader, the old leader may attempt to replicate it but will ultimately fail due to a higher term, in which case that leader should reject the client’s request and step down. If a requests reaches a node that is not a leader, it can either reject and force the client to retry or enqueue the request to be forwarded to the next leader.

Clients should really handle these cases by retrying requests for some reasonable amount of time when no leader is available. So, to the user of the client a leader change may just appear like high latency.