电子学报 ›› 2019, Vol. 47 ›› Issue (7): 1497-1505.DOI: 10.3969/j.issn.0372-2112.2019.07.013

• 学术论文 • 上一篇    下一篇

基于拥塞博弈的微服务运行时资源管理方法

罗睿辞1, 叶蔚2, 刘学洋2, 孙基男2, 张世琨2   

  1. 1. 北京大学信息科学技术学院, 北京 100871;
    2. 北京大学软件工程国家工程研究中心, 北京 100871
  • 收稿日期:2018-05-11 修回日期:2018-11-28 出版日期:2019-07-25
    • 作者简介:
    • 罗睿辞 男,1988年生于湖南株洲.北京大学信息科学技术学院博士研究生,主要研究领域为基于Web的软件工程和软件体系结构;叶蔚 男,1985年生于江西全南.北京大学软件工程国家工程中心副教授.主要研究领域为基于Web的软件工程、软件体系结构、应用集成等.E-mail:wye@pku.edu.cn;刘学洋 男,1978年生于湖北钟祥.北京大学软件工程国家工程研究中心副教授,主要研究领域为软件工程、信息安全等.E-mail:liuxueyang@pku.edu.cn

A Runtime Resource Management Approach of Microservices Based on Congestion Game

LUO Rui-ci1, YE Wei2, LIU Xue-yang2, SUN Ji-nan2, ZHANG Shi-kun2   

  1. 1. School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China;
    2. National Engineering Research Center for Software Engineering, Peking University, Beijing 100871, China
  • Received:2018-05-11 Revised:2018-11-28 Online:2019-07-25 Published:2019-07-25

摘要: 随着云计算技术的不断发展,微服务体系结构逐渐成为一种广泛应用的软件设计风格.在基于微服务的应用系统中,微服务数量众多、相互依赖关系复杂、持续在线演化等特征使得微服务运行时资源的有效管理面临新的挑战.本文充分考虑微服务之间的关系特征,提出了一种基于拥塞博弈理论的运行时资源管理方法.首先,对微服务之间的复杂依赖关系进行建模,给出了带权有向无环图描述的微服务调用关系模型;然后,基于微服务关系调用模型对各个微服务的请求到达频率进行计算,并用排队论中的M/G/1队列刻画微服务处理请求的过程,进而设计了一种以服务等级协议(Service Level Agreement)满足程度为衡量标准的服务收益函数;最后利用拥塞博弈模型刻画对计算资源的竞争关系,给出了求解博弈的纳什均衡状态的多项式算法.实验表明,该方法在计算资源有限的场景下可以有效地提高微服务应用的整体性能.

关键词: 微服务体系结构, 资源管理, 博弈论

Abstract: With the continuous development of cloud computing technology, the microservice architecture has gradually become a widely used software design style. In microservice-based applications, different microservices collaborate with one another via interface calls, but they may also compete for limited resources during online evolvement. This poses new challenges for allocating resources efficiently during runtime. To tackle the problem, we propose a novel approach based on congestion game. Firstly, we use a weighted directed acyclic graph to model the inter-relationship of the microservices that compose an application. Then we use M/G/1 queue in queue theory to describe the arrival process of access requests, and combine it with the above graph to calculate the arrival rate of access requests to each microservice, which in turn is used to estimate response time in a newly-designed microservice revenue function. Finally, we define resources competing problem as a congestion game where each microservice is a player aiming to maximize its revenue, and propose an algorithm to find Nash equilibrium in polynomial time. Experiment results show that our approach can effectively improve the overall performance of the system with limited resources.

Key words: microservice architecture, resource management, game theory

中图分类号: