Information Processing Method
By adding trace information and location information to packets, the method facilitates comprehensive tracing across network layers, addressing the limitations of existing systems and providing detailed performance insights for microservice applications.
Patent Information
- Application Number
- JP2023021723
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2043-02-15
AI Technical Summary
Existing distributed tracing systems are limited to tracing within the same network layer, particularly the application layer, and cannot effectively trace delays caused by processing in lower layers such as the transport and network layers due to the inability of network switches to parse variable-length HTTP requests.
A method where a communication node adds trace information to a message and location information to a packet, allowing network switches to access trace information by specifying its location, enabling tracing across multiple network layers.
Enables comprehensive tracing across network layers, including the transport and network layers, by providing location information that allows network switches to parse and log trace information, thereby providing a detailed overview of microservice application performance.
Smart Images

Figure 0007806729000001 
Figure 0007806729000002 
Figure 0007806729000003
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to communications. [Background technology]
[0002] In recent years, technologies that use microservices to perform distributed processing have become widespread. Distributed tracing is a mechanism for monitoring latency and other issues in applications built with microservice architectures. As a related technique, for example, Non-Patent Document 1 discloses a technique for tracing across different network layers. [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] Chunghan Lee, Reina Yoshitani, Toshio Hirotsu, Enhancing Packet Tracing of Microservices in Container Overlay Networks using eBPF, [online], December 2022, ACM AINTEC '22: Proceedings of the 17th Asian Internet Engineering Conference, [Retrieved January 24, 2023], https: / / dl.acm.org / doi / abs / 10.1145 / 3570748.3570756 Summary of the Invention [Problem to be solved by the invention]
[0004] The present disclosure is directed to providing distributed tracing in a physical network. [Means for solving the problem]
[0005] One aspect of an embodiment of the present disclosure is an information processing method in which a first communication node adds first trace information to a first message generated by a first application and addressed to a second communication node, for tracking the first message among multiple communication nodes; adds location information indicating the location of the first trace information to a first packet containing the first message at a predetermined position before the first message; and transmits the first packet with the first trace information and the location information added.
[0006] Another aspect is a program for causing a computer to execute the above-described information processing method, or a computer-readable storage medium that non-temporarily stores the program. [Effects of the Invention]
[0007] The present disclosure enables distributed tracing in a physical network. [Brief explanation of the drawings]
[0008] [Figure 1] FIG. 1 is a system configuration diagram of an information processing apparatus according to an embodiment of the present invention. [Figure 2] FIG. 4 is a schematic diagram of a frame transmitted from the information processing device 100A. [Figure 3] FIG. 4 is a diagram illustrating transmission of a request from an information processing device 100A to an information processing device 100B. [Figure 4] FIG. 10 is a diagram illustrating transmission of a response from the information processing device 100B to the information processing device 100A. [Figure 5] 10 is a flowchart of a process 1A executed by the first proxy. [Figure 6] 10 is a flowchart of a process 1B executed by the first proxy. [Figure 7] 10 is a flowchart of a process 2B executed by the first proxy. [Figure 8] 10 is a flowchart of a process 2A executed by the first proxy. [Figure 9]FIG. 2 is a diagram illustrating the flow of processing executed by a network switch. DETAILED DESCRIPTION OF THE INVENTION
[0009] Microservices architecture is known, which divides an application provided to a user into multiple independent small applications (hereinafter referred to as microservice applications) and distributes the execution of these microservice applications across multiple nodes.
[0010] On the other hand, when a microservice application is executed in a distributed manner on multiple nodes, it becomes difficult to track the processing from a bird's-eye view. To address this issue, a technology called distributed tracing is used.
[0011] In distributed tracing, information for tracing (hereinafter referred to as trace information) is attached to the data sent and received between microservice applications, and each microservice application writes a trace log to storage based on the trace information. This makes it possible to obtain information at a high level, such as which microservice applications have parent-child relationships with other microservice applications, and the execution time of each.
[0012] In distributed tracing, trace information is generally added to the headers of HTTP requests sent and received by microservice applications.
[0013] However, such systems are only designed to perform tracing within the same network layer (e.g., application layer). For example, trace information added to an HTTP header is not designed to be accessed from network layers other than the application layer, because the HTTP message is encapsulated at each layer below the application layer. In other words, while it is possible to evaluate delays caused by processing in the application layer (HTTP), it is difficult to evaluate delays caused by processing in the transport layer (TCP) or network layer (IP).
[0014] To solve this problem, a technology is known that utilizes trace information from the network layer other than the application layer (for example, Non-Patent Document 1). In this technology, a monitoring tool built into the kernel operates at a layer lower than the application layer, and the monitoring tool accesses the trace information contained in the HTTP header. This makes it possible to access trace information from both the application layer and the transport layer, for example, and enables tracing across network layers.
[0015] However, this method also has its challenges. To trace at a layer below the network layer, the network switch through which the target packet passes must reference the trace information contained in the passing packet. Network switches are generally implemented using ASICs with fixed functions, but by using ASICs with expandable functions, such as programmable ASICs, it becomes possible to reference data other than Ethernet and IP (for example, HTTP headers).
[0016] However, even if the function to reference the HTTP area is added to the ASIC, The trace information mentioned above cannot be accessed. This is because HTTP requests are stored as variable-length data inside the HTTP header. A network switch can match a fixed-length bit string and start parsing, but it cannot start parsing based on a bit string whose length is unknown. Therefore, if the length of an HTTP request is variable, the network switch cannot detect that the forwarding packet contains an HTTP request, and therefore cannot start parsing to read the stored trace information. The information processing method according to the present disclosure solves this problem.
[0017] An information processing method according to one aspect of the present disclosure includes: The method is characterized in that a first communication node adds first trace information to a first message generated by a first application and addressed to a second communication node, for tracing the first message among multiple communication nodes; adds location information indicating the location of the first trace information to a first packet containing the first message at a predetermined position before the first message; and transmits the first packet to which the first trace information and the location information have been added.
[0018] For example, when a first application generates a message conforming to the Hypertext Transfer Protocol (HTTP), the first communication node adds first trace information to the first message conforming to HTTP generated by the application program. The first message may be, for example, a combination of an HTTP header and HTTP data. The first communication node can add trace information to a predetermined area in the first message (for example, inside the HTTP header) and then pass the packet to a lower layer (for example, the transport layer). In the following description, the terms TCP header and IP header are used to include a combination of a TCP header and a payload, or an IP header and a payload.
[0019] However, as mentioned above, if this continues, the network switch that forwards the first packet cannot read the trace information. Therefore, in the information processing method according to the present disclosure, location information for informing the network switch of the location of the first trace information is added to a predetermined position in the first packet. The predetermined position is typically between the TCP header and the HTTP header, but may be any other position. For example, it may be between the TCP header and the HTTP request line, or between the TCP header and the HTTP status line. By providing this location information to the network switch in advance, the location information can be accessed from the network switch.
[0020] It is preferable that the location information has a fixed length, which makes it easier to access from a network switch.
[0021] The location information can be, for example, information indicating the length of the HTTP request line. If the length of the HTTP request line is known, the network switch that forwards the first packet can recognize the presence of an HTTP request and parse the HTTP header. In other words, it becomes possible for the network switch to acquire trace information.
[0022] In addition, when second location information is placed at the specified position in the second packet transmitted from the second communication node, the first communication node may delete the second location information and then hand over the second packet to the first application. The second location information is location information added by another communication node. If the first message conforms to HTTP, the location information is data that is not defined in HTTP. In other words, if the location information is left added, there is a risk that the application program that processes HTTP may malfunction. Therefore, the first communications node may delete the location information before handing the packet over to the first application.
[0023] Specific embodiments of the present disclosure will be described below with reference to the accompanying drawings. Unless otherwise specified, the hardware configuration, module configuration, functional configuration, etc. described in each embodiment are not intended to limit the technical scope of the disclosure to those configurations.
[0024] (First embodiment) Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. The information processing system according to this embodiment is a system in which a plurality of nodes (information processing devices) execute specific information processing in a distributed manner.
[0025] In the information processing system according to this embodiment, multiple information processing devices communicate with each other to execute tasks in a distributed manner. The multiple information processing devices may be fixed computers or mobile computers. For example, by installing an information processing device in an automobile, tasks that arise while the automobile is traveling can be processed in a distributed manner by multiple vehicles traveling in the vicinity. A microservice application that is programmed to process a predetermined task is executed in each of the multiple information processing devices. Such an architecture is called a microservice architecture.
[0026] In the information processing system according to this embodiment, an information processing device that is a parent node requests other information processing devices located lower to process a task. The information processing device that has been requested to process a task can then request the other information processing devices to process the task (part or all). The division of a task may be performed by any device. Each information processing device may execute a different type of task. When the execution of the task is completed, each node returns the processing result to the parent node, whereby the final processing result is transmitted to the information processing device that is the parent node.
[0027] Kubernetes is known as a platform that enables such processing. In Kubernetes, multiple microservices run within pods. A virtual network interface runs on the computer on which Kubernetes runs, and each pod is assigned a unique IP address. By sending an HTTP request to a pod, each microservice can be asked to process a task.
[0028] To analyze the performance of such a system, it is necessary to record which microservice application started and finished which task and when. Therefore, a method is used in which tracing information (trace information) is added when sending and receiving tasks and processing results, and a module that processes the trace information performs logging based on that information. This is called distributed tracing. As mentioned above, in communication protocols that send and receive requests and responses using the HTTP protocol, trace information can be stored in the HTTP header. The trace information includes information for tracing. Such information includes, for example, a trace identifier, a span identifier, a parent span identifier, or a node identifier. Based on this information, by writing a trace log to a common storage, it is possible to determine how the target application is divided and which microservice application is responsible for the division. This makes it possible to get an overview of when the data was processed.
[0029] The configuration of the information processing device according to this embodiment will be described with reference to FIG. The information processing device 100 includes a control device 101 , a storage device 102 , a communication device 103 , and an input / output device 104 .
[0030] The information processing device 100 can be configured by a computer having a CPU (Central Processing Unit), a main memory device, and an auxiliary memory device. Note that all or part of the functions shown in the figure may be executed using a dedicated circuit.
[0031] The control device 101 is a calculation unit that executes a predetermined program to realize various functions of the information processing device 100. The control device 101 may be realized by, for example, a CPU or the like.
[0032] The storage device 102 is a means for storing information, and is configured with storage media such as RAM, a magnetic disk, a flash memory, etc. The storage device 102 stores various programs executed by the control device 101, data used by the programs, etc.
[0033] The communication device 103 is a communication interface for connecting the information processing device 100 to a network. If the information processing device 100 is mobile, the communication device 103 can be an interface for performing wireless communication. The communication device 103 is configured to include, for example, a network interface board and a wireless communication interface for wireless communication.
[0034] The input / output device 104 is a device for inputting and outputting information. Specifically, the input / output device 104 includes a display, a touch panel, a keyboard, and the like. In this embodiment, the touch panel and the display are combined into one touch panel display. The input / output device 104 may also include a unit for outputting audio (an amplifier and a speaker), etc.
[0035] Generally, a microservice operates at the highest level (application layer) of multiple network layers. Packets generated by a microservice pass through lower network layers and reach the physical layer. Packets received by a target information processing device also pass through multiple lower network layers and reach the application layer where the microservice operates. Here, a proxy operating in each network layer can log the processing in each network layer by referring to the trace information.
[0036] Fig. 2(A) is a schematic diagram of a frame transmitted from an information processing device according to the prior art. When multiple microservices send and receive data using the HTTP protocol, the application data includes an HTTP header. Furthermore, by inserting information for distributed tracing (hereinafter referred to as trace information) into the HTTP header, tracing can be performed in the application layer.
[0037] On the other hand, if tracing is to be performed at a layer below the network layer, it is necessary to refer to trace information from the network switch that forwards the packets.
[0038] Here, we will explain the operation of a network switch. Figure 9(A) is a diagram explaining the operation of a network switch that uses a general ASIC. The ASIC in question is an ASIC with fixed functions. In such a network switch, first, parsing is performed on the packet. This allows, for example, the L2 header, MPLS header, L3 header, etc. The target data is parsed, such as the header. If the parsing results in matching information, an action is executed in a predetermined order based on the stored table. Actions include discarding, forwarding, or rewriting the packet. The network switch shown in the figure has fixed functions and cannot parse arbitrary data or add new actions. Normally, it is not expected that a network switch will reference the HTTP header, so it is also not possible to reference the trace information stored in the HTTP header.
[0039] On the other hand, by using a network switch that uses a programmable ASIC, it is possible to parse any data and perform new information processing based on that data. Figure 9(B) is a diagram explaining the operation of a network switch that uses a programmable ASIC. Such a network switch can run a programmable parser (programmable parser) and execute any logic. For example, by writing a parser that parses HTTP headers and implementing logic that performs processing based on the obtained trace information, it becomes possible to perform distributed tracing on the physical network.
[0040] However, the parser executed by the ASIC can start parsing when a specific bit string is detected, but cannot be triggered by a variable-length string. In this example, since the request line is variable length, it cannot proceed to parsing the HTTP header.
[0041] To solve this problem, the information processing device 100 according to this embodiment adds information to the target packet before sending it out, to cause the network switch to perform tracing (i.e., to allow the network switch to access the trace information).
[0042] 3 and 4 are diagrams illustrating the connection relationships of multiple modules operating in information processing device 100. Here, the device that requests task processing is referred to as information processing device 100A, and the device that receives the request, executes the task, and returns a response is referred to as information processing device 100B, to distinguish between them, but both are devices (information processing device 100) with the same configuration. The information processing device 100A is an example of a “first communication node.” In this case, the information processing device 100B is an example of a “second communication node.” The information processing devices 100A and 100B are configured to be able to communicate with a storage 200 that manages trace logs. In the following description, logging refers to writing a trace log to the storage 200.
[0043] As shown in the figure, an application 1011A, a first proxy 1012A, and a second proxy 1013A operate as functional modules in the information processing device 100A, while an application 1011B, a first proxy 1012B, and a second proxy 1013B operate as functional modules in the information processing device 100B. In this embodiment, a proxy refers to a module that relays data. The proxy in this embodiment does not need to have functions such as proxy access, data caching, and filtering. In addition, a network switch, a switch 300, is disposed on a path connecting the information processing devices. Although one switch 300 is illustrated in this example, a plurality of switches 300 may be provided.
[0044] In this embodiment, the virtual network layer is exemplified as a network layer lower than the application layer. If not, the virtual network layer can be replaced with a layer lower than the transport layer, a layer lower than the network layer, or a layer lower than the data link layer. Furthermore, the application layer in this embodiment does not necessarily have to match the application layer in the OSI model.
[0045] It should be noted that application 1011A and application 1011B, first proxy 1012A and first proxy 1012B, and second proxy 1013A and second proxy 1013B are each the same module. When there is no need to distinguish between the request sender and receiver, they will be referred to as application 1011, first proxy 1012, and second proxy 1013, respectively. Each module is executed on the control device 101 by software.
[0046] The second proxy 1013 may also be operated by eBPF (Extended Berkeley Packet Filter). eBPF is a technology that allows any program to be executed at the kernel level without modifying the source code of the OS kernel or adding modules. This makes it possible to read and write application data in the network layer, which is lower than the application layer.
[0047] FIG. 3 is a diagram illustrating transmission of a request from information processing device 100A to information processing device 100B, and FIG. 4 is a diagram illustrating transmission of a response from information processing device 100B to information processing device 100A.
[0048] First, the transmission of a request will be described with reference to FIG. Application 1011A is application software on which microservices are executed. Application 1011A executes a process of executing a task requested by a higher-level microservice application, a process of requesting a lower-level microservice application to execute a task, and a process of generating application data in accordance with an application layer protocol. In this example, application 1011A employs HTTP as the application layer protocol and requests other nodes to execute tasks via HTTP requests.
[0049] The first proxy 1012 relays packets flowing between the lower network layer and the application 1011 . Furthermore, the first proxy 1012 executes the following process.
[0050] (Process 1A) When a message including an HTTP request is handed over from the application 1011A, trace information is added to the message and logging is performed in the application layer (executed by the first proxy 1012A). (Process 1B) Following Process 1A, a process of adding a custom header immediately before the request line and constructing a packet (performed by the first proxy 1012A)
[0051] (Process 1C) A process for deleting a custom header included in a packet when the packet including an HTTP request is handed over from the virtual network layer (performed by the first proxy 1012B). (Process 1D) Processing for performing logging in the application layer and deleting trace information (executed by the first proxy 1012B)
[0052] First, the process 1A will be explained. As shown in (1) in FIG. 3, the application 1011A sends a request to another microservice application for processing. A message including a TP request is sent. Here, the first proxy 1012A inserts trace information into the HTTP header. (2) in Fig. 3 is an example of a message with trace information inserted. Furthermore, the first proxy 1012A performs logging based on the contents of the trace information, that is, writes a trace log to the storage 200 in the application layer.
[0053] Next, the first proxy 1012A executes a process of adding a custom header immediately before the request line as process 1B. The custom header is fixed-length data that notifies the network switch of the location of the trace information.
[0054] This will be specifically described with reference to FIG. 2(B). As shown in the figure, an HTTP request includes an HTTP request line and an HTTP header. The HTTP request line (hereinafter simply referred to as the "request line") includes a method (get, post, etc.), a URI, and a version, and its length is variable. In order for the switch 300 to parse the HTTP header, the length of the request line must be known. Therefore, in this embodiment, when constructing a packet, fixed-length data for notifying the length of the request line is inserted between the TCP header and the HTTP request. This data is called a custom header.
[0055] As shown in Figure 2(B), a custom header consists of a custom header identifier (ID) and a data length. The data length is a numeric value that indicates the length of the request line. The data length may be a set of multiple numeric values, such as the length of the method, the length of the URI, and the length of the version. Because the custom header is located immediately after the TCP header, the switch 300 that processes the packet can identify the area where the request line exists by detecting the custom header and reading its contents. In addition, the detection of the request line can be used as a trigger to start parsing the data that follows, making it possible to access the trace information. After process 1B, the packet will look like (3) in FIG.
[0056] The packet with the custom header and trace information inserted is handed over to the second proxy 1013A. The second proxy 1013A performs logging based on the inserted trace information. That is, in the virtual network layer, a trace log is written to the storage 200. This makes it possible to record delays and the like caused by the TCP and IP layers in the virtual network layer. It is assumed that the second proxy 1013A recognizes the existence of the custom header and can appropriately access the trace information.
[0057] The packet with the trace information inserted therein reaches the information processing device 100B on the receiving side via the network, and is processed by the second proxy 1013B. Similarly, the second proxy 1013B also performs logging based on the inserted trace information. That is, in the virtual network layer, a trace log is written to the storage 200. It is assumed that the second proxy 1013B also recognizes the existence of the custom header and can appropriately access the trace information.
[0058] Next, a process 1C will be described. The packet received by the first proxy 1012B of the information processing device 100B has a custom header inserted therein, as shown in (3) of FIG. is. If the first proxy 1012B detects a custom header in a received packet, it deletes the custom header and rearranges (move forward) the data following the custom header in process 1C. This is because if the custom header remains, the application 1011B cannot process the packet correctly. As a result, the received packet will look like (4) in Figure 3.
[0059] Next, the first proxy 1012B performs logging based on the trace information, that is, writes a trace log to the storage 200 in the application layer. Then, the first proxy 1012B deletes the trace information as process 1D, so that the packet delivered to the application 1011B becomes the same as the one generated by the source application 1011A, as shown in (5) in FIG.
[0060] Next, transmission of a response will be described with reference to FIG. Application 1011B executes a task in response to a request (HTTP request) sent from application 1011A and generates a response (HTTP response). Application 1011B operates in the application layer, just like application 1011A, and sends and receives data using the HTTP protocol. Note that in the HTTP response, a status line is placed instead of a request line.
[0061] Upon receiving the HTTP response, the first proxy 1012 executes the following process.
[0062] (Process 2A) When a message (HTTP response) is handed over from the application 1011B, trace information is added to the message and logging is performed in the application layer (executed by the first proxy 1012B). (Process 2B) Following Process 2A, a custom header is added immediately before the status line to construct a packet (performed by the first proxy 1012B).
[0063] (Process 2C) A process for deleting a custom header included in a packet when the packet including an HTTP response is handed over from the virtual network layer (executed by the first proxy 1012A). (Process 2D) Processing for performing logging in the application layer and deleting trace information (executed by the first proxy 1012A)
[0064] First, process 2A will be described. As shown in (1) in FIG. 4, the application 1011B sends a message (HTTP response) corresponding to the processing result of the task. Here, the first proxy 1012B inserts trace information into the HTTP header. (2) in FIG. 4 is an example of a message with trace information inserted. The position at which the trace information is inserted can be the same as in process 1A. Furthermore, the first proxy 1012B performs logging based on the contents of the trace information.
[0065] Next, the first proxy 1012B executes a process of adding a custom header immediately before the status line as process 2B. After process 2B, the packet will look like (3) in FIG.
[0066] The packet with the custom header and trace information inserted is passed to the second proxy 1013B. The second proxy 1013B performs logging based on the inserted trace information. Conduct a survey.
[0067] The packet into which the trace information has been inserted reaches the information processing device 100A on the receiving side via the network, and is processed by the second proxy 1013A. Similarly, the second proxy 1013A also performs logging based on the inserted trace information.
[0068] Next, a description will be given of process 2C. The packet received by the first proxy 1012A of the information processing device 100A has a custom header inserted therein, as shown in (3) in FIG. If the first proxy 1012A detects a custom header in the received packet, it deletes the custom header and rearranges (move forward) the data following the custom header in process 2C, resulting in the received packet being as shown by (4) in Figure 4.
[0069] Next, the first proxy 1012A performs logging based on the trace information, that is, writes a trace log to the storage 200 in the application layer. Then, the first proxy 1012A deletes the trace information in process 2D. As a result, the packet delivered to the application 1011B becomes the same as the one generated by the source application 1011B, as shown in (5) in FIG.
[0070] Next, a method for the switch 300 to process a packet with a custom header added will be described. The switch 300 has a function of referencing a bit in a predetermined area of a packet to be transferred, determining the presence of a processing target (for example, an Ethernet header or an IP header), and starting parsing. For example, when the switch 300 detects an IP header in a packet being transferred, it starts parsing the IP header. As a result of the parsing, the switch 300 can obtain data for processing (for example, if the target is an IP header, the source IP address, the destination IP address, etc.). The switch 300 then executes a predetermined action based on the acquired data and the stored table, such as discarding, transferring, or rewriting a packet.
[0071] The switch 300 in this embodiment has information about the location and length of the custom header in advance, and has the function of parsing the HTTP header based on the detected custom header. Specifically, the switch 300 obtains the length of the request line (status line) indicated by the custom header, detects the presence of the request line (status line) based on that length, and parses the HTTP header that follows. As a result, it is possible to obtain trace information contained in the HTTP header. Furthermore, it is possible to perform logging based on that trace information. In other words, it is possible to record information such as the timing at which the target packet passed through the switch 300 at a layer below the network layer.
[0072] Next, a description will be given of a flowchart of the processing executed by the first proxy 1012. As described above, the processing executed by the first proxy 1012 can be classified into the following four types. Process 1A, 1B: Process of constructing a packet by adding trace information and custom headers to a message containing an HTTP request Process 1C, 1D: Trace information and customization information are extracted from the packet containing the HTTP request. Header removal process Process 2A, 2B: Process of constructing a packet by adding trace information and custom headers to a message containing an HTTP response Processes 2C and 2D: Processes to remove trace information and custom headers from packets containing HTTP responses.
[0073] 5 is a flowchart of processes 1A and 1B. The illustrated processes are initiated by the first proxy 1012A when the first proxy 1012A receives a message containing an HTTP request from the application 1011A. First, in step S11, the request URI included in the received message is temporarily stored. This is to identify the pair of the HTTP request and the corresponding HTTP response. The stored request URI is used when the HTTP response is received in process 2D.
[0074] Next, in step S12, trace information is generated. The trace information includes, for example, a trace identifier, a span identifier, a parent span identifier, or a node identifier. The trace information is an example of "first trace information."
[0075] Next, in step S13, the generated trace information is temporarily stored, and in step S14, the generated trace information is inserted into the HTTP header.
[0076] Next, in step S15, a custom header is generated based on the length of the request line, and the custom header is inserted between the TCP header and the request line to form a packet.
[0077] Once the above processing is complete, the first proxy 1012A passes the target packet to the lower network layer. The first proxy 1012A also performs logging based on the trace information, which allows it to record the timing at which the HTTP request generated by the application 1011A was sent.
[0078] 6 is a flowchart of processes 1C and 1D. The illustrated processes are initiated by the first proxy 1012B when it receives a packet containing an HTTP request from a lower network layer (second proxy 1013B). First, in step S21, the request URI included in the received packet is temporarily stored. This is to identify the pair of the HTTP request and the corresponding HTTP response. The stored request URI is used when the HTTP response is received in process 2A.
[0079] Next, in step S22, the trace information contained in the HTTP header is acquired and temporarily stored in order to generate the trace information when the HTTP response is returned from application 1011B. The first proxy 1012B also performs logging based on the trace information, thereby making it possible to record the timing at which the application 1011B started processing the HTTP request.
[0080] Next, in step S23, the trace information is deleted from the HTTP header. Next, in step S24, the custom header inserted between the TCP header and the request line is deleted. Then, in step S25, data other than the trace information and the custom header is rearranged. As a result, the target packet returns to the state it was in before the process 1A was executed. When the above processing is completed, the first proxy 1012B passes the target packet to the application 1011B.
[0081] 7 is a flowchart of processes 2A and 2B. The illustrated processes are initiated by the first proxy 1012B when the first proxy 1012B receives a message including an HTTP response from the application 1011B. First, in step S31, the HTTP request and the HTTP response are matched based on the request URI temporarily stored in step S21 and the request URI included in the HTTP response, thereby identifying a pair of the HTTP request and the HTTP response. Next, in step S32, the trace information temporarily stored in step S22 is obtained, and based on this, trace information is generated in step S33 and inserted into the HTTP header. The trace information generated in this step may be a complete copy of the trace information stored in step S22, or may include part of the trace information stored in step S22. The trace information generated in this step may be any information that shows a correspondence with the trace information stored in step S22.
[0082] Next, in step S34, a custom header is generated based on the length of the status line, and the custom header is inserted between the TCP header and the HTTP header to form a packet.
[0083] Once the above processing is complete, the first proxy 1012B passes the target packet to the lower network layer. The first proxy 1012B also performs logging based on the trace information, which allows it to record the timing at which the HTTP response generated by the application 1011B was sent.
[0084] 8 is a flowchart of processes 2C and 2D. The illustrated processes are initiated by the first proxy 1012A when the first proxy 1012A receives a packet containing an HTTP response from a lower network layer (second proxy 1013A). First, in step S41, the trace information temporarily stored in step S13 is acquired and compared with the trace information included in the received HTTP header. If the trace information matches, in step S42 the trace information is deleted from the header of the received HTTP response. The first proxy 1012A also performs logging based on the trace information, thereby making it possible to record the timing at which the application 1011A started processing the HTTP response.
[0085] Next, in step S43, the custom header inserted between the TCP header and the status line is deleted, and in step S44, the trace information and data other than the custom header are rearranged. As a result, the target packet returns to the state it was in before the process 2A was executed. When the above processing is completed, the first proxy 1012A passes the target packet to the application 1011A.
[0086] As described above, in the information processing device according to this embodiment, the first proxy 1012 operating in the application layer performs the above-described processing, i.e., adds and deletes custom headers, between the application 1011 and the second proxy 1013 operating in the virtual network layer. This makes it possible to perform tracing to the network switch without affecting other services operating in the application layer (microservices provided by the application 1011).
[0087] (Second embodiment) In the first embodiment, the trace information is placed inside the HTTP header. However, if the trace information is placed from the middle to the end of the HTTP header, it may take a long time to read. This is because the HTTP header is variable length and must be searched from the beginning. In other words, as the amount of data to be processed increases, delays may increase. Furthermore, if there is an upper limit to the size of data that the ASIC can parse, the switch 300 may not be able to access the trace information.
[0088] To solve this problem, when the first proxy 1012A inserts the trace information into the HTTP header, the trace information may be placed before the HTTP header (or before the request line).Alternatively, when the first proxy 1012B inserts the trace information into the HTTP header, the trace information may be placed before the HTTP header (or before the status line). This allows high-speed access to trace information at the network layer, which is lower than the application layer.
[0089] If trace information is placed in the above-mentioned location, a packet that does not conform to HTTP may be constructed, and such a packet may not be able to be processed by the application 1011. However, since the placement and deletion of trace information is performed by the first proxy 1012, it does not affect the processing performed by the application 1011.
[0090] (Variation) The above-described embodiment is merely an example, and the present disclosure can be modified and implemented as appropriate within the scope that does not deviate from the gist of the disclosure. For example, the processes and means described in this disclosure can be freely combined and implemented as long as no technical contradiction occurs.
[0091] For example, in the description of the embodiment, an example was given in which an application program sends a message conforming to HTTP, but protocols other than HTTP, such as gRPC and MQTT, can also be adopted as long as they are protocols for sending and receiving variable-length messages.
[0092] Furthermore, a process described as being performed by one device may be shared and executed by multiple devices. Alternatively, a process described as being performed by different devices may be executed by a single device. In a computer system, the hardware configuration (server configuration) by which each function is realized can be flexibly changed.
[0093] The present disclosure can also be realized by providing a computer program implementing the functions described in the above embodiments to a computer, and having one or more processors in the computer read and execute the program. Such a computer program may be provided to the computer via a non-transitory computer-readable storage medium connectable to the computer's system bus or via a network. Non-transitory computer-readable storage media include, for example, any type of disk, such as a magnetic disk (e.g., a floppy disk, a hard disk drive (HDD), etc.), an optical disk (e.g., a CD-ROM, a DVD disk, a Blu-ray disk), a read-only memory (ROM), a random access memory (RAM), an EPROM, an EEPROM, a magnetic card, a flash memory, an optical card, or any type of medium suitable for storing electronic instructions. [Explanation of symbols]
[0094] 100 Information processing device 101 Control device 102...Storage device 103 Communication equipment 104 Input / output device
Claims
1. a first communication node; adding first trace information to a first message generated by a first application and destined for a second communication node, the trace information being used to trace the first message among a plurality of communication nodes; adding location information indicating a location of the first trace information to a predetermined position before the first message in a first packet including the first message; transmitting the first packet to which the first trace information and the location information have been added; An information processing method that performs the above.
2. The first communication node, when second location information is placed in the predetermined position of the second packet transmitted from the second communication node, deleting the second location information and then delivering the second packet to the first application; The information processing method according to claim 1 .
3. the first message is a message conforming to HTTP (Hypertext Transfer Protocol), The first trace information is added in an HTTP header.
3. The information processing method according to claim 1.
4. The location information is fixed-length data added between the TCP header and the HTTP header. The information processing method according to claim 3 .
5. a network switch that relays the first packet between the first communication node and the second communication node, detecting the location information from the first packet; Parsing the HTTP header based on the location information to obtain the first trace information; storing a log relating to tracing of the first message in a predetermined storage device based on the first trace information; To execute The information processing method according to claim 4.
Citation Information
Patent Citations
Relay device and program
JP2010061406A
Network service system, network management method and computer program
JP2022007690A
Packet tracing mechanism in a network leveraging srv6
US20210152470A1
Smart distributed tracing context injection
US20220083454A1
Method for tracing application execution path in a distributed data processing system
US7194664B1