Information processing method
By adding custom headers with fixed-length location information in network packets, the method facilitates tracing across multiple network layers in microservice architectures, overcoming the limitations of fixed-function network switches and providing detailed performance monitoring.
Patent Information
- Application Number
- JP2023021723
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-02-15
AI Technical Summary
Existing distributed tracing technologies struggle to monitor latency across multiple network layers in microservice architectures, particularly at the transport and network layers, due to limitations in accessing trace information from network switches with fixed functionality.
The method involves adding location information for trace data at a predetermined position in network packets, allowing network switches to identify and access trace information, even when using variable-length HTTP requests, by inserting a custom header with fixed-length data indicating the trace information's location.
Enables distributed tracing across physical networks by allowing network switches to parse and log trace information from multiple network layers, providing a comprehensive view of microservice application performance without affecting the application's functionality.
Smart Images

Figure 2024115850000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to communications. [Background technology]
[0002] In recent years, technology that uses microservices to perform distributed processing has become widespread. Distributed tracing is a mechanism for monitoring latency and other issues in applications built with a microservice architecture. 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 performing 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 performs the following steps: adding 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; adding location information indicating a location of the first trace information to a first packet containing the first message, at a predetermined position before the first message; and transmitting the first packet with the first trace information and the location information added.
[0006] Another aspect of the present invention 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. Effect of the Invention
[0007] The present disclosure enables distributed tracing in a physical network. [Brief description 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. [Diagram 2] FIG. 4 is a schematic diagram of a frame transmitted from the information processing device 100A. [Diagram 3] 4 is a diagram for explaining transmission of a request from an information processing device 100A to an information processing device 100B. [Figure 4] FIG. 13 is a diagram illustrating transmission of a response from the information processing device 100B to the information processing device 100A. [Diagram 5] 13 is a flowchart of a process 1A executed by the first proxy. [Figure 6] 13 is a flowchart of a process 1B executed by the first proxy. [Figure 7] 13 is a flowchart of a process 2B executed by the first proxy. [Figure 8] 13 is a flowchart of a process 2A executed by the first proxy. [Figure 9]FIG. 4 is a diagram for explaining the flow of processing executed by a network switch. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Microservices architecture is known. Microservices architecture is an architecture in which an application provided to a user is divided into multiple independent small-scale applications (hereinafter, microservices applications) and the microservices applications are executed in a distributed manner on 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 an overall perspective. 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 data sent and received between microservice applications, and each microservice application writes trace logs 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 which 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 a system assumes tracing only in the same network layer (e.g., application layer). For example, trace information added to an HTTP header is not assumed to be accessed from a network layer other than the application layer because the HTTP message is encapsulated in each layer below the application layer. In other words, while it is possible to evaluate delays and other factors caused by processing at the application layer (HTTP), it is difficult to evaluate delays and other factors caused by processing at the transport layer (TCP) or network layer (IP).
[0014] To solve this problem, a technology is known that utilizes trace information from a 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 included 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 problems. To perform tracing at a layer below the network layer, the network switch through which the target packet passes must refer to the above-mentioned 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 refer to data other than Ethernet and IP (for example, HTTP headers).
[0016] However, even if a function to reference the HTTP area is added to the ASIC, The trace information described above cannot be accessed. This is because the HTTP request is stored as variable-length data inside the HTTP header. The network switch can start parsing by matching a fixed-length bit string, but cannot start parsing based on a bit string whose length is unknown. Therefore, if the length of the 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 such a problem.
[0017] An information processing method according to an embodiment of the present disclosure includes: The method is characterized in that a first communication node adds first trace information for tracing a first message among a plurality of communication nodes to a first message generated by a first application and addressed to a second communication node, adds location information indicating a location of the first trace information to a first packet including 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 the first trace information to the first message conforming to the HTTP generated by the application program. The first message may be, for example, a pair of an HTTP header and HTTP data. The first communications node can add trace information to a predetermined area in the first message (eg, inside the HTTP header) and then pass the packet to a lower layer (eg, the transport layer). In the following description, the terms TCP header and IP header are used to include a set of a TCP header and a payload, or an IP header and a payload.
[0019] However, as described above, if things stay as they are, 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 instructing the network switch of the location of the first trace information is added to a predetermined position in the first packet. The predetermined position can typically be between the TCP header and the HTTP header, but may be other positions. 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 a 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 the location information 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, it is possible to make the network switch that forwards the first packet recognize the presence of an HTTP request and parse the HTTP header. In other words, it is possible to make the network switch obtain trace information.
[0022] In addition, when second location information is placed at the specified position of the second packet transmitted from the second communication node, the first communications 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 complies with HTTP, the location information is data that is not stipulated 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 passing the packet to the first application.
[0023] Specific embodiments of the present disclosure will be described below with reference to the drawings. Unless otherwise specified, the hardware configuration, module configuration, functional configuration, and the like described in each embodiment are not intended to limit the technical scope of the disclosure to only those.
[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) executes specific information processing in a distributed manner.
[0025] In the information processing system according to the present embodiment, a plurality of information processing devices communicate with each other to execute tasks in a distributed manner. The plurality of 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 a plurality of vehicles traveling in the vicinity. In each of the multiple information processing devices, a microservice application that is programmed to process a specific task is executed. 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. Furthermore, the information processing device that has been requested to process a task can request the other information processing devices to process the task (part or all). The division of a task may be performed by any device. Furthermore, 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, so that the final processing result is transmitted to the information processing device that is the parent node.
[0027] Kubernetes is known as a platform that makes this type of processing possible. In Kubernetes, multiple microservices run within a pod. 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 the pod, it is possible to request each microservice to process a task.
[0028] To analyze the performance of such a system, it is necessary to record which microservice application started / ended 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 a communication protocol that sends and receives requests and responses via the HTTP protocol, trace information can be stored in the HTTP header. The trace information includes information for performing tracing. Such information includes, for example, a trace identifier, a span identifier, a parent span identifier, or a node identifier. Based on this, by writing a trace log to a common storage, it is possible to know 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 an 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 storage device, and an auxiliary storage 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.
[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 formed by one touch panel display. The input / output device 104 may include a unit for outputting sound (an amplifier and a speaker), and the like.
[0035] Generally, a microservice operates at the highest level (application layer) of multiple network layers. A packet generated by a certain microservice passes through lower network layers and reaches the physical layer. A packet received by a target information processing device passes through multiple lower network layers and reaches the application layer where the microservice operates. Here, a proxy operating in each network layer can refer to the trace information to log the processing in each network layer.
[0036] 2(A) is a schematic diagram of a frame transmitted from an information processing device according to the conventional technology. When multiple microservices transmit and receive data using the HTTP protocol, the application data includes an HTTP header. In addition, by inserting information for distributed tracing (hereinafter, trace information) into the HTTP header, tracing can be performed in the application layer.
[0037] On the other hand, when tracing is to be performed at a layer lower than the network layer, it is necessary to refer to the trace information from the network switch that forwards the packets.
[0038] Here, the operation of a network switch will be explained. FIG. 9(A) is a diagram explaining the operation of a network switch using 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, for example, to find a match. If the parsing results in a match, an action is executed in a predetermined order based on the stored table. An action is, for example, 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 assumed that a network switch will reference the HTTP header, so it is not possible to reference the trace information stored in the HTTP header.
[0039] On the other hand, when a network switch using a programmable ASIC is used, any data can be parsed and new information processing can be performed based on the parsed data. FIG. 9(B) is a diagram explaining the operation of a network switch using a programmable ASIC. In such a network switch, a programmable parser (programmable parser) can be operated to 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, a method of performing distributed tracing in a physical network can be adopted.
[0040] However, the parser executed by the ASIC can start parsing when a specific bit string is detected as a trigger, but cannot start parsing when a variable-length character string is detected. In this example, since the request line is variable length, it cannot proceed to parsing the HTTP header.
[0041] To solve this problem, in the information processing device 100 according to this embodiment, before sending out the target packet, information for causing the network switch to perform tracing (i.e., for allowing the network switch to access the trace information) is added.
[0042] 3 and 4 are diagrams for explaining the connection relationship of a plurality of modules operating in the information processing device 100. Here, the device that requests task processing is referred to as the information processing device 100A, and the device that receives the request, executes the task, and returns a response is referred to as the information processing device 100B, to distinguish between them, but both are devices (information processing devices 100) having 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 the storage 200 that manages the trace logs. In the following description, logging refers to writing the trace logs 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, the proxy refers to a module that relays data. The proxy in this embodiment does not need to have functions such as proxy access, data cache, and filtering. Further, on the path connecting the information processing devices, a network switch, a switch 300, is disposed. Note that, in this example, one switch 300 is illustrated, but a plurality of switches 300 may be disposed.
[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 coincide with the application layer in the OSI model.
[0045] Note 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 sending side and the request receiving side, they are 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 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 a module. 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. The application 1011A is application software on which microservices are executed. The 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, the application 1011A employs HTTP as the application layer protocol, and requests other nodes to execute a task via an HTTP request.
[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) A process for adding trace information to a message containing an HTTP request when the message is delivered from the application 1011A and performing logging 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 described. As shown in (1) in FIG. 3, the application 1011A issues a HT 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 for notifying the network switch of the location of the trace information.
[0054] A specific description will be given with reference to FIG. 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 a packet is constructed, 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 Fig. 2(B), the custom header includes a custom header identifier (ID) and a data length. The data length is a value that indicates the length of the request line. The data length may be a set of multiple values, such as the length of the method, the length of the URI, and the length of the version. Since the custom header is placed immediately after the TCP header, the switch 300 that processes the packet can detect the custom header and read its contents to identify the area in which the request line exists. 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 into which the custom header and trace information have been 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 presence of the custom header and can appropriately access the trace information.
[0057] The packet into which the trace information is inserted reaches the receiving information processing device 100B 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 presence 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. It 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 FIG. 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, similar to application 1011A, and transmits and receives data using the HTTP protocol. Note that in an HTTP response, a status line is placed instead of a request line.
[0061] The first proxy 1012 that receives the HTTP response executes the following process.
[0062] (Process 2A) A process for adding trace information to a message (HTTP response) delivered from the application 1011B and performing logging in the application layer (executed by the first proxy 1012B) (Process 2B) Following process 2A, a process of adding a custom header immediately before the status line and constructing a packet (performed by the first proxy 1012B)
[0063] (Process 2C) A process for deleting a custom header contained in a packet when the packet containing 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, the process 2A will be described. As shown in (1) in FIG. 4, the application 1011B transmits 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 the position at which the process 1A is inserted. In addition, 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 becomes as shown at (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 is inserted reaches the receiving information processing device 100A 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, the process 2C will be described. The packet received by the first proxy 1012A of the information processing device 100A has a custom header inserted therein, as shown by (3) in FIG. When the first proxy 1012A 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 2C. As a result, the received packet becomes as shown by (4) in FIG.
[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 as process 2D, so that 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 to which a custom header has been added will be described. The switch 300 has a function of referencing a bit in a predetermined area of a packet to be forwarded, 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 from a packet to be transferred, it starts parsing the IP header. As a result of the parsing, the switch 300 can obtain data for processing (for example, when the target is an IP header, the source IP address, the destination IP address, and the like). Furthermore, the switch 300 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 on the location and length of the custom header in advance, and has a function of parsing the HTTP header based on the detected custom header. Specifically, the length of the request line (status line) indicated by the custom header is obtained, the presence of the request line (status line) is detected based on the length, and the following HTTP header is parsed. As a result, the trace information included in the HTTP header can be obtained. Also, logging can be performed based on the trace information. In other words, information on the timing when the target packet passed through the switch 300 can be recorded at a layer lower than the network layer.
[0072] Next, a description will be given of a flowchart of the process executed by the first proxy 1012. As described above, the process executed by the first proxy 1012 can be classified into the following four types. Processes 1A and 1B: Processes that add trace information and custom headers to messages containing HTTP requests to construct packets Process 1C, 1D: Trace information and custom information are extracted from packets containing HTTP requests. Header removal process Process 2A, 2B: Process of constructing a packet by adding trace information and custom headers to a message including an HTTP response Processes 2C and 2D: Processes for removing trace information and custom headers from packets containing HTTP responses
[0073] 5 is a flow chart of processes 1 A and 1 B. The illustrated processes are initiated by the first proxy 1012A when the first proxy 1012A receives a message including 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] When the above processing is completed, 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. This makes it possible to record the timing at which the HTTP request generated by the application 1011A was sent.
[0078] 6 is a flow chart of processes 1C and 1D. The illustrated processes are initiated by the first proxy 1012B when the first proxy 1012B receives a packet containing an HTTP request from a lower network layer (the second proxy 1013B). First, in step S21, the request URI included in the received packet is temporarily stored. This is to identify a pair of an HTTP request and a corresponding HTTP response. The stored request URI is used when an HTTP response is received in process 2A.
[0079] Next, in step S22, the trace information contained in the HTTP header is obtained 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. This returns the target packet to the state it was in before processing 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 flow chart 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, matching between an HTTP request and an HTTP response is performed based on the request URI temporarily stored in step S21 and the request URI included in the HTTP response, thereby identifying a pair of an HTTP request and an HTTP response. Next, in step S32, the trace information temporarily stored in step S22 is obtained, and based on this, in step S33, trace information is generated and the generated trace information is 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 a part of the trace information stored in step S22. The trace information generated in this step may be any information that indicates the 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] When the above processing is completed, 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. This makes it possible 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 including an HTTP response from a lower network layer (the second proxy 1013A). First, in step S41, the trace information temporarily stored in step S13 is obtained 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. This returns the target packet to the state it was in before processing 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-mentioned processing, i.e., adding and deleting a custom header, 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 (microservices provided by the application 1011) operating in the application layer.
[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, a problem may occur in that it takes a long time to read. This is because the HTTP header is variable length and needs to be searched from the beginning. In other words, if the amount of data to be processed increases, the delay may increase. Also, 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 in front of the HTTP header (or before the request line). Also, when the first proxy 1012B inserts the trace information into the HTTP header, the trace information may be placed in front of 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 position, a packet that does not conform to HTTP may be constructed, and such a packet may not be able to be processed by application 1011. However, since the placement and deletion of trace information is performed by first proxy 1012, it does not affect the processing performed by application 1011.
[0090] (Modification) The above-described embodiment is merely an example, and the present disclosure can be modified and implemented as appropriate without departing from the spirit and scope of the present 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 a protocol other than HTTP, such as gRPC or MQTT, can also be adopted as long as it is a protocol 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 one 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 supplying a computer program implementing the functions described in the above embodiments to a computer, and having one or more processors of the computer read and execute the program. Such a computer program may be provided to the computer by a non-transitory computer-readable storage medium connectable to the system bus of the computer, or may be provided to the computer via a network. Non-transitory computer-readable storage media include, for example, any type of disk, such as a magnetic disk (floppy disk, hard disk drive (HDD), etc.), an optical disk (CD-ROM, DVD disk, Blu-ray disk, etc.), a read-only memory (ROM), a random access memory (RAM), an EPROM, an EEPROM, a magnetic card, a flash memory, an optical card, and 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 within a first message generated by a first application and destined for a second communication node, the first 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 are added; An information processing method.
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 based on the first trace information; 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
Cited By
Stream orchestration for variable-length message streams
US20250095870A1
