Data processing method and device for DPU service grid, and medium
By applying socket mapping technology in the DPU service mesh, the problem of network traffic management delay in the service mesh environment is solved, and packet processing is accelerated and system performance is improved.
Patent Information
- Application Number
- CN202411583691.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-11-07
AI Technical Summary
In a complex service mesh environment, due to the increase in microservice applications, network traffic needs to be refinedly managed and optimized to ensure the efficient communication. However, the processing delay of data packets will be increased during operations such as decoding and encoding, resulting in a lower throughput and slower response speed of the system.
Through socket mapping technology, packet processing of DPU service mesh is accelerated, and the system's throughput and response speed is improved. The specific method includes listening to the socket mapping opening information, obtaining candidate resource configuration information, matching the DPU service grid, and adding socket mapping configuration information when matching to generate target resource configuration information, and sending target resource configuration information to the corresponding DPU service grid, so as to perform socket mapping processing when data requests.
Socket mapping technology significantly reduces the latency of packet processing, improves the system's throughput and response speed, and flexibly configures socket mapping according to workload, improving the degree of refinement of packet processing.
Smart Images

Figure CN119814855A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a data processing method, device and medium for a DPU service grid. Background Art
[0002] At present, in a complex service mesh environment, due to the increase in microservice applications, network traffic needs to be finely managed and optimized to ensure efficient communication.
[0003] In the related technology, when the data plane of the service grid manages network traffic, it is necessary to decode, encode and other operations on the data packets. Among them, additional processing is required during the decoding and encoding operations, such as deserialization and serialization of the data packets, and the decoding process requires converting the data packets from the original network format to the internal data structure.
[0004] However, when managing network traffic as described above, whether it is additional processing or decoding process, the processing delay of the data packet will be increased. When there are many data packets to be processed, especially in high concurrency scenarios, the above processing delay may cause the system to have low throughput and slow response speed. Summary of the invention
[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, device and medium for a DPU service grid, so as to accelerate the processing of data packets of the DPU service grid based on socket mapping, thereby improving the throughput and response speed of the system, and can flexibly configure socket mapping according to workloads as needed, thereby improving the degree of refinement of data packet processing.
[0006] The disclosed embodiment provides a data processing method for a DPU service grid, which is applied to a socket mapping controller and includes the following steps: monitoring the socket mapping enable information set in a preset socket mapping setting component through a preset socket control component; acquiring candidate resource configuration information issued by a data control plane in response to monitoring the socket mapping enable information; determining whether a DPU service grid corresponding to the candidate resource configuration information matches a DPU service grid corresponding to the socket mapping enable information; when matching the DPU service grid corresponding to the socket mapping enable information, adding the socket mapping configuration information to the candidate resource configuration information to generate target resource configuration information; and sending the target resource configuration information to the corresponding DPU service grid so that when the corresponding DPU service grid acquires a data request, it performs socket mapping processing on the data request according to the target resource configuration information.
[0007] The disclosed embodiment provides a data processing method for a DPU service grid. The method is applied in the DPU service grid and includes the following steps: obtaining target resource configuration information sent by a socket mapping controller, wherein the target resource configuration information is generated by the socket mapping controller after monitoring the socket mapping enable information set in a preset socket mapping setting component through a preset socket control component, determining the DPU service grid corresponding to the candidate resource configuration information sent by the data control plane, and adding the socket mapping configuration information to the candidate resource configuration information when it matches the DPU service grid corresponding to the socket mapping enable information; creating a socket mapping option according to the target resource configuration information; and in response to obtaining a request data packet, performing socket mapping processing on the request data packet through the socket mapping option.
[0008] An embodiment of the present disclosure also provides a data processing system of a DPU service grid, comprising a socket mapping controller and a DPU service grid, wherein the socket mapping controller is used to execute the above-mentioned data processing method of the DPU service grid concentrated on the socket mapping controller side; and the DPU service grid is used to execute the above-mentioned data processing method concentrated on the DPU service grid.
[0009] The disclosed embodiment also provides a socket mapping controller, including: a monitoring module, used to monitor the socket mapping enable information set in the preset socket mapping setting component through the preset socket control component; a first acquisition module, used to obtain the candidate resource configuration information issued by the data control plane in response to the monitored socket mapping enable information; a determination module, used to determine whether the DPU service grid corresponding to the candidate resource configuration information matches the DPU service grid corresponding to the socket mapping enable information; a first socket mapping configuration module, used to add the socket mapping configuration information to the candidate resource configuration information to generate target resource configuration information when matching the DPU service grid corresponding to the socket mapping enable information; a sending module, used to send the target resource configuration information to the corresponding DPU service grid, so that the corresponding DPU service grid performs socket mapping processing on the data request according to the target resource configuration information when obtaining the data request.
[0010] The disclosed embodiment also provides a DPU service grid, comprising: a second acquisition module, used to acquire target resource configuration information sent by a socket mapping controller, wherein the target resource configuration information is generated by adding the socket mapping configuration information to the candidate resource configuration information when the socket mapping controller determines the DPU service grid corresponding to the candidate resource configuration information sent by the data control plane after listening to the socket mapping enable information set in the preset socket mapping setting component through the preset socket control component; a second socket mapping configuration module, used to create a socket mapping option according to the target resource configuration information; and a data processing module, used to perform socket mapping processing on the request data packet through the socket mapping option in response to obtaining the request data packet.
[0011] An embodiment of the present disclosure also provides a computer-readable storage medium, which stores a computer program, and the computer program is used to execute the data processing method of the DPU service grid provided by the embodiment of the present disclosure.
[0012] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0013] Through the preset socket control component, the socket mapping start information set in the preset socket mapping setting component is monitored, and in response to the socket mapping start information being monitored, the candidate resource configuration information issued by the data control plane is obtained, and then, it is determined whether the DPU service grid corresponding to the candidate resource configuration information matches the DPU service grid corresponding to the socket mapping start information. When it matches the DPU service grid corresponding to the socket mapping start information, the socket mapping configuration information is added to the candidate resource configuration information to generate the target resource configuration information, and the target resource configuration information is sent to the corresponding DPU service grid, so that the corresponding DPU service grid performs socket mapping processing on the data request according to the target resource configuration information when the data request is obtained. In this technical solution, the processing acceleration of the data packet of the DPU service grid is realized based on the socket mapping, which improves the throughput and response speed of the system, and the socket mapping can be flexibly configured for the workload according to the needs, which improves the degree of refinement of the processing of the data packet. BRIEF DESCRIPTION OF THE 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 accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0015] Figure 1A structural diagram of a data processing system of a DPU service grid provided in an embodiment of the present disclosure;
[0016] Figure 2 A flow chart of a data processing method of a DPU service grid provided in an embodiment of the present disclosure;
[0017] Figure 3 A flowchart of a data processing method for a DPU service grid according to another embodiment of the present disclosure;
[0018] Figure 4 An interactive diagram of a data processing method of a DPU service grid provided in an embodiment of the present disclosure;
[0019] Figure 5 A schematic diagram of the structure of a socket mapping controller provided in an embodiment of the present disclosure;
[0020] Figure 6 It is a structural diagram of a DPU service grid according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0021] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0022] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0023] The term "including" and its variations used herein are open inclusions, i.e., "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". The relevant definitions of other terms will be given in the following description.
[0024] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0025] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0026] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0027] In order to solve the above problems, the embodiments of the present disclosure provide a data processing system of a DPU service grid, wherein a data processing unit (DPU) is a processor dedicated to network and storage acceleration, which is usually used in high-performance computing and data centers. It can reduce the burden of the CPU and provide higher network throughput and lower latency.
[0028] Among them, the data processing system of the DPU service grid in this embodiment can be applied to the cloud native architecture, wherein the cloud native architecture can be understood as a new IT architecture supported by docker containers and Kubernetes (K8S). Compared with virtual machines, container applications occupy less disk space, start faster, run directly on the host kernel, and therefore have no Hypervisor overhead, and support hundreds of containers online at the same time, which is close to the performance of local processes on the host. The cloud native container orchestration system represented by K8S provides unified scheduling and elastic expansion capabilities, as well as standardized components and services, and supports rapid development and deployment. In the cloud native architecture, Pod is used as a microservice. Pod is the smallest deployment unit of Kubernetes. It is an encapsulation of a container and provides some shared resources and contexts. Among them, in the cloud native service architecture, Istio is used to serve the grid. Istio hijacks traffic through Sidecar on the data plane to achieve a service grid without code intrusion. In the control plane component, pilot is responsible for issuing control. In this embodiment, Istio pilot issues relevant configuration information.
[0029] like Figure 1 As shown, the data processing system of the DPU service grid includes a socket mapping controller and a DPU service grid, wherein the socket mapping controller is used to adjust the DPU service grid routing and / or listener according to the relevant configuration information issued, so that the routing and / or listener in the DPU service grid can use socket mapping to optimize the processing efficiency and performance of data packets, especially in high-load and large-scale data processing scenarios, which can significantly reduce latency and improve throughput. The DPU service grid may include an Envoy proxy server in the service architecture, etc.
[0030] The method is introduced below in conjunction with specific embodiments.
[0031] For the purpose of illustration, the following first focuses on the socket mapping controller to describe the data processing method of the DPU service grid of an embodiment of the present disclosure.
[0032] Figure 2 The present invention provides a flow chart of a method for processing data of a DPU service grid, which can be executed by a socket mapping controller. Figure 2 As shown, the method includes:
[0033] Step 201: monitor the socket mapping start information set in the preset socket mapping setting component through the preset socket control component.
[0034] Among them, the preset socket control component may include a Reconciler control component, etc., and the preset socket mapping setting component may be a custom resource definition (Custom Resource Definition, CRD), etc., wherein the Reconciler may monitor the CRD in a periodic manner to facilitate the discovery of the socket mapping enable information set in the CRD. During the actual execution process, the administrator may set the socket mapping enable information through the workload option in the CRD, etc.
[0035] Step 202: in response to monitoring the socket mapping start information, obtain the candidate resource configuration information sent by the data control plane.
[0036] In one implementation of the present disclosure, in response to monitoring the socket mapping start information, the candidate resource configuration information issued by the data control plane is obtained, wherein the data control plane may be an Istio control plane, etc., and the candidate resource configuration information is the configuration information issued by the data control plane for controlling routing and / or listeners in the DPU service grid. In some possible embodiments, the candidate resource configuration information may be an extended service discovery (EXtensible Discovery Service, xDS) issued by the Istio control plane, wherein xDS may include multiple discovery services, each type of discovery service is responsible for different types of resource configurations, and the discovery services include: LDS, RDS, etc., wherein LDS is used to configure the listener of the DPU service grid. The listener defines how to receive and process incoming connections, and RDS is used to configure Envoy's routing rules, and the routing rules define how Envoy routes requests to specific service instances.
[0037] Step 203, determining whether the DPU service grid corresponding to the candidate resource configuration information matches the DPU service grid corresponding to the socket mapping enable information.
[0038] When the candidate resource configuration information is obtained, it is determined whether the DPU service grid corresponding to the candidate resource configuration information matches the DPU service grid corresponding to the socket mapping enable information. That is, in this embodiment, the workload that requires socket mapping (which may include the DPU service grid) can be flexibly configured in the socket mapping setting component to determine whether the DPU service grid corresponding to the candidate resource configuration information matches the workload.
[0039] In some possible embodiments, the first DPU service grid label corresponding to the socket mapping enable information can be determined, that is, the first DPU service grid label set by the user in the CRD can be determined, and the second DPU service grid label corresponding to the candidate resource configuration information can be determined. For example, the second DPU service grid label corresponding to the xDS is identified, and it is determined whether the second DPU service grid label is consistent with the first DPU service grid label. If they are consistent, it is considered that the DPU service grid corresponding to the candidate resource configuration information matches the DPU service grid corresponding to the socket mapping enable information.
[0040] Step 204: when the DPU service grid corresponding to the socket mapping opening information is matched, the socket mapping configuration information is added to the candidate resource configuration information to generate the target resource configuration information.
[0041] In one embodiment of the present disclosure, when the DPU service grid corresponding to the socket mapping enable information is matched, the socket mapping configuration information is added to the candidate resource configuration information to generate the target resource configuration information, that is, in this embodiment, the corresponding socket mapping configuration information is added to the candidate resource configuration information, such as adding a routing processing function, such as adding a listener processing function, etc., to generate the target resource configuration information to add the corresponding processing function.
[0042] In some possible embodiments, the configuration resource type corresponding to the candidate resource configuration information can be identified. When the configuration resource type is a routing configuration type, the socket mapping configuration information is added to the candidate resource configuration information through a preset first configuration component to generate the target resource configuration information, wherein the first configuration component can be a pre-set outboundhandler component, etc. The method of adding the socket mapping configuration information to the candidate resource configuration information to generate the target resource configuration information through the preset first configuration component can be any method that can add socket mapping control options in the candidate resource configuration information, and is not limited here.
[0043] For example, the candidate resource configuration information is deserialized into routing configuration information by the first configuration component, and the socket mapping field corresponding to the routing is set to a preset activation value to generate the target resource configuration information, that is, the socket mapping option is configured in the candidate resource configuration information.
[0044] As a possible implementation method, the candidate resource configuration information can be deserialized into routing configuration information through the first configuration component, that is, the candidate resource configuration information issued by xDS is deserialized from the bytecode into a routing configuration object, and the TypeUrl of the route is checked to see whether it is a universal protocol routing configuration, that is, whether the type of the routing configuration is the expected universal protocol routing configuration type. If it is a universal protocol routing configuration, it is deserialized into a routing configuration object, and the virtual host and routing matching options are obtained from the universal protocol routing configuration. The virtual host refers to a logical entity in the DPU service grid (such as Envoy), which is used to process requests for a specific domain name. A virtual host can be configured with one or more domain names and define routing rules under the domain name. In Envoy, each listener can be configured with one or more virtual hosts to distinguish requests from different domain names. The route matching options define how Envoy routes requests to specific service instances. These options can include path matching, method matching, header matching and other conditions. Then, the socket mapping field of the routing behavior is set to True (preset activation value) and serialized, that is, the socket mapping field of the corresponding resource configuration information routing behavior is set to True, and it is serialized into bytecode, and the serialized bytecode is set to the value of the original candidate resource configuration information to obtain the target configuration information, so that subsequent data packet processing in the DPU service grid can be based on the new resource configuration information, that is, the target configuration information.
[0045] In some possible embodiments, when the configuration resource type is a listener configuration type, the socket mapping configuration information is added to the candidate resource configuration information by a preset second configuration component to generate the target resource configuration information. The second configuration component may be a preset inbound handler component, etc. The method of adding the socket mapping configuration information to the candidate resource configuration information by the preset second configuration component to generate the target resource configuration information may be any method that can add a socket mapping control option to the candidate resource configuration information, and is not limited here.
[0046] For example, the candidate resource configuration information can be deserialized into the listener configuration information through the second configuration component, and the socket mapping field corresponding to the listener configuration information is set to the preset activation value to generate the target resource configuration information. The second configuration component can be an inbound handler component, etc. In this embodiment, any means of adding corresponding socket mapping options to the candidate resource configuration information based on the second configuration component should belong to the method in this embodiment and is not limited here.
[0047] In some possible embodiments, the candidate resource configuration information can be deserialized from the bytecode into a listener object, that is, the filter chain information in the listener configuration is obtained, and it is determined whether the type of the filter chain is the expected general proxy type. If the filter chain is of the general proxy type, it is deserialized into an object for subsequent processing. In this embodiment, the virtual host and route matching options are obtained from the general proxy type filter chain. If the configuration requires socket mapping to be enabled, the socket mapping field of the routing behavior is set to True (preset activation value) and serialized into bytecode. The serialized bytecode is set to the value of the original candidate resource configuration information to obtain the target configuration information, so that subsequent data packet processing in the DPU service grid can be based on the new resource configuration information, that is, the target configuration information.
[0048] Step 205: Send the target resource configuration information to the corresponding DPU service grid, so that the corresponding DPU service grid performs socket mapping processing on the data request according to the target resource configuration information when obtaining the data request.
[0049] In one embodiment of the present disclosure, after the target resource configuration information is obtained, the target resource configuration information is sent to the corresponding DPU service grid, so that when the corresponding DPU service grid obtains the data request, it performs socket mapping processing on the data request according to the target resource configuration information.
[0050] When the resource type is configured as a routing configuration type, the target resource configuration information is sent to the routing processing component in the corresponding DPU service grid, where the routing processing component can be a Routing Rules component, etc. Routing Rules is used to define a set of configurations for how to route incoming data packets to backend services, which may include virtual host configuration, routing configuration, and cluster configuration, etc.
[0051] When the resource type is configured as a listener configuration type, the target resource configuration information is sent to the listener processing component in the corresponding DPU service grid. The listener processing component is used to define how to receive and process incoming data packets, etc. The listener processing component can be Listener, etc. Listener listens to the specified port or address, waiting for the data packet to receive the relevant data request, and after receiving the data packet, it processes the traffic of the data packet and routes the processed data to the backend service.
[0052] Therefore, in the embodiments of the present disclosure, a socket mapping setting component (such as CRD) and a socket control component (reconciler) can be set, and the socket control component can monitor the changes of the socket mapping setting component, and configure the socket mapping for the corresponding routing and / or listener according to the monitored socket mapping opening information, without manual setting, etc. The use of socket mapping can optimize the processing efficiency and performance of data packets, especially in high-load and large-scale data processing scenarios, which can significantly reduce latency and improve throughput. In addition, the socket mapping can be enabled for any workload in the socket mapping setting component as needed, which improves the refinement and flexibility of the socket mapping control.
[0053] In summary, the data processing method of the DPU service grid of the embodiment of the present disclosure, through a preset socket control component, monitors the socket mapping start information set in the preset socket mapping setting component, and in response to monitoring the socket mapping start information, obtains the candidate resource configuration information issued by the data control plane, and then determines whether the DPU service grid corresponding to the candidate resource configuration information matches the DPU service grid corresponding to the socket mapping start information. When it matches the DPU service grid corresponding to the socket mapping start information, the socket mapping configuration information is added to the candidate resource configuration information to generate the target resource configuration information, and the target resource configuration information is sent to the corresponding DPU service grid, so that the corresponding DPU service grid performs socket mapping processing on the data request according to the target resource configuration information when the data request is obtained. In this technical solution, the processing acceleration of the data packet of the DPU service grid is realized based on the socket mapping, which improves the throughput and response speed of the system, and the socket mapping can be flexibly configured for the workload as needed, which improves the degree of refinement of the processing of the data packet.
[0054] The following describes the data processing method of the DPU service grid of the embodiment of the present disclosure, focusing on the DPU service grid side.
[0055] Figure 3 is a flow chart of a data processing method of a DPU service grid according to another embodiment of the present disclosure, as shown in Figure 3 As shown, the data processing method of the DPU service grid includes:
[0056] Step 301, obtain the target resource configuration information sent by the socket mapping controller, wherein the target resource configuration information is generated by adding the socket mapping configuration information to the candidate resource configuration information after the socket mapping controller monitors the socket mapping enable information set in the preset socket mapping setting component through the preset socket control component, determines the DPU service grid corresponding to the candidate resource configuration information sent by the data control plane, and when it matches the DPU service grid corresponding to the socket mapping enable information.
[0057] In one embodiment of the present disclosure, when the configuration resource type is a routing configuration type, the routing processing component in the DPU service grid obtains the target resource configuration information; when the configuration resource type is a listener configuration type, the listening processing component in the DPU service grid obtains the target resource configuration information.
[0058] Step 302: Create a socket mapping option according to the target resource configuration information.
[0059] In one embodiment of the present disclosure, the DPU service grid creates a socket mapping option based on the target resource configuration information so as to directly map the corresponding data packet to the backend based on the socket mapping without performing operations such as encoding and decoding.
[0060] In some possible embodiments, in response to the routing processing component in the DPU service grid acquiring the target resource configuration information, the socket mapping option is configured in the routing processing component according to the target resource configuration information.
[0061] In this embodiment, any technical means for configuring the socket mapping option in the routing processing component according to the target resource configuration information belongs to the implementation method of this embodiment. For example, the DPU service grid determines whether the socket mapping is required from the routing entry in the target configuration information, and checks whether the current IP family supports SO SESSION PAIR (VCL interface), wherein SO_SESSION_PAIR is a socket option provided by the Linux kernel, which allows the creation of a pair of sockets, and a two-way communication channel is formed between the two sockets. One socket is used to send data, and the other socket is used to receive data. This mechanism is of great significance in a network proxy or a load balancer. If it is determined that the VCL interface is supported, it is further determined whether the socket mapping field is a preset activation value (such as whether it is True). If it is a preset activation value, a socket mapping option is created according to the target resource configuration information, and the configured socket mapping option is returned to the DPU service grid so that these configurations can be applied in data packet processing.
[0062] In an embodiment of the present disclosure, if it is determined based on the routing entry that socket mapping is not required, a null pointer is returned.
[0063] Step 303: In response to obtaining the request data packet, a socket mapping process is performed on the request data packet through a socket mapping option.
[0064] In one embodiment of the present disclosure, in response to obtaining a request data packet, the request data packet is socket mapped through a socket mapping option, thereby directly mapping the request data packet to a corresponding socket without performing operations such as decoding and encoding.
[0065] In some possible embodiments, the target request end corresponding to the request data packet may be determined, and then the request data packet may be sent to the target request end through a socket mapping option.
[0066] Among them, the DPU service grid can create a new shared pointer upstream_options to store the socket mapping options, and define a socket option name optname, store the corresponding socket mapping options based on optname, obtain the upstream IO handle, and convert it into a modifiable pointer, that is, in the DPU service grid, there is usually an IO handle representing the upstream connection. The upstream IO handle refers to the socket that communicates with the client or upstream service. The upstream IO handle is converted into a modifiable pointer in order to be able to modify the properties of this IO handle or call its method in subsequent code. When the DPU service grid performs data processing, the original handle of some connections may be an internal peer type, that is, one end of the connection is the DPU service grid itself. This type of connection may use a special handle instead of a standard socket handle. Therefore, the corresponding real original handle is obtained. This real original handle is usually a standard socket handle that can be directly used for network communication. In this embodiment, after creating the socket mapping option, the upstream option containing the configuration is returned, and then the request is asynchronously parsed with the general protocol, which may refer to any protocol supported by Envoy, etc. Further, the parsed request data packet is sent to the real socket of the upstream service without going through an additional intermediate layer or proxy. Since the request data packet is directly sent to the real socket of the upstream, the intermediate decoding, encoding and other links are reduced, so the overall delay can be reduced. That is, based on the creation of the socket mapping option, the network traffic can be directly sent to the real socket, thereby improving the efficiency and throughput of data packet processing and reducing processing delays.
[0067] In order to enable those skilled in the art to have a more comprehensive understanding of the data processing method of the DPU service grid in the embodiment of the present disclosure, the following is an example in combination with a specific application scenario, wherein in the application scenario, the DPU service grid is Envoy, the socket mapping setting component is CRD, the socket control component is recocciler, the preset activation value is True, the routing processing component is Routing Rules, the listening processing component is Listener, the first configuration component is outboundhandler, the second configuration component is inbound handler, the candidate resource configuration information is the original xDS, and the data control plane is istio pilot. The example is described as follows:
[0068] like Figure 4 As shown, CRD and recocier are added. The administrator enables socket mapping for the workload that needs to enable socket mapping through the workload option of CRD, that is, configures the corresponding socket enabling information. The recocier receives the changes of the above CRD and listens to the socket mapping enabling information set in the preset socket mapping setting component. Then, when istiopilot sends the original xDS, it identifies whether the second DPU service grid label of the original xDS matches the first DPU service grid label corresponding to the workload. If it matches, the socket mapping configuration information is added to the candidate resource configuration information to generate the target resource configuration information.
[0069] Identify the configuration resource type corresponding to the candidate resource configuration information. When the configuration resource type is a routing configuration type, the original xDS can be deserialized into routing configuration information through the outbound handler, that is, the issued original xDS is deserialized from the bytecode into a routing configuration object, and check whether the TypeUrl of the route is a general protocol routing configuration, that is, determine whether the type of the routing configuration is the expected general protocol routing configuration type. If it is a general protocol routing configuration, deserialize it into a routing configuration object, obtain the virtual host and routing matching options from the general protocol routing configuration, and then set the socket mapping field of the routing behavior to True and serialize it, that is, set the socket mapping field of the corresponding resource configuration information routing behavior to True, and serialize it into bytecode, and set the serialized bytecode to the value of the original candidate resource configuration information to obtain the target configuration information, so that subsequent data packet processing in the DPU service grid can be based on the new resource configuration information, that is, the target configuration information.
[0070] In some possible embodiments, when the configuration resource type is a listener configuration type, the socket mapping configuration information is added to the candidate resource configuration information through the inbound handler to generate the target resource configuration information. The candidate resource configuration information can be deserialized into the listener configuration information through the inbound handler, and the original xDS can be deserialized from the bytecode into a listener object, that is, the filter chain information in the listener configuration is obtained, and it is determined whether the type of the filter chain is the expected general proxy type. If the filter chain is a general proxy type, it is deserialized into an object for subsequent processing. In this embodiment, the virtual host and route matching options are obtained from the general proxy type filter chain. If the configuration requires the socket mapping to be enabled, the socket mapping field of the routing behavior is set to True, and it is serialized into bytecode, and the serialized bytecode is set to the value of the original candidate resource configuration information to obtain the target configuration information, so that the subsequent packet processing of Envoy can be based on the new resource configuration information, that is, the target configuration information.
[0071] Among them, Envoy determines whether socket mapping is required from the routing entry in the target configuration information, checks whether the current IP family supports SO_SESSION_PAIR (VCL interface), and if it supports the VCL interface, further determines whether the socket mapping field is True. If it is True, it creates a socket mapping option according to the target resource configuration information, and returns the configured socket mapping option to True so that these configurations can be applied in packet processing.
[0072] Envoy can create a new shared pointer upstream_options to store socket mapping options, and define a socket option name optname, store the corresponding socket mapping options based on optname, obtain the upstream IO handle, and convert it into a modifiable pointer, that is, in Envoy, there is usually an IO handle representing the upstream connection. The upstream IO handle refers to the socket that communicates with the client or upstream service (Upstream Server in the figure). The upstream IO handle is converted into a modifiable pointer in order to be able to modify the properties of this IO handle or call its method in subsequent code. When Envoy processes data, some connections may be original handles of internal peer types. Therefore, the corresponding real original handle is obtained. This real original handle is usually a standard socket handle that can be used directly for network communication.
[0073] In this embodiment, after creating the socket option, the upstream option containing the configuration is returned, and then the data plane asynchronously parses the general protocol for this request. The general protocol may refer to any protocol supported by Envoy, etc., and sends the request data packet to the real socket of the upstream service without going through an additional intermediate layer or proxy. Since the request data packet is directly sent to the real socket of the upstream, the intermediate decoding, encoding and other links are reduced, so the overall delay can be reduced. That is, based on the creation of the socket mapping option, the network traffic can be directly sent to the real socket, thereby improving the efficiency and throughput of data packet processing and reducing processing delays.
[0074] in, Figure 4 In the Envoy, the corresponding worker thread includes Routing Rules, Listener and Cluster. Among them, Listener includes the router filter (filter chain), which is mainly responsible for deciding how to route requests according to predefined rules and performing related operations, such as load balancing, retry, timeout processing, etc. Routing Rules include clusters. In Envoy's Routing Rules, clusters are used to define a set of backend service instances. When Envoy receives a request, it will decide how to route the request to one or more service instances in a specific Cluster according to the rules defined in Routing Rules. Cluster plays the following roles in Envoy: 1. Load balancing: Envoy can distribute requests between service instances in the Cluster according to different load balancing strategies. 2. Connection management: Envoy maintains a connection pool for each Cluster and manages connections with service instances in the Cluster. 3. Health check: Envoy can configure health check policies for service instances in the Cluster to ensure that only healthy service instances are sent requests. The cluster in Routing Rules is used to specify how to route requests to backend service instances. When Envoy determines that a request packet should be routed to a specific Cluster, it uses the configuration of the Cluster to process the request packet, including selecting the appropriate backend service instance, executing load balancing policies, applying timeout and retry policies, etc.
[0075] In summary, the data processing method of the DPU service grid of the embodiment of the present disclosure obtains the target resource configuration information sent by the socket mapping controller, wherein the target resource configuration information is determined by the socket mapping controller through the preset socket control component, after the socket mapping start information set in the preset socket mapping setting component is monitored, and the DPU service grid corresponding to the candidate resource configuration information issued by the data control plane is determined. When it matches the DPU service grid corresponding to the socket mapping start information, the socket mapping configuration information is added to the candidate resource configuration information, and a socket mapping option is created according to the target resource configuration information. In response to obtaining a request data packet, the request data packet is socket mapped through the socket mapping option. In this technical solution, the relevant request data packet is directly sent to the real socket, which improves the efficiency of data packet transmission and improves the throughput and response speed of the system.
[0076] In order to implement the above embodiment, the present disclosure also proposes a socket mapping controller.
[0077] Figure 5 A schematic diagram of the structure of a socket mapping controller provided by an embodiment of the present disclosure. Figure 5 As shown, the socket mapping controller includes: a monitoring module 510, a first acquisition module 520, a determination module 530, a first socket mapping configuration module 540 and a sending module 550, wherein:
[0078] The monitoring module 510 is used to monitor the socket mapping start information set in the preset socket mapping setting component through the preset socket control component;
[0079] A first acquisition module 520 is used to acquire candidate resource configuration information sent by the data control plane in response to monitoring the socket mapping start information;
[0080] A determination module 530, configured to determine whether the DPU service grid corresponding to the candidate resource configuration information matches the DPU service grid corresponding to the socket mapping enable information;
[0081] A first socket mapping configuration module 540, configured to add the socket mapping configuration information to the candidate resource configuration information to generate the target resource configuration information when the DPU service grid corresponding to the socket mapping opening information is matched;
[0082] The sending module 550 is used to send the target resource configuration information to the corresponding DPU service grid, so that the corresponding DPU service grid performs socket mapping processing on the data request according to the target resource configuration information when obtaining the data request.
[0083] The socket mapping controller provided in the embodiments of the present disclosure can execute the data processing method of the DPU service grid concentrated on the socket mapping controller side provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0084] In order to implement the above embodiments, the present disclosure also proposes a DPU service grid.
[0085] Figure 6 is a schematic diagram of the structure of a DPU service grid according to an embodiment of the present disclosure, such as Figure 6 As shown, the DPU service grid includes: a second acquisition module 610, a second socket mapping configuration module 620 and a data processing module 630, wherein:
[0086] The second acquisition module 610 is used to acquire the target resource configuration information sent by the socket mapping controller, wherein the target resource configuration information is generated by adding the socket mapping configuration information to the candidate resource configuration information after the socket mapping controller monitors the socket mapping start information set in the preset socket mapping setting component through the preset socket control component, determines the DPU service grid corresponding to the candidate resource configuration information sent by the data control plane, and when the DPU service grid corresponding to the socket mapping start information matches, the socket mapping configuration information is added to the candidate resource configuration information;
[0087] A second socket mapping configuration module 620, configured to create a socket mapping option according to the target resource configuration information;
[0088] The data processing module 630 is used to perform socket mapping processing on the request data packet through a socket mapping option in response to obtaining the request data packet.
[0089] The DPU service grid provided by the embodiments of the present disclosure can execute the data processing method of the DPU service grid concentrated on the DPU service grid side provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0090] In order to implement the above embodiments, the present disclosure also proposes a computer program product, including a computer program / instruction, which implements the data processing method of the DPU service grid in the above embodiments when executed by a processor.
[0091] In order to implement the above embodiments, the present disclosure also proposes a computer-readable storage medium, which stores a computer program, and the computer program is used to execute the data processing method of the above DPU service grid.
[0092] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0093] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0094] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0095] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0096] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0097] In the context of the present disclosure, a computer-readable storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may be a machine-readable signal medium or a machine-readable storage medium. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a computer-readable storage medium may include an electrical connection based on one or more lines, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0098] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0099] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0100] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A data processing method for a DPU service grid, characterized in that: The method is applied to a socket mapping controller and comprises the following steps: By means of a preset socket control component, the socket mapping opening information set in the preset socket mapping setting component is monitored; In response to monitoring the socket mapping start information, obtaining the candidate resource configuration information sent by the data control plane; Determine whether the DPU service grid corresponding to the candidate resource configuration information matches the DPU service grid corresponding to the socket mapping enable information; When the DPU service grid corresponding to the socket mapping opening information is matched, adding the socket mapping configuration information to the candidate resource configuration information to generate the target resource configuration information; The target resource configuration information is sent to the corresponding DPU service grid, so that when the corresponding DPU service grid obtains the data request, it performs socket mapping processing on the data request according to the target resource configuration information.
2. The method according to claim 1, characterized in that The determining whether the DPU service grid corresponding to the candidate resource configuration information matches the DPU service grid corresponding to the socket mapping opening information includes: Determine a first DPU service grid label corresponding to the socket mapping opening information; Determine a second DPU service grid label corresponding to the candidate resource configuration information; Determine whether the second DPU service grid label is consistent with the first DPU service grid label.
3. The method according to claim 1, characterized in that The adding the socket mapping configuration information to the candidate resource configuration information to generate the target resource configuration information includes: Identify the configuration resource type corresponding to the candidate resource configuration information; When the configuration resource type is a routing configuration type, adding socket mapping configuration information to the candidate resource configuration information through a preset first configuration component to generate target resource configuration information; When the configuration resource type is a listener configuration type, the socket mapping configuration information is added to the candidate resource configuration information by a preset second configuration component to generate the target resource configuration information.
4. The method according to claim 3, characterized in that The adding the socket mapping configuration information to the candidate resource configuration information by using the preset first configuration component includes: The candidate resource configuration information is deserialized into routing configuration information through the first configuration component, and the socket mapping field corresponding to the routing is set to a preset activation value to generate target resource configuration information.
5. The method according to claim 3, characterized in that The adding the socket mapping configuration information to the candidate resource configuration information by the preset second configuration component includes: The candidate resource configuration information is deserialized into listener configuration information through the second configuration component, and the socket mapping field corresponding to the listener configuration information is set to a preset activation value to generate target resource configuration information.
6. The method according to claim 3, characterized in that The sending the target resource configuration information to the corresponding DPU service grid includes: When the configuration resource type is the routing configuration type, sending the target resource configuration information to the routing processing component in the corresponding DPU service grid; When the configuration resource type is the listener configuration type, the target resource configuration information is sent to the listening processing component in the corresponding DPU service grid.
7. A data processing method for a DPU service grid, characterized in that: The method is applied in a DPU service grid, and comprises the following steps: Obtaining target resource configuration information sent by the socket mapping controller, wherein the target resource configuration information is generated by adding the socket mapping configuration information to the candidate resource configuration information after the socket mapping controller monitors the socket mapping start information set in the preset socket mapping setting component through the preset socket control component, and determines the DPU service grid corresponding to the candidate resource configuration information sent by the data control plane, and when the DPU service grid corresponding to the socket mapping start information matches, the socket mapping configuration information is added to the candidate resource configuration information; Creating a socket mapping option according to the target resource configuration information; In response to obtaining the request data packet, socket mapping processing is performed on the request data packet through the socket mapping option.
8. The method according to claim 7, characterized in that The step of creating a socket mapping option according to the target resource configuration information includes: In response to the routing processing component in the DPU service grid acquiring the target resource configuration information, configuring a socket mapping option in the routing processing component according to the target resource configuration information; In response to the monitoring processing component in the DPU service grid acquiring the target resource configuration information, a socket mapping option is configured in the monitoring processing component according to the target resource configuration information.
9. The method according to claim 7 or 8, characterized in that The performing socket mapping processing on the request data packet through the socket mapping option comprises: Determine a target request end corresponding to the request data packet; The request data packet is sent to the target request end through the socket mapping option.
10. A data processing system of a DPU service grid, characterized in that: Includes a socket mapping controller and a DPU service grid, where: The socket mapping controller is used to execute the data processing method of the DPU service grid according to any one of claims 1 to 6; The DPU service grid is used to execute the data processing method of the DPU service grid as described in any one of claims 7-9.
11. A socket mapping controller, characterized in that: include: A monitoring module, used for monitoring the socket mapping opening information set in the preset socket mapping setting component through the preset socket control component; A first acquisition module, configured to acquire candidate resource configuration information sent by a data control plane in response to monitoring socket mapping start information; A determination module, configured to determine whether a DPU service grid corresponding to the candidate resource configuration information matches a DPU service grid corresponding to the socket mapping enable information; a first socket mapping configuration module, configured to add the socket mapping configuration information to the candidate resource configuration information to generate target resource configuration information when a DPU service grid corresponding to the socket mapping opening information is matched; The sending module is used to send the target resource configuration information to the corresponding DPU service grid, so that when the corresponding DPU service grid obtains the data request, it performs socket mapping processing on the data request according to the target resource configuration information.
12. A DPU service grid, characterized in that: include: A second acquisition module is used to acquire target resource configuration information sent by the socket mapping controller, wherein the target resource configuration information is generated by adding the socket mapping configuration information to the candidate resource configuration information when the socket mapping controller determines the DPU service grid corresponding to the candidate resource configuration information sent by the data control plane after monitoring the socket mapping start information set in the preset socket mapping setting component through the preset socket control component and matching the DPU service grid corresponding to the socket mapping start information; A second socket mapping configuration module, used to create a socket mapping option according to the target resource configuration information; The data processing module is used for, in response to obtaining a request data packet, performing socket mapping processing on the request data packet through the socket mapping option.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to execute the data processing method of the DPU service grid described in any one of claims 1-6, or to execute the data processing method of the DPU service grid described in any one of claims 7-9.
Citation Information
Patent Citations
Multi-thread data transmission method and device
CN114237937A
Scalable brokerless messaging strategy with sidecar security container stack
US20220263805A1
Network system, service mesh configuration method, storage medium, and electronic device
WO2024082990A1