The invention discloses a distributed
server cluster configuration method based on Raft. The method comprises the steps: configuring cluster nodes, partitioning each
cluster node, and modifying the state of the whole
server cluster, so that the leader node of the
network partition sends the request of the
client to other follower nodes of the
network partition; when the follower node executes theoperation included in the request of the
client in the local
database, enabling the follower node to send the request to the
client; sending a response to the leader node of the corresponding networkpartition, when the leader node receives the response of the corresponding
network partition follower node, enabling the leader node to send the response to the network partition follower node; and setting the request of the client to be in a submission state. In addition, if the follower node does not receive the
heartbeat detection information sent by the leader node within the election timeouttime, the leader node sends the
heartbeat detection information to the leader node; if so, the follower node becomes a candidate node, the candidate node becomes a new leader node of the network partition according to a corresponding rule, and the period number is updated to realize configuration of the corresponding distributed
server cluster.