Computer and Modernization ›› 2020, Vol. 0 ›› Issue (12): 1-8.

    Next Articles

LC-Raft: A Consensus Algorithm Based on Calculated Value of Historical Log

  

  1. (1. National Network New Media Engineering Research Center, Institute of Acoustics, Chinese Academy of Sciences, Beijing 100190, China;
    2. University of Chinese Academy of Sciences, Beijing 100049, China)

  • Online:2021-01-07 Published:2021-01-07

Abstract: Raft consensus algorithm has been widely used in the industry because of its clear principle and easy implementation. However, as a simplified version of the Paxos-like solution, the Raft algorithm sacrifices part of its performance. In different specific application scenarios, some aspects can be improved according to the actual application. For a distributed system composed by devices with poor stability, it will go through multiple election processes in the working cycle. In each election process, there is a small probability that the election operation based on Raft algorithm will experience multiple timeout elections. In order to reduce the time-consuming of the election process in extreme cases, this paper designs an improved version of the consensus algorithm LC-Raft. By counting the number of failures in the history log, a set of node stability evaluation indicators are constructed, and the election process is modified. Based on these above steps, the algorithm is able to realize that the election process can be completed before timeout when the system network is unblocked. At the same time, based on the Docker container engine, a series of simulation experiments are designed to realize the election process of different node sizes. Multiple statistical data can verify the good performance of the algorithm in the election process.

Key words: consensus algorithm, Raft, election process, timeout election, history log