Precise, Scalable and Online Request Tracing for Multi-tier Services of Black Boxes

Bo Sang, Jianfeng Zhan, Zhihong Zhang, Lei Wang, Dongyan Xu, Yabing Huang, Dan Meng · DOI

Abstract

As more and more multi-tier services are developed from commercial off-the-shelf components or heterogeneous middleware without source code available, both developers and administrators need a request tracing tool to (1) exactly know how a user request of interest travels through services of black boxes; (2) obtain macro-level user request behavior information of services without the necessity of inundating within massive logs. Previous research efforts either accept imprecision of probabilistic correlation methods or present precise but unscalable tracing approaches that have to collect and analyze large amount of logs. This paper introduces a precise, scalable and online request tracing tool, named PreciseTracer, for multi-tier services of black boxes. Our contributions include a precise request tracing algorithm using application-independent knowledge, micro-level and macro-level abstractions (Component Activity Graphs and Dominated Causal Path Patterns), and mechanisms like tracing on demand and sampling to ensure scalability.

Introduction

Modern data centers rely on multi-tier architectures built from commercial off-the-shelf (COTS) components and heterogeneous middleware. Because these components are often "black boxes"—meaning their source code is inaccessible—developers and administrators struggle to understand how specific requests travel through the system.

Existing tracing solutions generally fall into two camps: probabilistic methods, which are scalable but imprecise, and precise methods, which are often unscalable or require invasive source code modification. PreciseTracer bridges this gap by providing a tool that is precise, works online, and scales to production-level traffic without requiring access to application source code.

System Architecture and Methodology

PreciseTracer is composed of three main components: the TCP_Tracer, the Correlator, and the Analyzer.

PreciseTracer System Architecture: TCP_Tracer, Correlator, and Analyzer components.

Kernel-Level Instrumentation

Using SystemTap and Kprobe, the tool logs four key interaction events: BEGIN, END, SEND, and RECEIVE. Crucially, it captures these at the OS kernel level, making it independent of the application or protocol (e.g., HTTP, MySQL). This application-independent approach allows it to reconstruct complex causality without knowing if the app is running Java, C++, or a specific database protocol.

The Correlation Algorithm

The Correlator uses a sliding time window to process event streams. It employs two index maps: one for message relations (linking a SEND on one node to a RECEIVE on another) and one for context relations (linking sequential events within the same process or thread).

Abstractions and Scalability

To manage the complexity of tracing data, PreciseTracer introduces two levels of abstraction:

  • Micro-level (Component Activity Graphs): It produces Component Activity Graphs (CAGs), which are directed acyclic graphs representing the life cycle of a single request across various tiers.
  • Macro-level (Dominated Causal Path Patterns): By grouping similar CAGs, it identifies dominant patterns. This allows administrators to see the "big picture" of request behavior rather than getting lost in thousands of individual logs.
Example of a Component Activity Graph (CAG) representing a single request's lifecycle.

Scalability Mechanisms

To handle high traffic, the tool supports tracing on demand (enabling/disabling probes without restarting services) and sampling (collecting only a fraction of logs). The algorithm is designed to be robust; if a log is lost due to sampling, the system discards the incomplete path rather than guessing, maintaining high path accuracy.

Evaluation and Results

The authors evaluated PreciseTracer using standard industry benchmarks like RUBiS (a three-tier auction site) and TPC-W. To verify accuracy, they compared results against a "ground truth" established by a high-overhead library-interposition tool.

Key Findings

  • High Accuracy: In tests with 800 concurrent clients, PreciseTracer achieved ~99.9% accuracy compared to the ground truth.
  • Robust Sampling: Even when 10% of logs were intentionally deleted to simulate aggressive sampling, the tool maintained roughly 90% path accuracy.
  • Low Overhead: The impact on system throughput and average response time was negligible, making it suitable for production environments.
  • Real-world Utility: In a case study, the tool successfully identified a JBoss misconfiguration (MaxThreads limit) by revealing a massive latency spike between the web and application tiers that traditional monitors failed to detect.

Conclusion

PreciseTracer provides a scalable, precise, and online solution for tracing requests in black-box environments. By focusing on kernel-level events and providing macro-level abstractions, it enables effective performance debugging in large-scale production systems. Future work includes refining the model for highly asynchronous architectures and improving noise filtering for extremely busy systems.

Summary updated

BibTeX
@misc{sang2010precise,
  author = {Bo Sang and Jianfeng Zhan and Zhihong Zhang and Lei Wang and Dongyan Xu and Yabing Huang and Dan Meng},
  title = {{Precise, Scalable and Online Request Tracing for Multi-tier Services of Black Boxes}},
  year = {2010},
  eprint = {1007.4057},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1007.4057},
}
Figure