DRaft: A double-layer structure for Raft consensus mechanism - Shang, Jiaze; Lu, Tianbo; Cai, Yingjie; Li, Yanfang (Journal of network and computer applications, 2025)
The Raft consensus algorithm is based on the design of the leader, which simplifies the replication of logs and node changes. Unfortunately, the heavy responsibility of system interaction, including receiving requests from clients, transmitting heartbeats and entries, falls solely on the leader. A design with a strong leader can lead to an imbalance in the workload of nodes, thereby causing limited scalability. Additionally, the replication of a sole entry imposes constraints on the throughput. To alleviate these bottlenecks, we put forward a new solution, DRaft, which employs a double-layer architecture and multi-entry replication. To enable DRaft, we revamp the leader change mechanism by introducing Fi-leader and Se-leaders. Moreover, we incorporate a cache-buffer module into DRaft to enable concurrent entry replication. We present a theoretical framework composed of the CPF and CNF models to analyze the consensus success probability of DRaft. We expand DRaft to multi-layer Raft, and discover that the relationship between communication complexity and the number of nodes is proportional. Finally, we implement and evaluate DRaft, comparing its throughput and latency with those of BRaft and Engraft. We show that when 12K TPS is achieved, the latency of BRaft is twice that of DRaft.