Node Compass:基于JavaScript的Web服务器中请求执行的多层次追踪与调试
Node Compass: Multilevel Tracing and Debugging of Request Executions in JavaScript-Based Web-Servers
AI总结:
本文提出Node Compass方法,通过嵌套有界上下文算法和有界上下文追踪算法恢复Node.js请求的异步执行路径,并以垂直跨度概念实现多层次细粒度性能调试。
摘要:
在分布式应用环境中,充分的考量对于确保服务在可用资源下令人满意地运行至关重要。由于任务的异步特性以及在单线程环境中需要与多个层次协同工作以交付协调结果,在基于事件循环的系统中进行性能分析是一项具有挑战性的任务。现有的针对Node.js等环境的性能分析方法依赖于较高层次的插桩,但缺乏精确性,因为它们无法捕获相关的底层应用执行流程。作为解决方案,我们提出了一种用于恢复请求异步执行路径的简化方法,称为嵌套有界上下文算法(Nested Bounded Context Algorithm)。所提出的技术通过多个层次追踪应用执行流程,并在交互式界面上展示以供进一步评估。此外,我们引入了垂直跨度(vertical span)概念。这种将跨度表示为多维对象(水平和垂直)的表示方式,包含执行的开始和结束,以及其子层次和触发的操作,能够实现对性能问题的细粒度识别和诊断。我们提出了一种新技术,称为有界上下文追踪算法(Bounded Context Tracking Algorithm),用于在多层次追踪中进行事件匹配和请求重组。这两种技术允许将请求的执行对齐到基于树的数据结构中,以用于开发可视化。这些可视化使得能够对Node.js中的复杂性能问题进行性能调试。
英文摘要:
Adequate consideration is crucial to ensure that services in a distributed application context are running satisfactorily with the resources available. Due to the asynchronous nature of tasks and the need to work with multiple layers that deliver coordinated results in a single-threaded context, analysing performance is a challenging task in event-loop-based systems. The existing performance analysis methods for environments such as Node.js rely on higher-level instrumentation but lack precision, as they cannot capture the relevant underlying application flow. As a solution, we propose a streamlined method for recovering the asynchronous execution path of requests called the Nested Bounded Context Algorithm. The proposed technique tracks the application execution flow through multiple layers and showcases it on an interactive interface for further assessment. Furthermore, we introduce the vertical span concept. This representation of a span as a multidimensional object (horizontal and vertical) with a start and end of execution, along with its sub-layers and triggered operations, enables the granular identification and diagnosis of performance issues. We proposed a new technique called the Bounded Context Tracking Algorithm for event matching and request reassembling in a multi-layer trace . The two techniques allow aligning the executions of the request in a tree-based data structure for developed visualisations. These visualisations permit performance debugging of complex performance issues in Node.js.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。