基于消息传递机制的Paxos算法在执行过程中需要进行大量网络通信,应用于广域网环境时易受带宽的限制而影响算法效率。为此,对Paxos的通信模型进行优化,提出改进的W—Paxos算法。通过在每个数据中心内部增设代理节点来接收、处理和发送广域网消息,从而大幅减少广域网消息数量,解决因Paxos消息过多而引发的网络拥塞、延迟增加等问题。由于仅对经典Paxos的通信模型进行优化,因此改进算法适用于多数Paxos协议族中的协议。实验结果表明,在低带宽环境下,W—Paxos产生的消息数量较Mencius和EPaxos算法更少,能有效减缓领导者的负载压力,提高吞吐率并降低通信延迟。
Paxos algorithm based on message passing mechanism incurs a large amount of communication during execution. When applied to Wide Area Networks(WAN) environment,it is vulnerable to the limit of bandwidth, which affects the efficiency of the algorithm. Aiming at this problem, this paper optimizes the communication model of Paxos and presents an improved algorithm,which is named W-Paxos. It sets a proxy node in each data center for forwarding, disposing and sending WAN messages to reduce the messages in WAN massively so as to avoid network congestion and increasing delay. Since W-Paxos only optimizes the communication model without changing other parts of the protocol,it is applicable to almost all Paxos-based protocols. Experimental results show that, compared with Mencius and EPaxos algorithms,W-Paxos generates fewer messages,therefore it can retard the workload of the consensus leaders,increase the throughtput and reduce the communication delay.