DPU-based data plane log acquisition method and system
By real-time monitoring and sending forwarding logs to the transfer station in the DPU's on-chip system, the problem of high log acquisition complexity in the DPU centralized agent is solved and more flexible log processing is achieved.
Patent Information
- Application Number
- CN202311176635.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-12
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-09-12
AI Technical Summary
The data plane log acquisition in the existing DPU centralized agent is highly complex and has poor flexibility.
In the DPU's on-chip system, log files are monitored in real time for the presence of forwarding logs and sent to the preset transfer station, allowing users to obtain forwarding logs from the transfer station and communicate with the data plane and control plane through the monitor and transfer station. , to achieve log matching, generation, formatting and storage.
It effectively reduces the complexity of obtaining data plane logs and improves the flexibility of log processing.
Smart Images

Figure CN117435420B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the DPU field, and in particular to a method and system for obtaining data plane logs based on a DPU. Background Art
[0002] DPU (Data Processing Unit) is a data-centric, I / O-intensive, software-defined technology route to support infrastructure resource layer virtualization, and a new generation of computing chips that can improve computing system efficiency, reduce the total cost of ownership of the overall system, improve data processing performance, and reduce the performance loss of other computing chips. Service mesh is a platform for managing communication between services in a microservice architecture. It usually consists of two components: the control plane and the data plane. The control plane is responsible for tasks such as service discovery, load balancing, and traffic management, while the data plane is responsible for actual request forwarding and processing.
[0003] The acquisition of data plane logs in the existing DPU centralized agent is highly complex and has poor flexibility. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a method and system for obtaining a data plane log based on a DPU to eliminate or improve one or more defects existing in the prior art.
[0005] A first aspect of the present application provides a method for obtaining a data plane log based on a DPU, which is executed by a monitor. The method includes:
[0006] In the system-on-chip of the DPU, real-time monitoring is performed to determine whether a forwarding log currently exists in a log file in the system-on-chip, wherein the forwarding log is generated by updating the log file by a data plane in the system-on-chip based on a forwarding configuration sent by a control plane on a host side;
[0007] If the forwarding log exists in the log file, the forwarding log is sent to a transfer station preset on the host side so that the user can obtain the forwarding log from the transfer station.
[0008] In some embodiments of the present application, the data plane is used to perform the following:
[0009] Receiving the forwarding configuration sent by the control plane;
[0010] The forwarding configuration is matched with a forwarding object on the system on chip. If the match is successful, the forwarding object is forwarded to a corresponding container, and a corresponding forwarding log is generated. Then, a log file on the system on chip is updated based on the forwarding log.
[0011] In some embodiments of the present application, the receiving the forwarding configuration sent by the control plane includes:
[0012] receiving, from the transfer station, a forwarding configuration issued by the control plane obtained based on a control plane component;
[0013] The forwarding configuration is requested from the transfer station based on a preset data interaction port, and the forwarding configuration is received after the request is successful.
[0014] In some embodiments of the present application, the forwarding configuration is obtained by the control plane component filling in the target service on the host side based on a preset format template.
[0015] In some embodiments of the present application, the content of the format template includes:
[0016] The IP address, port, container and registration type of the target service.
[0017] A second aspect of the present application provides a method for obtaining a data plane log based on a DPU, which is executed by a transfer station. The method includes:
[0018] Receiving a forwarding log sent by a monitor, which is detected in real time by the monitor in the log file in the chip system of the DPU, so that a user can obtain the forwarding log;
[0019] The forwarding log is generated by updating the log file by the data plane in the chip system of the DPU based on the forwarding configuration sent by the control plane on the host side.
[0020] In some embodiments of the present application, it also includes:
[0021] Formatted data and a query interface are added to the forwarding log, and the forwarding log is stored and visualized.
[0022] In some embodiments of the present application, the data plane is used to perform the following:
[0023] Receiving the forwarding configuration sent by the control plane;
[0024] The forwarding configuration is matched with a forwarding object on the system on chip. If the match is successful, the forwarding object is forwarded to a corresponding container, and a corresponding forwarding log is generated. Then, a log file on the system on chip is updated based on the forwarding log.
[0025] In some embodiments of the present application, the receiving the forwarding configuration sent by the control plane includes:
[0026] Receiving a forwarding configuration issued by the control plane obtained by the transfer station based on the control plane component;
[0027] The forwarding configuration is requested from the transfer station based on a preset data interaction port, and the forwarding configuration is received after the request is successful.
[0028] The third aspect of the present application provides a DPU-based data plane log acquisition system, including:
[0029] A monitor and a transfer station on the host side are respectively arranged in the system on chip of the DPU;
[0030] The monitor is used to execute the method for obtaining the data plane log based on the DPU according to the first aspect; the monitor is respectively connected to the data plane and the log file in the transfer station, the on-chip system of the DPU;
[0031] The transfer station is used to execute the DPU-based data plane log acquisition method described in the second aspect; the transfer station is respectively communicated with the control plane on the host side, the data plane in the DPU's on-chip system, and the monitor.
[0032] The present application provides a method and system for obtaining data plane logs based on a DPU, the method comprising: monitoring in real time in the DPU system-on-chip whether there is a forwarding log in the log file in the system-on-chip, wherein the forwarding log is generated by the data plane in the system-on-chip after updating the log file based on the forwarding configuration issued by the control plane on the host side; if the forwarding log exists in the log file, the forwarding log is sent to a transfer station preset on the host side so that the user can obtain the forwarding log from the transfer station. The present application can effectively reduce the complexity of obtaining data plane logs, while effectively improving the flexibility of log processing.
[0033] Additional advantages, purposes, and features of the present application will be partially described in the following description, and will become partially apparent to those skilled in the art after studying the following, or may be learned from the practice of the present application. The purposes and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the specification and the drawings.
[0034] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present application are not limited to the above specific description, and the above and other purposes that can be achieved by the present application will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings described herein are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. The components in the drawings are not drawn to scale, but are only for the purpose of illustrating the principles of the present application. In order to facilitate the illustration and description of some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present application. In the drawings:
[0036] Figure 1 The present invention is a flowchart of a method for obtaining a DPU-based data plane log executed by a monitor in one embodiment of the present application.
[0037] Figure 2 This is a structural diagram of a method for obtaining a data plane log based on a DPU in another embodiment of the present application.
[0038] Figure 3 This is a flowchart of a method for obtaining a DPU-based data plane log executed by a transfer station in another embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the implementation modes and the accompanying drawings. Here, the illustrative implementation modes and descriptions of the present application are used to explain the present application, but are not intended to limit the present application.
[0040] It should also be noted here that in order to avoid obscuring the present application due to unnecessary details, only the structures and / or processing steps closely related to the scheme according to the present application are shown in the accompanying drawings, while other details that are not very relevant to the present application are omitted.
[0041] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0042] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0043] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0044] The details are described in detail through the following examples.
[0045] The present application embodiment provides a method for obtaining a data plane log based on a DPU that can be executed by a monitor, see Figure 1The method for obtaining the data plane log based on the DPU specifically includes the following contents:
[0046] Step 110: Monitor in real time in the system-on-chip of the DPU whether there is a forwarding log in the log file in the system-on-chip, wherein the forwarding log is generated by updating the log file by the data plane in the system-on-chip based on the forwarding configuration sent by the control plane on the host side.
[0047] Step 120: If the forwarding log exists in the log file, the forwarding log is sent to a transfer station preset on the host side so that the user can obtain the forwarding log from the transfer station.
[0048] Specifically, see Figure 2 First, in the DPU system-on-chip (i.e. Figure 2 Deploy monitors and data planes (i.e. Figure 2 envoy in the host), deploy the control plane on the host side (i.e. Figure 2 The monitor sends a post-type HTTP request to the transfer station to establish a short link. Based on the established short link, the monitor monitors in real time whether there is a forwarding log in the log file on the data plane. If there is a forwarding log in the log file, the forwarding log is sent to the transfer station so that the user can obtain the forwarding log from the transfer station, thereby effectively reducing the complexity of obtaining data plane logs and effectively improving the flexibility of log processing.
[0049] Among them, the forwarding log is generated by the data plane after updating the log file based on the forwarding configuration issued by the control plane; the monitoring method can adopt polling, file system notifications and inotify (Linux specific), and the inotify method is preferably used in this application.
[0050] In order to effectively update the log file, the data plane in step 110 is used to perform the following:
[0051] Receiving the forwarding configuration sent by the control plane;
[0052] The forwarding configuration is matched with a forwarding object on the system on chip. If the match is successful, the forwarding object is forwarded to a corresponding container, and a corresponding forwarding log is generated. Then, a log file on the system on chip is updated based on the forwarding log.
[0053] Specifically, the data plane first receives the forwarding configuration sent by the control plane; then matches the forwarding configuration with the forwarding object on the system on chip. If the match is successful, the forwarding object is forwarded to the corresponding container and a corresponding forwarding log is generated. The log file on the system on chip is updated based on the forwarding log, thereby effectively updating the log file.
[0054] The forwarding object is the service request corresponding to the service on the host side; the forwarding log includes data such as the start time of the request, the protocol, the upstream object address of the request, and the downstream object address of the request.
[0055] In order to further obtain the forwarding configuration, the receiving the forwarding configuration sent by the control plane includes:
[0056] receiving, from the transfer station, a forwarding configuration issued by the control plane obtained based on a control plane component;
[0057] The forwarding configuration is requested from the transfer station based on a preset data interaction port, and the forwarding configuration is received after the request is successful.
[0058] Specifically, first, the data plane, the transfer station and the control plane communicate with each other through gRPC (google Remote Procedure Calls) to establish a corresponding communication link. On the basis of this communication link, the data plane first receives the forwarding configuration issued by the control plane based on the control plane component obtained from the transfer station; then, based on the preset data interaction port, it requests the forwarding configuration from the transfer station, and after the request is successful, receives the forwarding configuration, so as to further effectively obtain the forwarding configuration.
[0059] Among them, the preset data interaction port is pre-agreed upon by the transfer station and the data plane.
[0060] In order to effectively improve the accuracy of forwarding the forwarding object, the forwarding configuration is obtained by the control plane component filling the target service on the host side based on a preset format template.
[0061] The content of the format template includes:
[0062] The IP address, port, container and registration type of the target service.
[0063] Specifically, the control plane component performs service discovery for each business in the container cluster, and uses a standard template to fill in the IP address, port, container, and registration type (tcp or http) of the business. The template also includes: field flow limiting times, circuit breaker times, etc., which can effectively improve the accuracy of forwarding the forwarding object.
[0064] The present application embodiment provides a method for obtaining a data plane log based on a DPU that can be executed by a transfer station, see Figure 3 The method for obtaining the data plane log based on the DPU specifically includes the following contents:
[0065] Step 210: receiving a forwarding log sent by a monitor, which is detected in real time by the monitor in the log file in the system-on-chip of the DPU, so that a user can obtain the forwarding log.
[0066] Step 220: wherein the forwarding log is generated by the data plane in the system-on-chip of the DPU after updating the log file based on the forwarding configuration sent by the control plane on the host side.
[0067] Specifically, the transfer station receives the forwarding log sent by the monitor, which is detected in real time by the monitor in the log file in the DPU's on-chip system, so that the user can obtain the forwarding log, thereby effectively reducing the complexity of obtaining data plane logs and effectively improving the flexibility of log processing.
[0068] The forwarding log is generated by updating the log file by the data plane in the chip system of the DPU based on the forwarding configuration sent by the control plane on the host side.
[0069] In order to effectively improve the flexibility of the transfer station, the method for obtaining the data plane log based on the DPU also includes:
[0070] Formatted data and a query interface are added to the forwarding log, and the forwarding log is stored and visualized.
[0071] Specifically, the transfer station adds formatted data and a query interface to the forwarding log, as well as persistently stores and visualizes the forwarding log, which can effectively improve the flexibility of the transfer station.
[0072] Among them, the query interface includes the List interface, which is used to view all forwarding logs processed by the Soc side monitor; the Watch interface is used to send the Watch interface on the host side to monitor the transfer station instance and dynamically view the log information.
[0073] In order to effectively update the log file, the data plane in step 220 is used to perform the following:
[0074] Receiving the forwarding configuration sent by the control plane;
[0075] The forwarding configuration is matched with a forwarding object on the system on chip. If the match is successful, the forwarding object is forwarded to a corresponding container, and a corresponding forwarding log is generated. Then, a log file on the system on chip is updated based on the forwarding log.
[0076] Specifically, the data plane first receives the forwarding configuration sent by the control plane; then matches the forwarding configuration with the forwarding object on the system on chip. If the match is successful, the forwarding object is forwarded to the corresponding container and a corresponding forwarding log is generated. The log file on the system on chip is updated based on the forwarding log, thereby effectively updating the log file.
[0077] The forwarding object is the service request corresponding to the service on the host side; the forwarding log includes data such as the start time of the request, the protocol, the upstream object address of the request, and the downstream object address of the request.
[0078] In order to further obtain the forwarding configuration, the receiving the forwarding configuration sent by the control plane includes:
[0079] Receiving a forwarding configuration issued by the control plane obtained by the transfer station based on the control plane component;
[0080] The forwarding configuration is requested from the transfer station based on a preset data interaction port, and the forwarding configuration is received after the request is successful.
[0081] Specifically, first, the data plane, the transfer station and the control plane are connected through grpc (Google Remote Call) to establish a corresponding communication link. On the basis of this communication link, the data plane first receives the forwarding configuration issued by the control plane based on the control plane component obtained from the transfer station; then requests the forwarding configuration from the transfer station based on the preset data interaction port, and after the request is successful, receives the forwarding configuration, so as to further effectively obtain the forwarding configuration.
[0082] Among them, the preset data interaction port is pre-agreed upon by the transfer station and the data plane.
[0083] The present application also provides a DPU-based data plane log acquisition system, the system comprising: a monitor and a host-side transfer station respectively arranged in a system-on-chip of the DPU;
[0084] The monitor is used to perform Figure 1 The method for obtaining the data plane log based on the DPU as shown in the above; the monitor is respectively connected to the data plane and the log file of the transfer station, the on-chip system of the DPU;
[0085] The transfer station is used to perform Figure 3The method for obtaining the data plane log based on the DPU as shown in the above; the transfer station is respectively communicated with the control plane on the host side, the data plane in the on-chip system of the DPU and the monitor.
[0086] The present application provides a method and system for obtaining data plane logs based on a DPU, the method comprising: monitoring in real time in the DPU system-on-chip whether there is a forwarding log in the log file in the system-on-chip, wherein the forwarding log is generated by the data plane in the system-on-chip after updating the log file based on the forwarding configuration issued by the control plane on the host side; if the forwarding log exists in the log file, the forwarding log is sent to a transfer station preset on the host side so that the user can obtain the forwarding log from the transfer station. The present application can effectively reduce the complexity of obtaining data plane logs, while effectively improving the flexibility of log processing.
[0087] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is specifically performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0088] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0089] In the present application, features described and / or illustrated for one embodiment may be used in the same manner or in a similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0090] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for obtaining data plane logs based on DPU, characterized in that: include: In the system-on-chip of the DPU, real-time monitoring is performed to determine whether a forwarding log currently exists in a log file in the system-on-chip, wherein the forwarding log is generated by updating the log file by a data plane in the system-on-chip based on a forwarding configuration sent by a control plane on a host side; If the forwarding log exists in the log file, the forwarding log is sent to a transfer station preset on the host side so that the user can obtain the forwarding log from the transfer station; The data plane is used to perform the following: Receiving the forwarding configuration sent by the control plane; Matching the forwarding configuration with a forwarding object on the system on chip, if the match succeeds, forwarding the forwarding object to a corresponding container, generating a corresponding forwarding log, and updating a log file on the system on chip based on the forwarding log; The receiving the forwarding configuration sent by the control plane includes: receiving, from the transfer station, a forwarding configuration issued by the control plane obtained based on a control plane component; The forwarding configuration is requested from the transfer station based on a preset data interaction port, and the forwarding configuration is received after the request is successful.
2. The method for obtaining data plane logs based on DPU according to claim 1, characterized in that: The forwarding configuration is obtained by filling the target service on the host side by the control plane component based on a preset format template.
3. The method for obtaining data plane logs based on DPU according to claim 2, characterized in that: The content of the format template includes: The IP address, port, container and registration type of the target service.
4. A method for obtaining data plane logs based on DPU, characterized in that: include: receiving a forwarding log sent by a monitor and detected in real time by the monitor in a log file in a chip system of the DPU, so that a user can obtain the forwarding log; The forwarding log is generated by the data plane of the on-chip system of the DPU after updating the log file based on the forwarding configuration sent by the control plane of the host side; The data plane is used to perform the following: Receiving the forwarding configuration sent by the control plane; Matching the forwarding configuration with a forwarding object on the system on chip, if the match succeeds, forwarding the forwarding object to a corresponding container, generating a corresponding forwarding log, and updating a log file on the system on chip based on the forwarding log; The receiving the forwarding configuration sent by the control plane includes: Receiving a forwarding configuration issued by the control plane obtained by the transfer station based on the control plane component; The forwarding configuration is requested from the transfer station based on a preset data interaction port, and the forwarding configuration is received after the request is successful.
5. The method for obtaining data plane logs based on DPU according to claim 4, characterized in that: Also includes: Formatted data and a query interface are added to the forwarding log, and the forwarding log is stored and visualized.
6. A DPU-based data plane log acquisition system, characterized in that: include: A monitor and a transfer station on the host side are respectively arranged in the system on chip of the DPU; The monitor is used to execute the method for obtaining the data plane log based on the DPU according to any one of claims 1 to 3; the monitor is respectively connected to the data plane and the log file of the transfer station, the on-chip system of the DPU; The transfer station is used to execute the DPU-based data plane log acquisition method described in any one of claims 4 to 5; the transfer station is respectively communicated with the control plane on the host side, the data plane in the on-chip system of the DPU, and the monitor.
Citation Information
Patent Citations
Log monitoring system based on Logstash distributed system
CN106855888A
