Skip to main content
QUICK REVIEW

[论文解读] Using Microservice Telemetry Data for System Dynamic Analysis

Abdullah Al Maruf, Alexander Bakhtin|arXiv (Cornell University)|Jul 6, 2022
Software System Performance and Reliability被引用 6
一句话总结

本文提出一种动态分析方法,利用微服务遥测数据(如日志、追踪和指标)自动检测架构反模式、计算质量度量指标,并重构系统依赖图。该方法实现了对演化的微服务系统的语言无关、可扩展的监控,已在包含42个服务的基准测试中成功识别出关键瓶颈、循环依赖和高优先级服务,精度较高。

ABSTRACT

Microservices bring various benefits to software systems. They also bring decentralization and lose coupling across self-contained system parts. Since these systems likely evolve in a decentralized manner, they need to be monitored to identify when possibly poorly designed extensions deteriorate the overall system quality. For monolith systems, such tasks have been commonly addressed through static analysis. However, given the decentralization and possible language diversity across microservices, static analysis tools are lacking. On the other hand, there are available tools commonly used by practitioners that offer centralized logging, tracing, and metric collection for microservices. In this paper, we assess the opportunity to combine current dynamic analysis tools with anomaly detection in the form of quality metrics and anti-patterns. We develop a tool prototype that we use to assess a large microservice system benchmark demonstrating the feasibility and potential of such an approach.

研究动机与目标

  • 解决在去中心化、多语言微服务系统中静态分析的局限性,其中语言异构性阻碍了工具支持。
  • 利用现有的遥测数据管道,在运行时检测架构反模式和质量度量指标。
  • 证明动态分析在实现系统级架构洞察(包括演化追踪和可扩展性优先级排序)方面的可行性。
  • 为实践者提供一种无需访问源代码即可自动识别关键服务和设计缺陷的可扩展方法。

提出的方法

  • 从分布式追踪和日志遥测数据中提取服务间通信信息,构建服务依赖图(SDG)。
  • 应用图分析计算关键度量指标:服务绝对重要性(AIS)、服务绝对依赖度(ADS)、服务绝对关键性(ACS)以及系统内服务相互依赖度(SIY)。
  • 通过分析SDG结构和端点模式,检测反模式,如循环依赖、共享持久化和API版本控制。
  • 使用API版本控制启发式方法(例如,/api/v1前缀)识别版本化端点并评估向后兼容性。
  • 通过比较不同版本(v0.1.0和v0.2.1)的SDG,评估系统演化,检测服务拓扑和测试覆盖率的变化。
  • 基于入站/出站边数和关键性度量指标,对可扩展性建议进行优先级排序。
Figure 1 : Architecture of a service mesh where proxy sidecars handles all the network activity of a service.
Figure 1 : Architecture of a service mesh where proxy sidecars handles all the network activity of a service.

实验结果

研究问题

  • RQ1能否利用生产环境类似工作负载的遥测数据自动重构系统的服务依赖图?
  • RQ2动态分析在多微服务环境中检测架构反模式(如循环依赖和瓶颈)的适用程度如何?
  • RQ3AIS、ADS和ACS等关键质量度量指标与系统行为及跨版本演化的相关性如何?
  • RQ4动态分析能否在无源代码访问的情况下有效识别架构演化并检测回归?
  • RQ5遥测度量指标如何指导去中心化系统中的服务可扩展性和技术债务优先级排序?

主要发现

  • 原型成功从遥测数据中重建了服务依赖图(SDG),准确反映了42个服务基准测试中服务间的通信关系。
  • 服务 'ts-order-service.default' 的绝对重要性得分最高(AIS = 9),表明其是核心通信枢纽。
  • 服务 'ts-ui-dashboard.default' 的绝对依赖度得分最高(ADS = 12),表明其是其他服务的主要消费者。
  • 在两个版本中均检测到 'ts-travel-service.default' 和 'ts-seat-service.default' 之间的循环依赖,证实了架构耦合。
  • 服务 'ts-travel-service.default' 的绝对关键性得分最高(ACS),表明其是系统瓶颈和单点故障。
  • 所有端点中均一致观察到通过 '/api/v1' 前缀实现的API版本控制,确认了版本化接口的使用。
Figure 2 : A SDP prototype that can be generated from an access log. Each edge weight number represents the number of times the endpoint is called. When the weight value is greater, the edge thickens.
Figure 2 : A SDP prototype that can be generated from an access log. Each edge weight number represents the number of times the endpoint is called. When the weight value is greater, the edge thickens.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。