作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2022, Vol. 48 ›› Issue (11): 170-176. doi: 10.19678/j.issn.1000-3428.0064348

• 移动互联与通信技术 • 上一篇    下一篇

基于负载均衡算法的Hyperledger Fabric共识机制研究

贺鹏飞1, 范鹏飞1, 尹千慧1, 王中训1, 张桐敬2, 梁大伟3   

  1. 1. 烟台大学 物理与电子信息学院, 山东 烟台 264005;
    2. 华能山东烟台发电有限公司烟台发电厂, 山东 烟台 264002;
    3. 烟台市食品药品检验检测中心, 山东 烟台 264000
  • 收稿日期:2022-03-31 修回日期:2022-06-05 发布日期:2022-08-22
  • 作者简介:贺鹏飞(1980—),男,副教授、博士,主研方向为工业互联网、短距离无线通信;范鹏飞、尹千慧,硕士研究生;王中训,教授;张桐敬、梁大伟,工程师。
  • 基金资助:
    2021年度烟台市校地融合发展项目(1521001-WL21JY01)。

Research on Hyperledger Fabric Consensus Mechanism Based on Load Balancing Algorithm

HE Pengfei1, FAN Pengfei1, YIN Qianhui1, WANG Zhongxun1, ZHANG Tongjing2, LIANG Dawei3   

  1. 1. School of Physics and Electronic Information, Yantai University, Yantai, Shandong 264005, China;
    2. Yantai Power Generation Plant, Huaneng Shandong Power Generation Co., Ltd., Yantai, Shandong 264002, China;
    3. Yantai Food and Drug Inspection and Testing Center, Yantai, Shandong 264000, China
  • Received:2022-03-31 Revised:2022-06-05 Published:2022-08-22

摘要: Hyperledger Fabric将业务逻辑解耦,在提升系统灵活性的同时存在性能瓶颈,无法满足高并发快响应的业务需求。通过对Hyperledger Fabric共识机制中的背书、排序、验证3个阶段进行分析,为均衡背书节点性能并提高系统效率,设计基于动态负载均衡算法的提案分发优化方案。综合均衡指数、反馈周期等性能指标,设计节点负载和节点权值量化方法。通过采集节点负载信息计算并选取合理的反馈周期和影响权重以更新节点权值,同时结合加权轮询算法将交易提案分发至当前权重最大的节点进行背书,实现背书节点负载的动态均衡。在Caliper工具上的测试结果表明,优化方案提升了Hyperledger Fabric共识机制的请求处理性能,相比于原始方案的链码交易和查询吞吐量提高了17.53%和15.84%,平均时延下降了6.7%和18.2%。

关键词: 区块链, Hyperledger Fabric平台, 共识机制, 负载均衡, 背书阶段

Abstract: Hyperledger Fabric decouples business logic.Although it improves system flexibility, it has performance bottlenecks and cannot satisfy the high concurrency or fast response needs of businesses.This study analyzes the three stages of endorsement, sorting, and verification in the Hyperledger Fabric consensus mechanism.To balance the performance of endorsement nodes and improve system efficiency, this study provides a proposal distribution optimization scheme based on a dynamic load balancing algorithm.The optimization scheme integrates performance indicators, such as the balance index and feedback cycle, and designs a quantification method for node loads and weights.The optimization scheme calculates and selects a reasonable feedback period and influence weight to update the node weight by collecting the node load information.Simultaneously, the scheme uses the weighted round robin algorithm to distribute the transaction proposal to the node with the current largest weight for endorsement to realize the dynamic balance of the endorsement node load.The test results on the Caliper tool show that the optimization scheme improves the request processing performance of the Hyperledger Fabric consensus mechanism.Compared with the original scheme, the chaincode transaction and query throughput of the optimization scheme is increased by 17.53% and 15.84% and the average delay is decreased by 6.7% and 18.2%, respectively.

Key words: blockchain, Hyperledger Fabric platform, consensus mechanism, load balancing, endorsement stage

中图分类号: