摘要
微服务架构(MSA)将云应用构建为独立的组件,通过解耦来提高软件更新的灵活性和敏捷性,然而微服务在时延和可靠性方面仍面临许多挑战。本文使用谓词Petri网(PrT网)对基于事件总线的微服务组合进行建模,建立微服务之间的逻辑关系。采用主版本和备份部署微服务实例,提高了微服务组合整体的可靠性。基于PrT网的相关理论,验证了微服务可靠性模型和PB(Primary-Backup)副本部署策略的正确性。将微服务执行的保证率作为可靠性的参数,通过实验分析验证了本文方法的有效性。
Microservice architecture builds cloud applications as independent components and runs each application process as service. It can improve the flexibility and speed of software update through decoupling.However, microservices still face many challenges, such as, service decomposition, transmission delay, and reliability.This paper uses predicated Petri net(PrT net) to model the event bus-based microservice composition and establish the logical relationship among microservices. The event listening mechanism is a delegated event handling mechanism.When a specified event occurs in the event source, it will notify the specified event listener to perform the corresponding operation. For event-based communication, when an event occurs, the microservice will publish the event. Then, we propose a PB(primary-backup) replication allocation strategy that meets the sub-deadline through microservice instances of the primary and backup replica for improving the overall reliability of microservice composition. Besides, the PB replica deployment strategy is analyzed via two cases: single task and multi task PB replica. By deploying the primary and backup replica of the task in different containers or host resources, the goal of improving the reliability of cloud applications is the correctness of microservice reliability model and PB replica deployment strategy is verified achieved. The properties of constructed models are established and the correctness of both the microservice reliability model and PB replica deployment strategy is verified by using the relevant theories of PrT net. Finally, several experiments are carried out to verify the effectiveness of the modeling and analysis method. It is shown from experimental results that the proposed microservice reliability strategy is effective by taking guarantee ratio as reliability parameter.
作者
刘政
虞慧群
范贵生
LIU Zheng;YU Huiqun;FAN Guisheng(Department of Computer Science and Engineering,East China University of Science and Technology,Shanghai 200237,China;Shanghai Key Laboratory of Computer Software Testing and Evaluating,Shanghai 201112,China)
出处
《华东理工大学学报(自然科学版)》
CAS
CSCD
北大核心
2023年第1期128-134,共7页
Journal of East China University of Science and Technology
基金
上海市自然科学基金(21ZR1416300)。
关键词
微服务组合
PB建模
可靠性
PETRI网
软件验证
microservice composition
PB modeling
reliability
Petri nets
software verification