Raft-S: A Sharding Consensus Algorithm Based on Queue Theory and the Raft
摘要
The Raft is a strong leader consensus algorithm, where the leader is responsible for consensus decisions such as log replication, so the leader is under greater pressure to become a performance bottleneck of the Raft, leading to a limited scale and insufficient scalability of the Raft. Firstly, a sharding consensus algorithm Raft-S is proposed, which linearly increases the scalability and TPS (Transactions per second) ensuring global consistency and security through 2PC (Two-phase commit) protocol and monitoring nodes. Secondly, the PDF (Probability Distribution Function) of consensus time of each shard is modeled using the followers’ delay distribution, thereby measuring the consensus efficiency of shards. Finally, a real-time transaction distribution strategy based on queuing theory is proposed to avoid the transaction imbalance.