节点文献

面向微服务系统的调用链异常检测研究

Research on Trace Anomaly Detection for Microservice Systems

【作者】 陈健;

【导师】 刘发贵; 徐晓帆;

【作者基本信息】 华南理工大学 , 计算机技术(专业学位), 2023, 硕士

【摘要】 微服务架构因其具有灵活扩展,部署简单等特点,被各大IT公司广泛应用于自身产品。随着用户需求的增加,微服务系统的规模也越来越大,系统中各个组件之间复杂的交互使得保障系统可靠性成为一项挑战,如何设计一种异常检测方法能够全面、准确的对庞大且复杂的微服务系统进行性能诊断成为当前云计算容错领域的一个研究热点。近年来,分布式链路追踪系统所产生的调用链被广泛用于检测分布式微服务系统中的异常情况,因为它拥有精确地重构用户请求路径的能力。然而,大多数现有针对微服务提出的异常检测方法仅仅将调用链视为带有响应时间信息的微服务调用序列,忽略了调用链的空间结构以及微服务所处的分布式部署环境中存在的异常资源消耗问题,不足以全面准确的解决生产环境下微服务系统的性能异常诊断所面临的难点。针对现有工作的不足,本文的主要研究内容和创新点如下:1.本文提出一种融合容器性能指标与微服务调用链的数据表示方式TPG(调用链性能图)。TPG将两种数值型监控指标以统一的方式进行表示,能够从应用功能本身及其部署环境的角度解释微服务系统的运行状态。本文将容器性能指标和微服务调用链以邻接矩阵和特征矩阵的形式表示,也有利于图神经网络提取用户请求的结构信息,提高异常检测方法的效果。2.本文提出了一种基于图神经网络(GNN)和长短期记忆神经网络(LSTM)的无监督微服务异常检测模型Trace Gra。该模型通过图神经网络提取TPG数据中的空间特征,使用长短期记忆神经网络提取TPG数据中的时序特征,来解决传统异常检测方法目标单一的问题。从开源数据集和利用ARM服务器集群部署开源基准微服务系统中收集得到的数据集的评估结果中,本文提出的方法实现了较高的精度和召回率,优于现有的微服务异常检测方法。3.本文提出一种微服务异常诊断设计与实现方案。将上述提出的异常检测方法部署到一个中大型开源微服务系统Train Ticket中,并利用负载生成和故障注入等工具来验证本文所提出方法的有效性。最后对异常做进一步诊断,并将结果以友好的可视化界面进行展示,从工程实践角度证明了方案的可行性与有效性。

【Abstract】 Microservice architecture is widely used by major IT companies in their own products because of its flexible scaling and simple deployment.With the increase in user requirements,the scale of microservice systems is becoming larger and larger,and the complicated interactions between various components in the system make it a challenge to ensure system reliability.How to design an anomaly detection method that can comprehensively and accurately diagnose the performance of large and complex microservice systems has become a current research hotspot in the field of cloud computing fault tolerance.In recent years,traces generated by distributed tracing systems have been widely used to detect anomalies in distributed microservice systems because of its ability to accurately reconstruct user request paths.However,most existing anomaly detection methods proposed for microservices only consider the trace as a sequence of microservice invocations with response time information,ignoring the spatial structure of the trace and the abnormal resource consumption problem in the distributed deployment environment where the microservices are located,which is not sufficient to comprehensively and accurately solve the difficulties faced by performance anomaly diagnosis of microservice systems in production environments.In view of the shortcomings of the existing work,the main research contents and innovation points of this paper are as follows:1.This paper proposes a data representation TPG(Trace Performance Graph)that combines container performance metrics with traces.TPG Represents the two numerical monitoring metrics in a unified manner enabling the interpretation of the operational state of a microservice system from the perspective of the application function itself and its deployment environment.Representing container performance metrics and traces in the form of adjacency and feature matrices also facilitates graph neural networks to extract structural information of user requests and improve the effectiveness of anomaly detection methods.2.In this paper,we present Trace Gra,an unsupervised microservice anomaly detection model based on graph neural network(GNN)and long short-term memory neural network(LSTM),which extracts spatial information in TPG data by graph neural network and temporal information in TPG data by using long short-term memory neural network to solve the problem of the single target of traditional anomaly detection methods.From the evaluation results of the open source dataset and the other dataset we collected from deploying the open source benchmark microservice system using an ARM server cluster,our method achieves high precision and recall,outperforming existing microservice anomaly detection methods.3.This paper proposes a design and implementation scheme for microservice anomaly diagnosis.The above proposed anomaly detection method is deployed into a medium to large open source microservice system Train Ticket,and tools such as load generation and fault injection are used to verify the effectiveness of the proposed method in this paper.Finally,further diagnosis of anomalies is done and the results are presented in a friendly visual interface to prove the feasibility and effectiveness of the scheme from an engineering practice perspective.

  • 【分类号】TP311.5
节点文献中: