Tracezip:通过迹压缩实现高效分布式追踪
Tracezip: Efficient Distributed Tracing via Trace Compression
AI总结:
Tracezip通过压缩迹中的冗余数据并利用Span Retrieval Tree和差分更新机制,在几乎不增加开销的情况下显著提升分布式追踪收集效率。
摘要:
分布式追踪是云服务系统监控与测试中的基础构件。为了降低计算与存储开销,事实上的做法是通过采样捕获更少的迹。然而,现有工作在追踪完整性与系统开销之间面临权衡。一方面,基于头部的采样在请求进入系统时无差别地选择要追踪的请求,这可能遗漏关键事件。另一方面,基于尾部的采样首先捕获所有请求,然后选择性地持久化边缘案例迹,这会带来与迹收集和摄取相关的开销。我们另辟蹊径,在本文中提出Tracezip,通过迹压缩来提升分布式追踪的效率。我们的核心洞察是迹之间存在显著冗余,这导致相同数据在服务与后端之间被重复传输。我们设计了一种名为Span Retrieval Tree(SRT,跨度检索树)的新数据结构,在服务端持续封装此类冗余,并将迹跨度转换为轻量形式。在后端,通过检索先前跨度已经传递的公共数据,可以无缝重建完整迹。Tracezip包含一系列优化SRT结构的策略,以及一种差分更新机制,用于在服务与后端之间高效同步SRT。我们在微服务基准、流行云服务系统以及生产迹数据上的评估表明,Tracezip能够以可忽略的开销在迹收集中实现显著的性能提升。我们已在OpenTelemetry Collector中实现了Tracezip,使其与现有追踪API兼容。
英文摘要:
Distributed tracing serves as a fundamental building block in the monitoring and testing of cloud service systems. To reduce computational and storage overheads, the de facto practice is to capture fewer traces via sampling. However, existing work faces a trade-off between the completeness of tracing and system overhead. On one hand, head-based sampling indiscriminately selects requests to trace when they enter the system, which may miss critical events. On the other hand, tail-based sampling first captures all requests and then selectively persists the edge-case traces, which entails the overheads related to trace collection and ingestion. Taking a different path, we propose Tracezip in this paper to enhance the efficiency of distributed tracing via trace compression. Our key insight is that there exists significant redundancy among traces, which results in repetitive transmission of identical data between services and the backend. We design a new data structure named Span Retrieval Tree (SRT) that continuously encapsulates such redundancy at the service side and transforms trace spans into a lightweight form. At the backend, the complete traces can be seamlessly reconstructed by retrieving the common data that are already delivered by previous spans. Tracezip includes a series of strategies to optimize the structure of SRT and a differential update mechanism to efficiently synchronize SRT between services and the backend. Our evaluation on microservices benchmarks, popular cloud service systems, and production trace data demonstrates that Tracezip can achieve substantial performance gains in trace collection with negligible overhead. We have implemented Tracezip inside the OpenTelemetry Collector, making it compatible with existing tracing APIs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。