MLRaft: Improvement of Raft Based on Multi-log Synchronization Model
Menghao Zhang, Xu Lizhen · 2022
Raft is currently the most popular distributed consensus protocol. Due to the single leader mechanism of Raft, the performance of the distributed system is degraded to that of a single-machine system. Aiming at this shortcoming, this paper proposes a MLRaft protocol based on the multi-log synchronization model. MLRaft divides a single log file in Raft into n log files. For each log file, a leader can be elected to maintain the consistency of the log file. Multiple leaders jointly undertake the requests of the distributed system, which improves the performance of the distributed system and makes the entire cluster more balanced. At the same time, this paper also proposes the priority election method and the dynamic transfer mechanism of leader to ensure the uniform distribution of multiple leaders in distributed nodes. Finally, this paper built a 3-node KV storage system, and tested three aspects of throughput, latency, and load balance. The experimental results show that MLRaft has better performance than Raft.