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.
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.