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

计算机工程 ›› 2021, Vol. 47 ›› Issue (9): 44-50,58. doi: 10.19678/j.issn.1000-3428.0058747

• 热点与综述 • 上一篇    下一篇

面向微服务架构的云系统负载均衡机制

施凌鹏1, 朱征2, 周俊松3, 李鑫3, 李静3   

  1. 1. 国网上海市电力公司 信息通信公司, 上海 200072;
    2. 国网上海市电力公司 电力科学研究院, 上海 200437;
    3. 南京航空航天大学计算机科学与技术学院, 南京 210023
  • 收稿日期:2020-06-24 修回日期:2020-08-26 发布日期:2020-09-27
  • 作者简介:施凌鹏(1974-),男,高级工程师、硕士,主研方向为信息通信技术;朱征,工程师;周俊松,硕士研究生;李鑫、李静,副教授。
  • 基金资助:
    国家电网有限公司科技项目“云环境下的容灾备份恢复与业务连续性管理关键技术研究与示范应用”(SGSHXT00JFJS1900093)。

Load Balancing Mechanism for Microservice Architecture in Cloud-based Systems

SHI Lingpeng1, ZHU Zheng2, ZHOU Junsong3, LI Xin3, LI Jing3   

  1. 1. Information and Communication Company, State Grid Shanghai Electric Power Company, Shanghai 200072, China;
    2. Electric Power Research Institute, State Grid Shanghai Electric Power Company, Shanghai 200437, China;
    3. College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 210023, China
  • Received:2020-06-24 Revised:2020-08-26 Published:2020-09-27

摘要: 针对微服务架构的请求响应延迟上升问题,提出一种微服务链感知的请求负载均衡算法。从负载均衡器入手,将微服务链上的平均请求延迟和主机负载情况作为衡量指标,形式化微服务环境和请求延迟,在此基础上研究微服务链调用中存在的共享微服务竞争问题。模拟实验结果表明,与RR算法相比,该算法在复杂的微服务链环境下能够有效降低请求延迟,且在实例分布不均匀的环境中保持较好的负载性能,均衡不同主机之间的负载。在更接近真实应用环境的高频请求测试中,算法能有效降低系统的综合响应时间。

关键词: 微服务架构, 云计算, 负载均衡, 微服务链, 容器化平台

Abstract: In order to solve the rising delay in responding to requests in Microservices Architecture(MSA), a load balancing algorithm for requests is proposed based on microservice chain awareness.To formalize the request delay and microservice environment, the algorithm takes the average request delay and the host loads as the evaluation indicators. On this basis, the competition for shared microservices in microservice chain calling is studied.The simulation results show that compared with the RR algorithm, the proposed algorithm can significantly reduce the delay in requests in complex microservice chain environment.In addition, it keeps excellent loading performance in an environment with unevenly distributed instances, and balances the loads of different hosts.In the more realistic tests of high-frequency requests, the proposed algorithm can significantly reduce the overall response time of the system.

Key words: Microservices Architecure(MSA), cloud computing, load balancing, microservice chain, container platform

中图分类号: