Tracking method and system for end-to-end performance analysis of distributed system

Through distributed system call series and automatic code injection technology, the positioning problem of performance problems in distributed microservice systems is solved, real-time performance analysis across processes and machines is realized, long-tail delay and service dependencies are located, and fault processing efficiency is improved.

CN120371631APending Publication Date: 2025-07-25CLOUD WISDOM BEIJING TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510257983.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-03-06
Filing Date
2025-03-05
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing single-node performance monitoring technology cannot effectively solve the performance problems during collaborative processing of multiple services in distributed microservice systems, and cannot directly locate the root cause of the problem and analyze the time-consuming proportion of business processing time, resulting in difficulty in troubleshooting system performance problems.

Method used

The distributed system call tandem technology and automatic code injection technology are adopted to generate trace identifiers in the entry application through language performance probes, and the tracking context information is passed to the dependent application services, realizing end-to-end performance analysis across processes, cross-machine, and cross-development languages.

Benefits of technology

It realizes large-scale real-time monitoring with low loss and low intrusion, and can locate the long-tail delay and service dependencies of distributed application systems, shorten the fault location time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371631A_ABST
    Figure CN120371631A_ABST
Patent Text Reader

Abstract

The invention relates to a distributed system end-to-end performance analysis-oriented tracking method and system, and the method comprises the steps: achieving the tracking of a context through a language performance probe, i.e., enabling an entry application to generate a tracking identifier, and transmitting the tracking context information to a dependent application service of the entry application, and the tracking context is reported by being included in performance data generated by the application, so that the tracking context is transmitted in a request / message, service calling data series connection is achieved in a low-invasion or non-invasion manner, and then distributed system end-to-end performance analysis-oriented tracking is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer application program performance management, and in particular, to a tracking method and system for end-to-end performance analysis of a distributed system, which is mainly used to help users quickly perform end-to-end global tracking in the scenarios of distributed application deployment and microservice application deployment. It can more directly discover problems and locate the causes of problems in a complex deployment environment. Background Art

[0002] In recent years, with the rapid development of software development technologies, customer application services are usually based on the microservice architecture to build large-scale distributed systems. These systems may be developed by different teams, may be implemented using different programming languages, and may be deployed on hundreds or even thousands of servers across multiple data centers.

[0003] In this environment, customers are in urgent need of tools that can help understand system behavior and facilitate performance problem analysis. Currently, the main solution is single-node performance monitoring technology. However, the probes of conventional single-node performance monitoring technology do not have the ability to provide effective performance monitoring and management in distributed and microservice systems. This is mainly manifested in that when multiple service applications are required to cooperate to process a business, it is impossible to directly locate the root service that causes problems and the time-consuming ratio of each associated service to the business processing time, so it cannot effectively help system users troubleshoot system performance problems.

[0004] In summary, there is an urgent need for a performance analysis technology for distributed systems. Summary of the Invention

[0005] To solve the above problems of the prior art, on the one hand, the present invention provides a tracking method for end-to-end performance analysis of a distributed system, which can perform real-time monitoring on a large-scale distributed application deployment environment through distributed system call chaining technology and combined with code automatic injection technology.

[0006] To achieve the above object, the main technical solutions adopted by the present invention include:

[0007] A tracking method for end-to-end performance analysis of a distributed system, which realizes tracking context through a language performance probe, that is, an entry application generates a tracking identifier, and transmits the tracking context information to the dependent application services of the entry application itself, and includes the tracking context in the performance data generated by the application and reports it, so as to realize the transmission of the tracking context in a request / message, and achieve service call data chaining with low invasiveness or non-invasiveness, and further realize the tracking of end-to-end performance analysis of a distributed system.

[0008] With the above solution, the tracing method for end-to-end performance analysis of the distributed system according to the present invention can perform real-time monitoring on a large-scale distributed application deployment environment through the distributed system call chaining technology and in combination with the code automatic injection technology. When the system processes a business data request each time, more behavior information of the complex distributed system is provided to the APM (Application Performance Management) system. The effects of low loss, small invasiveness, large-scale deployment, and real-time data monitoring are achieved, and finally, real-time application service call chain tracing across processes, machines, development languages, and data centers is achieved. It plays a key role in locating the TailLatency of the distributed application system and automatically inferring the Service Dependencies.

[0009] In the tracing method for end-to-end performance analysis of the distributed system according to an embodiment of the present invention, when a user request generates a distributed service cross-call, a global tracing identifier (trace_id) is generated by the entry application service and passed to all services in the call chain through the requests between application services, so that all application services and middleware explicitly associate the information with the global tracing identifier, in order to associate the information of the distributed service cross-call with the initial user request.

[0010] In the tracing method for end-to-end performance analysis of the distributed system according to an embodiment of the present invention, all application services explicitly implement their respective cross identifiers (span_id) and parent cross identifiers (parent_span_id), and pass the tracing context information to all services in the call chain through the requests between application services, so as to restore the actual service call relationship and order.

[0011] The tracing method for end-to-end performance analysis of the distributed system according to an embodiment of the present invention includes the following steps:

[0012] S1. The entry service A that receives the user request generates a global tracing identifier (trace_id = Req00001) and generates its own cross identifier (span_id = 1) of the entry service A;

[0013] S2. When the entry service A calls the dependent services B / C, the global tracing identifier and the cross identifier of the entry service A itself are used as the tracing context and passed to the dependent services B / C;

[0014] S3. When Service B / C receives a request from the ingress Service A, it obtains the tracing context of Step S2, maintains the global tracing identifier (trace_id = Req00001), generates its own span identifier for Service B / C, and sets its own parent span identifier to the span identifier of the caller (parent_span_id = 1).

[0015] S4. When Service B / C calls subsequent dependent services, referring to Steps S1 to S3, in the processing of the tracing context information, the global tracing identifier is maintained, and the span identifier and the parent span identifier are changed step by step to pass the tracing context information backward until all service nodes are covered.

[0016] A tracing method for end-to-end performance analysis of a distributed system according to an embodiment of the present invention, wherein the tracing context information is passed step by step to the dependent application services of its own application.

[0017] A tracing method for end-to-end performance analysis of a distributed system according to an embodiment of the present invention, wherein the data communication between application services includes HTTP, RPC, message queue middleware, and databases.

[0018] A tracing method for end-to-end performance analysis of a distributed system according to an embodiment of the present invention, wherein the languages include Java,.Net,.NetCore, PHP, Python, and NodeJS.

[0019] A tracing method for end-to-end performance analysis of a distributed system according to an embodiment of the present invention includes: performance data collection, and tracking of system service, middleware, and database dependencies. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a schematic diagram of the main process of a tracing method for end-to-end performance analysis of a distributed system according to an embodiment of the present invention;

[0021] Figure 2 is a schematic diagram of the span path of a distributed system service in a tracing method for end-to-end performance analysis of a distributed system according to an embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of service dependency discovery in a tracing method for end-to-end performance analysis of a distributed system according to an embodiment of the present invention;

[0023] Figure 4 is a schematic diagram of the global service dependency of a tracing method for end-to-end performance analysis of a distributed system according to an embodiment of the present invention;

[0024] Figure 5 isFigure 4 Schematic diagram of component decomposition of service global dependency relationship in the tracking method for end-to-end performance analysis of a distributed system in the embodiment;

[0025] Figure 6 Schematic diagram of decomposition and positioning of service single dependency relationship & response time delay in the tracking method for end-to-end performance analysis of a distributed system in an embodiment of the present invention. Detailed implementation manners

[0026] For better explaining the present invention and facilitating understanding, the present invention will be described in detail below with reference to the accompanying drawings and through specific implementation manners.

[0027] Refer to Figure 1 , a tracking method for end-to-end performance analysis of a distributed system in an embodiment of the present invention includes the following steps:

[0028] S1. The entry service that receives a user request generates a global tracking identifier (trace_id = Req00001), and generates a passing-through identifier of the entry service itself (span_id = 1);

[0029] S2. When the entry service calls its dependent service, the global tracking identifier and the passing-through identifier of the entry service itself are used as the tracking context and passed to the dependent service of the entry service;

[0030] S3. When the dependent service of the entry service receives a request from the entry service, it obtains the tracking context in step S2, maintains the global tracking identifier (trace_id = Req00001), and generates a passing-through identifier of the dependent service of the entry service itself (span_id), and sets the parent passing-through identifier of the dependent service of the entry service itself to the passing-through identifier of the calling party (parent_span_id = 1);

[0031] S4. When the dependent service of the entry service calls subsequent dependent services, referring to steps S1 to S3, in the processing of the tracking context information, the global tracking identifier is maintained, and the passing-through identifier and the parent passing-through identifier are changed step by step, so as to pass the tracking context information backward until all service nodes are covered.

[0032] With the above solution, the tracing method for end-to-end performance analysis of the distributed system according to the present invention can perform real-time monitoring on a large-scale distributed application deployment environment through the distributed system call chaining technology and in combination with the code automatic injection technology. When the system processes a business data request each time, more behavior information of the complex distributed system is provided to the APM (Application Performance Management) system. The effects of low loss, small intrusion, large-scale deployment, and real-time data monitoring are achieved, and finally, real-time application service call chain tracing across processes, machines, development languages, and data centers is achieved. It plays a key role in locating the Tail Latency of the distributed application system and automatically inferring the Service Dependencies of the system service.

[0033] As Figure 2 shown, in the tracing method for end-to-end performance analysis of the distributed system according to an embodiment of the present invention, when a user request generates a distributed service cross-call, in order to associate the information of the distributed service cross-call with the initial user request, it is necessary to explicitly associate all application services and middleware with a global trace identifier (trace_id). The global trace identifier is generated by the entry application service (such as Figure 2 A in), and is passed to all application services (B, C, D, E) in the call chain through the requests between application services. In order to facilitate restoring the actual service call relationship and order, at the same time, it is necessary for all application services to explicitly implement their respective cross identifiers (span_id) and parent cross identifiers (parent_span_id), and pass the tracing context information to all application services in the call chain through the requests between application services.

[0034] The specific implementation method is as follows:

[0035] Service A receives a user request, generates a global trace identifier (trace_id = Req00001), and generates its own cross identifier (span_id = 1) for Service A. Since this Service A is the request entry service, the caller cross identifier does not need to be set. The trace identifier and cross identifier are passed to B / C as the tracing context during the call to B / C services.

[0036] Services B / C receive the request from Service A, obtain the tracing context, and maintain the global trace identifier (trace_id = Req00001), and generate their own cross identifiers (span_id), and set their parent cross identifiers to the cross identifier of the caller (parent_span_id = 1). The tracing context information is passed backward when calling subsequent dependent services.

[0037] The subsequent service nodes behave similarly (the situation between C and D is similar to that between A and B or between A and C, and the situation between D and E is similar to that between A and B or between A and C or between C and D). The key lies in tracking the processing of context information in the aforementioned manner (the global tracking identifier is maintained, and the penetration identifier and the parent penetration identifier change step by step) until the transmission can cover all service nodes.

[0038] Among them, the data communication between application services includes HTTP (between A and B), RPC (between A and C, between C and D), message queue middleware (between D and E), and databases.

[0039] In summary, the tracking method and system for end-to-end performance analysis of the distributed system of the present invention can collect performance data in real time for distributed application deployment scenarios across mainstream development languages (including: java,.Net,.NetCore, PHP, Python, NodeJS) without affecting the normal and efficient operation of the application, and can track the dependencies of system services, middleware, and databases, effectively shortening the fault location and problem handling time of the distributed system.

Claims

1. A tracing method for end-to-end performance analysis of a distributed system, which realizes the tracing context through language performance probes, that is, the entry application generates a tracing identifier, and transmits the tracing context information to the dependent application services of the entry application itself, and includes the tracing context in the performance data generated by this application and reports it, so as to realize the transmission of the tracing context in the request / message, and achieve the data concatenation of service calls with low invasiveness or non-invasiveness, and then realize the tracing for end-to-end performance analysis of the distributed system.

2. The tracing method for end-to-end performance analysis of a distributed system according to claim 1, when a user request generates a distributed service cross-call, a global tracing identifier (trace_id) is generated by the entry application service and transmitted to all services in the call chain through the requests between application services, so that all application services and middleware explicitly associate the information with the global tracing identifier, in order to associate the information of the distributed service cross-call with the initial user request.

3. The tracing method for end-to-end performance analysis of a distributed system according to claim 2, all application services explicitly implement their respective cross identifiers (span_id) and parent cross identifiers (parent_span_id), and transmit the tracing context information to all services in the call chain through the requests between application services, so as to restore the actual service call relationship and order.

4. The tracing method for end-to-end performance analysis of a distributed system according to claim 3, which includes the following steps: S1. The entry service that receives the user request generates a global tracing identifier (trace_id = Req00001), and generates the cross identifier (span_id = 1) of the entry service itself; S2. When the entry service calls its dependent service, the global tracing identifier and the cross identifier of the entry service itself are used as the tracing context and transmitted to the dependent service of the entry service; S3. When the dependent service of the entry service receives the request from the entry service, it obtains the tracing context in step S2, maintains the global tracing identifier (trace_id = Req00001), and generates the cross identifier of the dependent service of the entry service itself (span_id), and sets the parent cross identifier of the dependent service of the entry service itself to the cross identifier of the calling party (parent_span_id = 1); S4. When the dependent service of the entry service calls the subsequent dependent service, referring to steps S1 to S3, in the processing of the tracing context information, the global tracing identifier is maintained, and the cross identifier and the parent cross identifier change step by step, so as to transmit the tracing context information backward until all service nodes are covered.

5. The tracing method for end-to-end performance analysis of a distributed system as described in claim 1, wherein, The tracing context information is transmitted step by step to the dependent application services of its own application.

6. The tracing method for end-to-end performance analysis of a distributed system according to claim 1, wherein: Data communication between application services includes HTTP, RPC, message queue middleware, and databases.

7. The tracing method for end-to-end performance analysis of a distributed system according to claim 1, wherein, Languages include Java,.Net,.NetCore, PHP, Python, NodeJS.

8. The tracing method for end-to-end performance analysis of a distributed system according to claim 1, comprising: Performance data collection and tracking of system service, middleware, and database dependencies.