Data processing method, system, device and medium based on DPU service mesh
By using DPU service mesh to uniformly generate and parse tracing header information in a distributed system, the problem of high resource consumption in existing technologies is solved, performance is improved, flexible tracing management is achieved, and latency is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2026-03-27
AI Technical Summary
In distributed systems, existing technologies require the integration of a module that generates tracking header information into each application, which leads to significant resource consumption, especially impacting the processing performance of business requests under high load scenarios.
The data processing method based on DPU service mesh is adopted. By pre-setting DPU tracing data packets in the host to generate tracing header information, and using DPU service mesh to parse and generate cross-service tracing header information, the function module for generating tracing header information in each container group is avoided, and the addition of tracing header information is uniformly realized.
It reduced resource consumption, improved the performance of business applications, enabled flexible tracking and management, reduced request processing latency, and improved the system's processing capacity.
Smart Images

Figure CN119697261B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of communication technology, and particularly relates to a data processing method and system based on DPU service mesh, equipment and medium. BACKGROUND
[0002] In a distributed system, especially a micro-service system, an external request often needs to be called by multiple internal applications to complete. In this series of calls, some may be serial, and some may be parallel. Therefore, in order to understand the entire calling process, link tracking needs to be performed on each request, and a distributed request is restored to a calling link, and the traffic flow corresponding to a distributed request is centrally displayed, such as time consumption on each application, request state of each service node, and the like.
[0003] In the related art, in order to connect different spans of tracking to completely view the traffic flow, the application itself implements the transmission of tracking header information between incoming and outgoing requests, wherein the tracking header information can include x-request-id, x-b3-traceid, x-b3-spanid, and the like. Therefore, a related functional module for generating tracking header information needs to be integrated and set in each application, such as an Envoy Sidecar in a cloud-native network architecture.
[0004] However, the above-mentioned method of integrating and setting a related functional module for generating tracking header information in each application consumes a large amount of resources, especially in a high-load scenario, which may cause a large amount of resource consumption and affect the processing of related business requests. SUMMARY
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a data processing method and system based on DPU service mesh, equipment and medium.
[0006] The embodiment of the present disclosure provides a data processing method based on a DPU service grid, the method is applied in a first container group of a host corresponding to the DPU service grid, and the method comprises the following steps: in response to initiating a first service request to a second container group, calling a preset DPU tracking data packet in the host to generate first tracking header information corresponding to the first service request; sending the first service request carrying the first tracking header information to the DPU service grid, wherein the DPU service grid analyzes the first tracking header information to determine a tracking protocol type, determines a target analysis plug-in matched with the tracking protocol type, analyzes the first tracking header information according to the target analysis plug-in, generates second tracking header information of the second container group according to the analyzed first tracking header information, and sends a second service request carrying the second tracking header information to the DPU service grid corresponding to the second container group according to the first service request.
[0007] The embodiment of the present disclosure provides a data processing method based on a DPU service grid, the method is applied in the DPU service grid, and the method comprises the following steps: obtaining a first service request sent by a first container group, obtaining first tracking header information corresponding to the first service request, wherein the first tracking header information is generated by calling a preset DPU tracking data packet in a host; determining a tracking protocol type by analyzing the first tracking header information through a first preset plug-in, and determining a target analysis plug-in matched with the tracking protocol type; analyzing the first tracking header information according to the target analysis plug-in, and generating second tracking header information of a second container group according to the analyzed first tracking header information; and sending a second service request carrying the second tracking header information to the DPU service grid corresponding to the second container group according to the first service request.
[0008] The embodiment of the present disclosure further provides a first container group, which comprises: a calling module, which is used for, in response to initiating a first service request to a second container group, calling a preset DPU tracking data packet in a host to generate first tracking header information corresponding to the first service request; and a first sending module, which is used for sending the first service request carrying the first tracking header information to the DPU service grid, wherein the DPU service grid analyzes the first tracking header information to determine a tracking protocol type, determines a target analysis plug-in matched with the tracking protocol type, analyzes the first tracking header information according to the target analysis plug-in, generates second tracking header information of the second container group according to the analyzed first tracking header information, and sends a second service request carrying the second tracking header information to the DPU service grid corresponding to the second container group according to the first service request.
[0009] The embodiment of the present disclosure further provides a DPU service grid, comprising: an acquisition module, configured to acquire a first service request sent by a first container group, and acquire first tracking header information corresponding to the first service request, wherein the first tracking header information is generated by a preset DPU tracking data packet in a host called by the first container group; a determination module, configured to determine a tracking protocol type by analyzing the first tracking header information through a first preset plug-in, and determine a target analysis plug-in matched with the tracking protocol type; a generation module, configured to analyze the first tracking header information according to the target analysis plug-in, and generate second tracking header information of a second container group according to the analyzed first tracking header information; and a second sending module, configured to send a second service request carrying the second tracking header information to the DPU service grid corresponding to the second container group according to the first service request.
[0010] The embodiment of the present disclosure further provides a DPU service grid-based data processing system, comprising: a DPU service grid and a first container group, wherein the first container group is located in a host corresponding to the DPU service grid, and the first container group is configured to execute the DPU service grid-based data processing method centralized on the first container group side; and the DPU service grid is configured to execute the DPU service grid-based data processing method centralized on the DPU service grid side.
[0011] The embodiment of the present disclosure further provides a computer readable storage medium, which stores a computer program configured to execute the DPU service grid-based data processing method provided by the embodiment of the present disclosure.
[0012] Compared with the prior art, the technical solution provided by the embodiment of the present disclosure has the following advantages:
[0013] The data processing scheme based on the DPU service grid provided by the embodiments of the present disclosure, in response to initiating a first service request to a second container group, calling a preset DPU tracking data packet in the host to generate first tracking header information corresponding to the first service request, sending the first service request carrying the first tracking header information to the DPU service grid, wherein the DPU service grid analyzes the first tracking header information to determine the tracking protocol type, determines the target analysis plug-in matched with the tracking protocol type, analyzes the first tracking header information according to the target analysis plug-in, generates second tracking header information of the second container group according to the analyzed first tracking header information, and sends the second service request carrying the second tracking header information to the DPU service grid corresponding to the second container group according to the first service request. In the technical solution, it is not necessary to set a function module for generating tracking header information for each container group, and the addition of tracking header information is uniformly implemented based on the DPU tracking data packet preset in the specific directory of the host, thereby reducing the occupation of related resources, improving the performance of the service application, and dynamically selecting the tracking protocol to realize flexible tracking management. BRIEF DESCRIPTION OF DRAWINGS
[0014] The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the original and elements are not necessarily drawn according to the scale.
[0015] Figure 1 A structural schematic diagram of a data processing system based on a DPU service grid provided by the embodiments of the present disclosure;
[0016] Figure 2 A flowchart of a data processing method based on a DPU service grid provided by the embodiments of the present disclosure;
[0017] Figure 3 A data processing interaction scene schematic diagram based on a DPU service grid provided by the embodiments of the present disclosure;
[0018] Figure 4 A flowchart of another data processing method based on a DPU service grid provided by the embodiments of the present disclosure;
[0019] Figure 5 A structural schematic diagram of a first container group provided by the embodiments of the present disclosure;
[0020] Figure 6 A structural schematic diagram of a DPU service grid provided by the embodiments of the present disclosure. DETAILED DESCRIPTION
[0021] Embodiments of the present disclosure will be described below in greater detail with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be interpreted as being limited to the embodiments set forth herein; rather, these embodiments are provided so that the present disclosure can be more thoroughly and completely understood. It is understood that the drawings of the present disclosure and the embodiments are for exemplary purposes only and are not intended to limit the scope of the present disclosure.
[0022] It should be understood that each of the steps recited in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the present disclosure is not limited in this respect.
[0023] The term "comprising" and variations thereof as used herein are open-ended, and mean "including but not limited to". The term "based on" means "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Related terms are defined in the description that follows.
[0024] It should be noted that the terms "first", "second", and the like in the present disclosure are used only to distinguish different devices, modules or units, and do not imply the order of execution or the mutual dependency of the functions performed by these devices, modules or units.
[0025] It should be noted that the terms "one", "multiple" in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise explicitly stated in the context, it should be understood as "one or more".
[0026] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0027] The data processing method based on the DPU service mesh provided in the embodiments of the present disclosure is mainly applied in a cloud native architecture. In the cloud native architecture, a data processing unit (DPU) is used as an offload engine of a central processing unit (CPU) to take over the functions related to link tracking. The cloud native architecture can be understood as an IT architecture supported by containers and Kubernetes (k8s). The cloud native architecture includes a plurality of microservices, and each microservice instance includes a container group Pod. The container group is the smallest deployment unit of Kubernetes, which encapsulates containers and provides some shared resources and contexts. In the cloud native architecture, Istio is used to implement network functions. Istio hijacks traffic through Scidar in the data plane, and a proxy Envoy is designed based on the cloud native architecture. All traffic passes through the Envoy proxy. In related technologies, the Envoy can play the role of a Sidecar. In this case, the functions related to services are separated from the application itself and used as a separate process together with the main application on a host. However, the functions are deployed in separate processes or containers, which is called the Sidecar mode.
[0028] The problems in the background technology still exist in the cloud native architecture. For example, in the cloud native architecture based on the DPU service mesh, the data tracking function can be separated from the application itself and implemented through a Sidecar. Therefore, the Envoy Sidecar automatically adds tracking header information to the requests entering and leaving the service. The Envoy generates a Trace Span for each request based on the meta information of the request and response data packets and sends the Trace Span to the backend of the tracking. When a request enters the service, the Envoy Sidecar checks whether the tracking information (for example, x-request-id, x-b3-traceid, x-b3-spanid, etc.) is included in the request header. If the tracking information exists, the Envoy proxy uses the information to continue tracking the link of the request. If the tracking information does not exist, the Envoy proxy generates new tracking information and adds the tracking information to the request header. Therefore, the Envoy proxy can also be called the Envoy Sidecar. Since each request needs to collect and process tracking data, the response time and overall performance of the service may be affected, especially in a high-concurrency scenario. In this case, each microservice instance needs an Envoy Sidecar, that is, an Envoy Sidecar needs to be set in each service node, which means that each instance needs to consume additional computing and memory resources to process tracking data.
[0029] Therefore, in order to solve the technical problem, in the technical scheme of the present disclosure, the Envoy Sidecar is offloaded in the DPU service mesh, without setting a function module for generating tracking header information for each container group, and based on the preset DPU tracking data packet, the addition of tracking header information of the service node in the host is uniformly implemented, and the occupation of resources is reduced.
[0030] The following describes a data processing method based on a DPU service mesh proposed in the present disclosure to solve the above technical problem based on a cloud native architecture.
[0031] In one embodiment of the present disclosure, a data processing system based on a DPU service mesh is proposed, as shown in Figure 1 The system can include a DPU service mesh and a host, wherein the DPU service mesh includes an Envoy proxy, i.e., a DPU Envoy, and the host includes at least one container group, and each container group provides resources for running corresponding applications, etc.
[0032] The following first describes the data processing method based on the DPU service mesh of the present disclosure with respect to the first container group in the group set.
[0033] Figure 2 A flowchart of a data processing method based on a DPU service mesh provided in the present disclosure is shown, which can be executed by the first container group, and the device can be implemented by software and / or hardware. As shown in Figure 2 The method includes:
[0034] Step 201, in response to initiating a first service request to a second container group, calling a preset DPU tracking data packet in the host to generate first tracking header information corresponding to the first service request.
[0035] In one embodiment of the present disclosure, the first container group can initiate a first service request to the second container group, wherein the second container group and the first container group can be located under the same host or under different hosts. For example, referring to the application scenario interaction diagram shown in Figure 3 The first container group can be Pod A, and the second container group can be Pod B or Pod C.
[0036] It should be noted that the DPU tracking data packet is set in the host in advance, and the preset DPU tracking data packet is set in advance by the preset tracking controller in the preset directory, wherein the preset directory can be set according to the scene, and the preset tracking controller can also be set according to the scene.
[0037] For example, a Daemense (DS) of DPU Tracing is deployed in the K8S cluster in advance, a Kubernetes DaemonSet (preset tracking controller) is created to deploy a DPU Tracing Pod on each node, and the DPU Tracing Pod deploys the DPU Tracing SDK to a specific directory (preset directory) of the host. The DPU Tracing SDK is usually installed in the host file system using a HostPath volume, and the DaemonSet ensures that a Pod runs on each node. By mounting the HostPath volume in the Pod, the DPU Tracing SDK can be deployed to a specific directory of the host so that other Pods can access the DPU Tracing SDK. That is, the DPU tracing packet in the embodiment can be Figure 3 The DPU Tracing SDK in the preset directory, and the container group in each host shares the preset DPU tracing packet, which is used to perform related tracking functions. In the embodiment, the preset DPU tracing packet in the host is called to generate first tracking header information corresponding to the first service request, wherein the first tracking header information includes but is not limited to TraceID and the like. Thus, in the embodiment, the container group of the same host can share the DPU tracing packet to generate tracking header information and the like.
[0038] In step 202, a first service request carrying first tracking header information is sent to a DPU service mesh, wherein the DPU service mesh analyzes the first tracking header information to determine a tracking protocol type, determines a target analysis plug-in matching the tracking protocol type, analyzes the first tracking header information according to the target analysis plug-in, generates second tracking header information of a second container group according to the analyzed first tracking header information, and sends a second service request carrying the second tracking header information to the second container group to the DPU service mesh corresponding to the second container group.
[0039] In an embodiment of the present disclosure, the first container group sends a first service request carrying first tracking header information to the DPU service mesh, that is, the DPU Tracing SDK realizes the transparent transmission of the first tracking header information in the request of the next link. By carrying the first tracking header information in the first service request, the tracking context can be passed to the next service, thereby realizing cross-service link tracking.
[0040] That is, in the present embodiment, the problem that the trace function of the Envoy Sidecar in the conventional technical solution causes additional resource overhead and performance overhead, and the application competes for resources such as CPU, network, and memory, causing the response performance of the service request to be affected, and the problem that the service application needs complex logic to implement the binding of the trace information and the internal logic are solved. The trace function is offloaded to the DPU hardware for resource isolation by the DPU Envoy and the like, and a unified DPU Tracing Framework is provided to assist the application to transparently transmit the trace header information, meeting the needs of transparent transmission.
[0041] In the present embodiment, the DPU service mesh parses the first trace header information to determine the trace protocol type, determines the target parsing plug-in matched with the trace protocol type, parses the first trace header information according to the target parsing plug-in, generates the second trace header information of the second container group according to the parsed first trace header information, and sends the second service request carrying the second trace header information to the DPU service mesh corresponding to the second container group according to the first service request. The specific executor in the DPU service mesh here can be an Envoy proxy or the like. The related execution steps of the DPU service mesh are described in the subsequent DPU service mesh-based data processing method on the DPU service mesh side, and will not be repeated here.
[0042] In one embodiment of the present disclosure, when the first container group obtains a third service request of the first container group from other clients, the first container group can also generate a service data packet corresponding to the third service request in response to the third service request. In the present embodiment, the DPU trace data packet is also called to write the trace link identifier of the service response data packet in the log module of the first container group, and the trace link identifier includes TraceID and the like. The log module can be a logger library in the Figure 3
[0043] Further, in response to obtaining the log collection request of the first container group, a log file is generated according to the trace link identifier and the service response data packet, and the log file is stored in a preset log collector in the host. The preset log collector sends the log file to a preset distributed operation and maintenance platform, so that the distributed operation and maintenance platform stores the log file in a preset log search engine. Since the log file contains the service response data and the corresponding trace link identifier, complete logical link tracking is facilitated.
[0044] In an embodiment of the present disclosure, the two volumes of the data table calling volume and the log collection volume can be mounted in advance in the first container group. By mounting the data table calling volume in the first container group in advance, the DPU tracing packet calls the tracking link identifier of the service response data packet written in the log module of the first container group. By mounting the log collection volume in the first container group in advance, the log file is generated according to the tracking link identifier and the service response data packet.
[0045] Continuing with the scenario shown in Figure 3 In an embodiment of the present disclosure, two volumes can be mounted in each container group, one for log collection and one for calling DPU Tracing SDK. The collection directory is configured in the preset log collector Fluent Bit, that is, two volumes are mounted for the business application APP A corresponding to PodA: one for log collection (consistent with the collection address of the preset log collector Fluent Bit, so that logs can be collected from the directory where DPU Tracing SDK writes logs), and one for calling DPU Tracing SDK (consistent with the HostPath address where DPU Tracing SDK is installed, that is, the calling path of DPU Tracing SDK should be consistent with the deployment path). By mounting the volume, the tracking link identifier of the log can be shared with the business PodA and the DPU Tracing SDK, so that the business application can call the DPU Tracing SDK and generate a log file with TraceID, and the log file is collected by Fluent Bit.
[0046] That is, in the present embodiment, the DPU Tracing SDK can be called and the TraceID is recorded, when PodA receives the request and executes the business logic, the business application calls the DPU Tracing SDK library of the corresponding language. The SDK adds the TraceID field in the logger library (log module) according to the TraceID information. When the business application prints the log, the log file with TraceID is written into the volume collected by Fluent Bit. The DPU Tracing SDK provides functions for generating and processing TraceID. By adding TraceID to the log file, the tracking information of the request can be recorded, which is convenient for subsequent analysis and debugging. Among them, Fluent Bit sends the log file to the log search engine Elasticsearch, and Elasticsearch is a log search engine in the preset distributed operation and maintenance platform, which stores log files containing business response data packets and tracking link identifiers, that is, Fluent Bit sends the log file with link tracking information to Elasticsearch. Elasticsearch stores and indexes the log file to facilitate fast query. Among them, Elasticsearch is a powerful search and analysis engine, which can realize fast query and analysis by storing and indexing log files.
[0047] For example, continuing to refer to Figure 3 In the preset distributed operation and maintenance platform, Kibana can be set up, Kibana is an open source data visualization platform commonly used with Elasticsearch to help users explore, analyze and visualize data stored in Elasticsearch, Kibana provides a user-friendly web interface, allowing users to easily create charts, dashboards and reports, as well as perform advanced searches and data analysis, in the present embodiment, Kibana can be connected to Elasticsearch to create index patterns to match log files collected by Fluent Bit. In Kibana, all log files on a link are queried by TraceID to facilitate problem diagnosis. Kibana provides powerful search and visualization functions, allowing easy query and analysis of log data by TraceID to understand the complete path and status of the request.
[0048] That is, in the embodiment, the DPU tracing packet is called every time the first container group responds to a service request, the trace link identifier of the service response packet is generated, and the trace link identifier and the corresponding service response packet are further bound in the log file. The process does not require the participation of the Envoy Sidecar of the DPU service grid, solves the problem that the Envoy Sidecar processes the trace information every time the request enters and leaves the service, increases the request processing delay, reduces the resource consumption of the DPU service grid, and the DPU service grid can provide higher processing capacity and reduce the delay. The hardware acceleration capability of the DPU service grid can further improve the performance.
[0049] In addition, in the embodiment of the present disclosure, the trace link identifier TraceID is injected into the log file, and the log files between different services can be easily queried and associated through the query platform on the preset distributed operation and maintenance platform such as Kibana, and the related response problems can be quickly located. The DPU Tracing SDK can be deeply integrated into the business application to provide more detailed trace information. The business application can inject detailed trace link identifiers and other business logic trace information into the log file through the DPU Tracing SDK to provide more comprehensive monitoring data. In addition, the DPU Tracing SDK can be conveniently deployed and managed in the cluster through the Kubernetes DaemonSet deployment, and seamless integration with existing business applications can be achieved. The DPU Tracing SDK provides a simple interface, and developers can easily integrate the tracing function, reducing the complexity of manually managing the trace header information. Through the declarative configuration management of Kubernetes, the deployment and operation and maintenance of the tracing system are simplified, and the consistency and maintainability of the system are improved.
[0050] In the embodiment, the DPU tracing packet, i.e., the DPU Tracing SDK, solves the problem that the traditional solution Envoy proxy can only automatically process the trace information when the request enters and leaves the service, and the business application needs to manually pass the trace header information. The DPU Tracing SDK automatically processes the transmission of the trace header information, reduces the complexity of the business application, and binds the business response data and the trace link identifier through the log framework, so that the business personnel no longer need to repeatedly implement such complex code logic. In the embodiment of the present disclosure, the DPU service grid and the DPU tracing packet realize comprehensive tracing of the entire request link, and can record the entire process from the request entering to the response completing.
[0051] In summary, the data processing method based on the DPU service grid in the embodiment of the disclosure, in response to initiating a first service request to a second container group, calling a preset DPU tracking data packet in a host to generate first tracking header information corresponding to the first service request, sending the first service request carrying the first tracking header information to the DPU service grid, wherein the DPU service grid analyzes the first tracking header information to determine the tracking protocol type, determines the target analysis plug-in matched with the tracking protocol type, analyzes the first tracking header information according to the target analysis plug-in, generates second tracking header information of the second container group according to the analyzed first tracking header information, and sends the second service request carrying the second tracking header information to the DPU service grid corresponding to the second container group according to the first service request. In the technical solution, it is not necessary to set a functional module for generating tracking header information for each container group, and the addition of tracking header information is uniformly implemented based on the DPU tracking data packet preset in the specific directory of the host, thereby reducing the occupation of related resources, improving the performance of the business application, and dynamically selecting the tracking protocol to achieve flexible tracking management.
[0052] The data processing method based on the DPU service grid in the embodiment of the disclosure is described below on the DPU service grid side, wherein the subject of the data processing method based on the DPU service grid executed on the DPU service grid side can be a DPU Envoy in the DPU service grid.
[0053] Figure 4 For the flowchart of the data processing method based on the DPU service grid according to another embodiment of the disclosure, as shown in Figure 4 The method comprises:
[0054] Step 401, obtaining a first service request sent by a first container group, and obtaining first tracking header information corresponding to the first service request, wherein the first tracking header information is generated by the first container group calling a preset DPU tracking data packet in a host.
[0055] In the embodiment of the disclosure, when the first service request sent by the first container group is obtained, the first tracking header information corresponding to the first service request is obtained, and the first tracking header information is generated by the first container group calling a preset DPU tracking data packet in a host.
[0056] Step 402, determining the tracking protocol type by analyzing the first tracking header information through a first preset plug-in, and determining a target analysis plug-in matched with the tracking protocol type.
[0057] In the embodiment of the present disclosure, the first preset plug-in is used to determine the tracking protocol type by analyzing the first tracking header information, and a target analysis plug-in matching the tracking protocol type is determined. That is, in the embodiment, the tracking protocol type is analyzed by the first preset plug-in, and the appropriate target analysis plug-in is selected based on the tracking protocol type, so as to realize flexible tracking management.
[0058] For example, continuing to refer to Figure 3 The first preset plug-in can be a Trace Extension plug-in. The Trace Extension plug-in of the DPU Envoy determines the Trace protocol type according to the first tracking header information added by the DPU Tracing SDK. According to the Trace protocol type, the actual tracking implementation plug-in, i.e., the target analysis plug-in, is dynamically selected. For example, when the B3 header information is identified in the first service request package with trace header sent by the first container group, the Zipkin plug-in is called to analyze the first tracking header information Trace Header. The Trace Extension plug-in allows the DPU Envoy to select the appropriate tracking protocol and plug-in according to the first tracking header information, so as to realize flexible tracking management.
[0059] In step 403, the first tracking header information is analyzed according to the target analysis plug-in, and the second tracking header information of the second container group is generated according to the analyzed first tracking header information.
[0060] In the embodiment, after the target analysis plug-in is determined, the first tracking header information is analyzed according to the target analysis plug-in, and the second tracking header information of the second container group is generated according to the analyzed first tracking header information. Therefore, in the embodiment, the DPU grid can dynamically select the target analysis plug-in matching the tracking protocol based on the first preset plug-in, and can construct the second tracking header information for the next link request, i.e., the second container group.
[0061] In step 404, a second service request carrying the second tracking header information is sent to the DPU service grid corresponding to the second container group according to the first service request.
[0062] In the embodiment, a second service request carrying the second tracking header information is sent to the DPU service grid corresponding to the second container group according to the first service request.
[0063] In an embodiment of the present disclosure, in order to realize cross-service link tracking and the like, after obtaining the service response data packet sent by the first container group, a second preset plug-in can also be called to generate a tracking unit data packet corresponding to the service response data packet, wherein the second preset plug-in can be any plug-in that can realize the construction of a tracking unit data packet, and the tracking unit data packet can be a Span data packet or the like, wherein Span is used to track the path of a service request in a distributed system, and the tracking data packet can include Span Name, Span ID, Parent ID, tracking context information and the like, wherein the second preset plug-in can construct the tracking unit data packet according to the metadata information of the service response data packet, wherein the metadata information in the service response data packet can include source IP address, target IP address, port number, protocol type and the like, Span Name can be understood as the name of the tracking unit, for example, Span Name can be serviceA or the like, Span ID is a unique ID allocated to a newly created Span, Parent ID is the ID of the corresponding parent Span when the Span is a child Span, and the tracking context information can include tracking link identifier TraceID and the like.
[0064] Further, after constructing the tracking unit data packet, the tracking unit data packet is sent to a preset distributed operation and maintenance platform, wherein the distributed operation and maintenance platform stores the tracking unit data packet in a preset tracking backend database, so that a preset tracking backend database can be constructed in the distributed operation and maintenance platform, and thus the dependency relationship between various tracking unit data packets can be queried based on the preset tracking backend database.
[0065] Wherein, after the inbound direction of the DPU service mesh corresponding to the second container group receives the second service request carrying the second tracking header information, the first preset plug-in is also used to construct the tracking header information, and the second preset plug-in also reports the generated tracking unit data packet to the preset tracking backend database.
[0066] For example, referring to Figure 3, the business response data packet of Pod A arrives at the DPU Envoy, and the app Span constructor (the second preset plug-in) of the DPU Envoy sets Span Name, Span ID, ParentID and the like according to the meta information of the business response data packet, and constructs a Span to report to a preset tracing backend database Tracing Backends. Through a Tracing UI, each Span of the same link and the dependency relationship of the service of the Tracing Backends can be inquired, and when the second container group is Pod C, a second business request carrying second tracing header information can be sent to the DPU Envoy corresponding to Pod C. After the inbound direction of the DPU envoy of the server receives the message with the Trace Header, the TraceExtension is also used to construct the tracing header information, and the app Span constructor can also report the constructed related Span to the Tracing Backends.
[0067] That is, in the present embodiment, the DPU Envoy constructs a Span and reports, when a service response data packet arrives at the DPU Envoy, the app Span constructor of the DPU Envoy sets Span Name, Span ID, Parent ID and other information according to the meta information of the service response data packet. The Span is constructed and reported to the Tracing Backends. Through the Tracing UI, each Span of the same link and the dependency relationship of the service can be queried. Thus, the DPU Envoy can capture and process the requests in and out of the service, and generate a trace Span according to the information of the request and the response. By reporting the Span information to the distributed tracing system, the complete call link can be viewed in the Tracing UI. The DPU Envoy of the server (the second container group in the present embodiment) constructs and reports related trace header information, and the DPU Envoy of the server uses the Trace Extension to construct the trace header information after receiving the packet with the second trace header information. The app Span constructor of the DPU Envoy reports the Span information of the application of the server to the Tracing Backends. By processing the related trace header information in the DPU Envoy of the server, the link of the related request can be further traced, and the related Span is reported to the tracing system, so as to completely record the request path and the dependency relationship. Thus, the app Span constructor can obtain the real business application response information to generate Span identification information (such as Span Name, Span ID, etc.) according to the meta information of the service response data packet, overcoming the one-to-one limitation of the DPU Envoy and the Span identification information in the related art.
[0068] In summary, the data processing method based on the DPU service mesh in the embodiments of the present disclosure obtains a first service request sent by a first container group, obtains first trace header information corresponding to the first service request, wherein the first trace header information is generated by a DPU tracing data packet preset in a host of the first container group, determines a trace protocol type by analyzing the first trace header information through a first preset plug-in, and determines a target analysis plug-in matched with the trace protocol type, and then analyzes the first trace header information according to the target analysis plug-in, generates second trace header information of a second container group according to the analyzed first trace header information, and sends a second service request carrying the second trace header information to a DPU service mesh corresponding to the second container group according to the first service request. In the present technical solution, there is no need to set a functional module for generating trace header information for each container group, and the addition of trace header information is uniformly implemented based on the DPU tracing data packet preset in a specific directory of the host, thereby reducing the occupation of related resources, improving the performance of the business application, and dynamically selecting the trace protocol to achieve flexible trace management.
[0069] To achieve the above-mentioned embodiments, the embodiments of the present disclosure also provide a first container group.
[0070] Figure 5 A structural schematic diagram of a first container group according to an embodiment of the present disclosure is shown in FIG. 5. Figure 5 As shown in the figure, the first container group includes a calling module 510 and a first sending module 520, wherein,
[0071] The calling module 510 is configured to, in response to initiating a first service request for a second container group, call a preset DPU tracking packet in a host to generate first tracking header information corresponding to the first service request.
[0072] The first sending module 520 is configured to send the first service request carrying the first tracking header information to a DPU service grid, wherein the DPU service grid analyzes the first tracking header information to determine a tracking protocol type, determines a target parsing plug-in matching the tracking protocol type, parses the first tracking header information according to the target parsing plug-in, generates second tracking header information of the second container group according to the parsed first tracking header information, and sends a second service request carrying the second tracking header information to a DPU service grid corresponding to the second container group according to the first service request.
[0073] The first container group provided by the embodiments of the present disclosure can execute the DPU service grid-based data processing method provided by any of the embodiments of the present disclosure, which is centralized on the first container group side, and has the corresponding function modules and beneficial effects of the execution method.
[0074] To achieve the above-mentioned embodiments, the embodiments of the present disclosure also provide a DPU service grid.
[0075] Figure 6 A structural schematic diagram of a DPU service grid according to an embodiment of the present disclosure is shown in FIG. 6. Figure 6 As shown in the figure, the DPU service grid includes an acquisition module 610, a determination module 620, a generation module 630, and a second sending module 640, wherein,
[0076] The acquisition module 610 is configured to acquire a first service request sent by a first container group, and acquire first tracking header information corresponding to the first service request, wherein the first tracking header information is generated by calling a preset DPU tracking packet in a host.
[0077] The determination module 620 is configured to determine a tracking protocol type by parsing the first tracking header information through a first preset plug-in, and determine a target parsing plug-in matching the tracking protocol type.
[0078] The generating module 630 is configured to parse the first tracking header information according to the target parsing plug-in, and generate second tracking header information of the second container group according to the parsed first tracking header information.
[0079] The second sending module 640 is configured to send, according to the first service request, a second service request carrying the second tracking header information to a DPU service mesh corresponding to the second container group.
[0080] The DPU service mesh provided in the embodiments of the present disclosure can perform the DPU service mesh-based data processing method provided in any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects.
[0081] In order to implement the above-mentioned embodiments, the present disclosure further proposes a computer program product, comprising computer programs / instructions, which are executed by a processor to implement the DPU service mesh-based data processing method in the above-mentioned embodiments.
[0082] In order to implement the above-mentioned embodiments, the present disclosure further proposes a computer readable storage medium, which stores a computer program, and the computer program is used to execute the above-mentioned DPU service mesh-based data processing method.
[0083] It should be noted that the computer-readable medium described above can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In this disclosure, the computer-readable signal medium can include a computer-readable storage medium in a baseband or propagated as a carrier wave in a propagated signal, where the computer-readable program code is contained in the computer-readable storage medium or propagated as a carrier wave in the propagated signal. Such a propagated signal can take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate or transport program code for use by or in connection with an instruction execution system, apparatus or device. Program code embodied on a computer-readable medium can be transmitted using any suitable medium, including, but not limited to, wire, cable, fiber optic, RF, etc., or any suitable combination of the above.
[0084] The computer-readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and can be accessed via the electronic device.
[0085] The flowcharts and block diagrams in the attached drawings illustrate the possible architectural, functional and operational architectures of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams can represent a module, a segment, or a portion of code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the attached drawings. For example, two blocks noted in succession can in fact be executed substantially concurrently or in the reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware-based systems and computer instructions.
[0086] The units described in the embodiments of the present disclosure can be implemented by software or by hardware. In some cases, the names of the units do not limit the units themselves.
[0087] The functions described above can be performed at least in part by one or more hardware logic components. For example, non-limiting, exemplary types of hardware logic components that can be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chip (SOCs), complex programmable logic devices (CPLDs), etc.
[0088] In the context of the present disclosure, a computer-readable storage medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can be a machine-readable signal medium or a machine-readable storage medium. The computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0089] The above description is merely the preferred embodiments of the present disclosure and the explanation of the principles of the applied technology. It should be understood by those skilled in the art that the disclosed scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or equivalent features without departing from the disclosed concept. For example, the above technical features can be replaced with the technical features disclosed in the present disclosure (but not limited to) having similar functions to form technical solutions.
[0090] Moreover, while operations are depicted in a particular order, this should not be understood as requiring such an order nor infringing on the scope of the disclosure. Certain of the operations described in the discussion are combinable into a single operation, and certain operations can be separated into several operations. In some embodiments, the operations described in the discussion can be performed in an order different than presented in the discussion. In some embodiments, the operations described in the discussion can be performed concurrently. Also, while several specific implementation details are discussed in the discussion, these should not be interpreted as limiting the scope of the disclosure. Rather, certain features described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination.
[0091] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. A data processing method based on a DPU service mesh, characterized in that, The method is applied in a first container group of a host corresponding to the DPU service grid, and the method comprises the following steps: In response to initiating a first service request to a second container group, calling a preset DPU tracking data packet in the host to generate first tracking header information corresponding to the first service request; Send the first service request carrying the first tracking header information to the DPU service grid, wherein the DPU service grid analyzes the first tracking header information to determine the tracking protocol type, determines the target analysis plug-in matched with the tracking protocol type, analyzes the first tracking header information according to the target analysis plug-in, generates second tracking header information of the second container group according to the analyzed first tracking header information, and sends the second service request carrying the second tracking header information to the DPU service grid corresponding to the second container group according to the first service request.
2. The method of claim 1, wherein, Also includes: In response to obtaining a third service request of the first container group from other clients, generating a service response data packet corresponding to the third service request, and calling the DPU tracking data packet to write the tracking link identifier of the service response data packet in the log module of the first container group; In response to obtaining a log collection request of the first container group, generating a log file according to the tracking link identifier and the service response data packet, and storing the log file in a preset log collector in the host, wherein the preset log collector sends the log file to a preset distributed operation and maintenance platform, so that the distributed operation and maintenance platform stores the log file in a preset log search engine.
3. The method of claim 2, wherein, The preset DPU tracking data packet is preset by the host through a preset tracking controller in a preset directory.
4. The method of claim 2, wherein, The calling of the DPU tracking data packet to write the tracking link identifier of the service response data packet in the log module of the first container group comprises: Through the data table calling volume pre-mounted in the first container group, the DPU tracking data packet is called to write the tracking link identifier of the service response data packet in the log module of the first container group.
5. The method of claim 2, wherein, The generation of the log file according to the tracking link identifier and the service response data packet comprises: Through the log collection volume pre-mounted in the first container group, the log file is generated according to the tracking link identifier and the service response data packet.
6. A data processing method based on a DPU service mesh, characterized in that, The method is applied in the DPU service grid, and the method comprises the following steps: Obtain a first service request sent by a first container group, and obtain first tracking header information corresponding to the first service request, wherein the first tracking header information is generated by calling a preset DPU tracking data packet in a host; Determine the tracking protocol type by analyzing the first tracking header information through a first preset plug-in, and determine a target analysis plug-in matched with the tracking protocol type; According to the target analysis plug-in, the first tracking header information is analyzed, and second tracking header information of a second container group is generated according to the analyzed first tracking header information; According to the first service request, a second service request carrying the second tracking header information is sent to a DPU service grid corresponding to the second container group.
7. The method of claim 6, wherein, Further comprising: Obtaining the service response data packet sent by the first container group, calling a second preset plug-in to generate a tracking unit data packet corresponding to the service response data packet; Sending the tracking unit data packet to a preset distributed operation and maintenance platform, wherein the distributed operation and maintenance platform stores the tracking unit data packet in a preset tracking backend database.
8. A first container group, characterized by The first container group is located in a host corresponding to a DPU service grid, and comprises: A calling module, configured to, in response to initiating a first service request to a second container group, call a preset DPU tracking data packet in the host to generate first tracking header information corresponding to the first service request; A first sending module, configured to send a first service request carrying the first tracking header information to the DPU service grid, wherein the DPU service grid analyzes the first tracking header information to determine a tracking protocol type, determines a target analysis plug-in matching the tracking protocol type, analyzes the first tracking header information according to the target analysis plug-in, generates second tracking header information of the second container group according to the analyzed first tracking header information, and sends a second service request carrying the second tracking header information to a DPU service grid corresponding to the second container group according to the first service request.
9. A DPU service mesh, characterized in that, Comprising: An obtaining module, configured to obtain a first service request sent by a first container group, and obtain first tracking header information corresponding to the first service request, wherein the first tracking header information is generated by the first container group calling a preset DPU tracking data packet in a host; A determining module, configured to determine a tracking protocol type by analyzing the first tracking header information through a first preset plug-in, and determine a target analysis plug-in matching the tracking protocol type; A generating module, configured to analyze the first tracking header information according to the target analysis plug-in, and generate second tracking header information of a second container group according to the analyzed first tracking header information; A second sending module, configured to send a second service request carrying the second tracking header information to a DPU service grid corresponding to the second container group according to the first service request.
10. A data processing system based on a DPU service mesh, characterized in that, Comprising: A DPU service grid and a first container group, wherein the first container group is located in a host corresponding to the DPU service grid, and wherein The first container group is configured to execute the DPU service grid-based data processing method according to any one of claims 1-5; The DPU service grid is configured to execute the DPU service grid-based data processing method according to claim 6 or 7.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is configured to execute the DPU service grid-based data processing method according to any one of claims 1-7.
Citation Information
Patent Citations
Microservice scene optimization method, system and equipment based on cloud native, and medium
CN112866333A
Service mesh management
US11457080B1