Font Size: a A A

Research On Optimization Of Raft Consistency Algorithm

Posted on:2022-02-15Degree:MasterType:Thesis
Country:ChinaCandidate:J Q ShuFull Text:PDF
GTID:2518306605973229Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
As the basis for building highly available distributed systems,maintaining data consistency between computing nodes in distributed systems is a common concern in academia and in-dustry.The Raft consensus algorithm is widely used to solve data consistency problems in distributed computing systems because of its easy-to-understand principle and ease of im-plementation.However,the strong leader strategy adopted by the traditional Raft algorithm will directly affect the availability of the entire system when the cluster leader node fails,and as the scale of the system increases,the leader node will also become the performance bottleneck of the system.Therefore,in response to the above problems,this paper takes the Raft algorithm as the basis,and optimizes it from two aspects,namely the improvement of log synchronization method and node authority enhancement,to solve the problems of single point of failure and performance bottleneck caused by the traditional Raft algorithm leader node.The specific work is as follows:1.In this paper,a segmented log synchronisation model is designed.The model splits the log synchronisation in the algorithm into two phases,log replication and log negotiation se-quencing,and performs these two phases asynchronously.On the one hand,by spreading the work of processing cluster requests and achieving cluster data consensus to each node,the resource consumption of the leader node is reduced and the load of the cluster is balanced?on the other hand,the cluster nodes adopt the log negotiation and sequencing algorithm to negotiate and sequence the cluster logs,which not only ensures the sequence and correctness of the cluster log submission,but also improves the external response speed of the system.Through the simulation and analysis of the sequencing process in the failure scenario,the security and reliability of the model are verified.2.Based on the segmented log synchronisation model,this paper proposes the Balanced?Raft algorithm to address the problem that the single leader node becoming the system perfor-mance bottleneck in the Raft algorithm.The algorithm stipulates that all nodes in the cluster have equal rights and status to handle cluster transactions,which reduces the dependence on the leader node in the operation of the cluster system and improves the availability of the cluster system? this algorithm redesigns the format of log entries and the criteria for judging identical log entries,adopting the anti-entropy method to perform log consistency checking among cluster nodes,and uses the incremental data comparison approach instead of the full data comparison approach in the checking process,which further reduces the loss of system performance in the consistency checking.In addition,the algorithm uses the idea of seg-mented log synchronization model to design and implement the log synchronization of the cluster,which improves the response speed and throughput of the cluster.Finally,this article implements the Balanced?Raft algorithm on the basis of BRPC,tests and verifies the work done in this article in terms of function and performance.In terms of functional testing,in addition to testing the basic functions of the cluster,concurrent request testing and failure recovery testing are also introduced,which proves the completeness and reliability of the Balanced?Raft algorithm.In terms of performance,the Balanced?Raft al-gorithm is compared with the Raft algorithm in four dimensions: Load balancing,response latency time,throughput and system availability.The experimental results prove that the Balanced?Raft algorithm effectively reduces the excessive load and resource consumption on the leader nodes,improves the utilization of free resources on the follower nodes,and achieves cluster load balancing? when a large number of write requests are connected to the cluster,the response latency and throughput of the Balanced?Raft algorithm are better than those of the Raft algorithm,especially when the number of client write requests reaches 1000 or more,the response latency of the Balanced?Raft algorithm is nearly two times lower than that of the Raft algorithm,and the throughput is nearly 1.2 times higher than that of the Raft algorithm.In addition,the Balanced?Raft algorithm also demonstrates higher availability than Raft in the event of a leader node failure.
Keywords/Search Tags:Distributed system, Single leader, System bottleneck, Raft consensus algorithm optimization
PDF Full Text Request
Related items