0

In the raft paper it is mentioned that cluster configurations are stored and communicated using special entries in the replicated log.

[1] What does special entries mean here? Does each server have information in their entries about total number of other servers in the cluster? If not then how does candidate identify that it received votes from majority?

[2] Also who notifies the leader about change in configuration? Is that the new server who add up in the cluster communicate through those special entries? If the new server does that is my understanding correct : "When the new server adds up as a non-voting member it learns about the present configuration and increments the count of servers in its log entry and sends a request to the leader to change its configuartion?"

Smita
  • 103
  • 7

1 Answers1

0
  1. A special entries means that the Log entry, when applied, doesn't make changes to the state machine, but is instead a special structure that carries information about the cluster configuration. If your state machine is a simple key value store, this new entry wouldn't look like others (set x = 5), instead it would contain the cluster configuration (usually address and port), something like [1 = {1.2.3.4, 10000}, 2 = {1.2.3.5, 10001}, ...]. Yes, each server has the complete cluster configuration in their log and they always use the latest.

  2. In the PhD thesis, chapter 4.4,

For example, the AddServer and RemoveServer RPCs in Figure 4.1 can be invoked by administrators directly, or they can be invoked by a script that uses a series of singleserver steps to change the configuration in arbitrary ways.

would say that the administrator needs to have a way to issue the RPC call to the Raft cluster. This means that you need a way to send that RPC to all servers, and by doing this, you would also inform the current leader.

How you send the RPC to all servers is an implementation detail, you could do it as a separate "client" that only does that, or with some command line flags that would inform the new server it also needs to send the AddServer RPC to all servers on startup.

Your understanding looks good to me, with the exception of the part that it sends the new configuration to the leader. It should broadcast the AddServer RPC. The current leader would then create a new log entry with the configuration containing the new server and start replicating it.

msantl
  • 371
  • 2
  • 6