A traffic processing method, apparatus, device, and storage medium
By deploying BGP services on the network interface card of the DPU device in the Kubernetes network architecture, efficient traffic forwarding between routers and nodes is achieved, solving the problem of DPU-HOST resource waste and improving traffic transmission efficiency and resource utilization.
Patent Information
- Application Number
- CN202411583821.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2044-11-07
AI Technical Summary
In the Kubernetes network architecture, the DPU-HOST device simultaneously undertakes network traffic offloading and computing power requirements, resulting in low network traffic transmission efficiency and resource waste.
By deploying BGP service on the network card of the DPU device, a communication connection is established between the network card and the router. The BGP service is used to announce router information to realize the forwarding of traffic between the target router and the target node, making full use of the low latency and high throughput characteristics of the DPU network card and reducing the occupation of DPU-HOST resources.
It improves traffic transmission efficiency, reduces DPU-HOST resource consumption, ensures that DPU-HOST can provide resources for more business traffic, and reduces the cost of container cloud platform.
Smart Images

Figure CN119697112B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flow processing technology, and more particularly to a flow processing method, apparatus, device, and storage medium. Background Technology
[0002] Kubernetes (K8S) is a portable, scalable, open-source platform for managing containerized workloads and services, facilitating declarative configuration and automation.
[0003] A data processing unit (DPU) is a data processing unit that integrates a network interface card (NIC), a central processing unit (CPU), and hardware offloading, and can perform various network traffic offloading tasks.
[0004] Currently, in Kubernetes network architectures, DPU devices are often used to offload network traffic. The DPU-HOST (the server of the DPU device) is often used as the node that carries the traffic. However, the DPU-HOST not only needs to offload a large amount of network traffic, but also needs to provide computing power for business traffic. When simultaneously taking care of network traffic offloading and computing power, it is easy to affect the transmission efficiency of network traffic and also to waste DPU-HOST resources. Summary of the Invention
[0005] To address the aforementioned technical problems, embodiments of this disclosure provide a traffic processing method, apparatus, device, and storage medium.
[0006] In a first aspect, embodiments of this disclosure provide a traffic processing method applied to a target cluster, the target cluster including at least one DPU device, at least one router, and multiple nodes, wherein the router refers to the upper-layer router of the network interface card included in the DPU device, and the method includes:
[0007] Deploy BGP service on the network interface card (NIC) and establish a communication connection between the NIC and the corresponding router through the BGP service.
[0008] A target network interface card (NIC) is identified among the NICs included in the at least one DPU device, and the target NIC is identified as the receiving node for the target traffic. The target traffic is a first traffic determined based on an access request, and / or a second traffic determined based on the response to the access request. The access request refers to an external network request to access the target node among the plurality of nodes.
[0009] The target network interface card (NIC) forwards the target traffic between the target router and the target node through the router information advertised by the BGP service, wherein the at least one router includes the target router.
[0010] Optionally, establishing a communication connection between the network interface card (NIC) and the corresponding router via the BGP service includes:
[0011] Enable the BGP service on the corresponding router and configure the BGP service information; wherein, the BGP service information includes the AS and the IP address of the network card, so that the network card and the corresponding router can establish a connection through the BGP service.
[0012] Optionally, if the target traffic is a first traffic determined based on the access request, the target network interface card (NIC) forwards the target traffic between the target router and the target node using the router information advertised by the BGP service, including:
[0013] After receiving the first traffic, the first router in the at least one router forwards the first traffic to the first network interface card (NIC) through the router information advertised by the BGP service; wherein, the target router includes the first router, and the target NIC includes the first NIC;
[0014] The first network interface card forwards the first traffic to the target node.
[0015] Optionally, the first network interface card forwards the first traffic to the target node, including:
[0016] The first network interface card (NIC) forwards the first traffic to the target node via a virtual private cloud (VPN); wherein the gateway of the VPN is configured to use the NIC for traffic transmission.
[0017] Optionally, before the first router receives the first traffic, the method further includes:
[0018] According to business needs, the network information of the multiple nodes under the virtual private cloud is advertised to the corresponding router through the BGP service, so that the network card can establish a connection with the virtual private cloud through the BGP service.
[0019] Optionally, the at least one router further includes a second router, and the first router and the second router share the router information advertised by the BGP service. After the first network interface card forwards the first traffic to the target node, the method further includes:
[0020] The target node generates a second traffic based on the response to the access request;
[0021] The second router that receives the second traffic is determined based on the router information, so that the second traffic can be returned to the external network through the second router; wherein, the target router further includes the second router.
[0022] Optionally, the at least one DPU device includes a first DPU device and a second DPU device, the first DPU device includes a first network interface card (NIC), and the second DPU device includes a second NIC. The step of determining the second router that handles the second traffic based on the router information, so as to return the second traffic to the external network through the second router, includes:
[0023] The target node determines the second network interface card (NIC) to handle the second traffic based on the router information, and forwards the second traffic to the second NIC; wherein, the target NIC further includes the second NIC;
[0024] The second network interface card forwards the second traffic to the second router based on the router information;
[0025] The second router returns the second traffic to the external network.
[0026] Optionally, if the target traffic is a second type of traffic determined based on the response to the access request, the target network interface card (NIC) forwards the target traffic between the target router and the target node using the router information advertised by the BGP service, including:
[0027] The target node forwards the second traffic to the target network interface card;
[0028] The target network interface card forwards the second traffic to the target router through the router information advertised by the BGP service;
[0029] The target router returns the second traffic to the external network.
[0030] Secondly, embodiments of this disclosure provide a traffic processing apparatus applied to a target cluster, the target cluster including at least one DPU device, at least one router, and multiple nodes, wherein the router refers to an upper-layer router above the network interface card included in the DPU device, and the apparatus includes:
[0031] A service deployment unit is used to deploy BGP services on the network interface card (NIC) and establish a communication connection between the NIC and the corresponding router through the BGP services.
[0032] A determining unit is configured to determine a target network interface card (NIC) among the NICs included in the at least one DPU device, and to determine the target NIC as the receiving node for the target traffic, wherein the target traffic is a first traffic determined based on an access request, and / or a second traffic determined based on the response to the access request, wherein the access request refers to an external network request to access the target node among the plurality of nodes;
[0033] A traffic forwarding unit is used to forward the target traffic between the target router and the target node through router information advertised by the target network interface card via the BGP service, wherein the at least one router includes the target router.
[0034] Thirdly, embodiments of this disclosure provide an electronic device, including:
[0035] Memory;
[0036] Processor; and
[0037] Computer programs;
[0038] The computer program is stored in the memory and configured to be executed by the processor to implement the traffic processing method described above.
[0039] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the traffic processing method described above.
[0040] The traffic processing method disclosed herein is applied to a target cluster, which includes at least one DPU device, at least one router, and multiple nodes. The router refers to the upper-layer router of the network interface card (NIC) included in the DPU device. The method includes: deploying a BGP service on the NIC and establishing a communication connection between the NIC and the corresponding router through the BGP service; determining a target NIC among the NICs included in the at least one DPU device and designating the target NIC as the receiving node for target traffic, wherein the target traffic is a first traffic determined based on an access request and / or a second traffic determined based on the response to the access request, and the access request refers to an external network request to access the target node among the multiple nodes; the target NIC forwards the target traffic between the target router and the target nodes through router information advertised by the BGP service, wherein the at least one router includes the target router. The method provided in this application uses the NIC in the DPU device as a receiving point for part of the traffic, fully utilizing the low latency and high throughput transmission characteristics of the NIC, improving traffic transmission efficiency, and further reducing the resource consumption of the DPU-HOST by network traffic, so that the DPU-HOST can provide sufficient resources for more service traffic. Attached Figure Description
[0041] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0042] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 A K8S network architecture diagram provided in this disclosure embodiment;
[0044] Figure 2 A schematic flowchart of a traffic processing method provided in an embodiment of this disclosure;
[0045] Figure 3 Another K8S network architecture diagram provided in this disclosure embodiment;
[0046] Figure 4 This is a schematic diagram of the structure of a flow processing device provided in an embodiment of the present disclosure;
[0047] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0048] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0049] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0050] Before explaining this application, the following explanations will be provided for the proper nouns involved:
[0051] DPU stands for Data Processing Unit, a broad category of dedicated processors. Besides CPUs (Central Processing Units) and GPUs (Graphics Processing Units), it is a crucial computing chip in data center scenarios, providing a computing engine for high-bandwidth, low-latency, and data-intensive computing environments. A DPU integrates a network interface card (NIC), a central processing unit, and a hardware-offloaded data processing unit, enabling it to offload various network traffic.
[0052] Kubernetes, also known as K8S, is an open-source system for automatically deploying, scaling, and managing containerized applications. K8S combines the containers that make up an application into logical units to facilitate management and service discovery.
[0053] A Pod is the smallest unit of deployment and management in a Kubernetes cluster, used for coordinated addressing and scheduling. A Pod is a collection of one or more containers, an abstract collection of one or more services (processes), and can also share network and storage.
[0054] The Container Network Interface (CNI) consists of a set of specifications and libraries for configuring network interfaces for Linux containers, and also includes plugins. CNI focuses on network allocation during container creation and releasing network resources when the container is deleted.
[0055] Linux containers provide a lightweight virtualization approach that allows multiple virtual environments (containers) to run simultaneously on a single host machine. While the processor emulates the entire hardware environment and the hypervisor controls the virtual machines, containers differ by providing virtualization at the operating system level, where the kernel controls isolated containers.
[0056] Virtual Private Cloud (VPC) possesses the following characteristics: Isolation: VPC allows users to create an isolated network environment within the cloud, ensuring that user resources are isolated from those of other users. IP Address Range: Users can choose the range of IP addresses assigned to their VPC, defining the IP address space of the VPC's internal network. Subnets: A VPC can be divided into multiple subnets, each associated with a different Availability Zone (AZ) to improve high availability. Routing Tables: Users can configure routing tables within the VPC to define routing rules for network traffic. Security Groups and Network ACLs: Security groups and network access control lists (ACLs) are used to control traffic entering and leaving the VPC, ensuring network security. Cloud Service Connectivity: VPC allows connections to other cloud services, such as cloud databases and load balancers. VPN Connectivity: VPC supports establishing secure connections via Virtual Private Networks (VPNs) to connect on-premises data centers to VPCs in the cloud. Cloud Scalability: Users can expand resources within the VPC as needed, such as adding subnets, adjusting IP address ranges, and connecting to different VPCs. Monitoring and logging: VPC provides monitoring and logging services to help users monitor network traffic, events, and performance.
[0057] OVN-Kubernetes CNI (Container Network Interface): Provides default Pod and Service network communication capabilities for Kubernetes clusters and offloads Kubernetes network traffic to the DPU, thereby providing upper-layer applications with extremely low latency and high bandwidth network forwarding performance.
[0058] DPU-HOST: A server / machine / system that connects to the DPU via a PCIe port.
[0059] DPU-SOC: The machine / system on the DPU network card.
[0060] OVS: Open Virtual Switch is an open-source multi-layer virtual switch.
[0061] BGP (Border Gateway Protocol) is a protocol used to exchange router information between Autonomous Systems (AS). It is a core routing protocol of the Internet. BGP's main function is to enable routing between different ASes, ensuring the correct and efficient transmission of data packets throughout the global Internet.
[0062] Specifically, Figure 1This disclosure provides a K8S network architecture diagram. The traffic transmission process based on the existing K8S network architecture is as follows: When an external network accesses a Pod, the switch / router transmits the traffic to the DPU-HOST, which acts as the node receiving the traffic. After the traffic reaches the DPU-HOST, it travels through a virtual network (VF) to the DPU-SOC. The DPU device includes both the DPU-HOST and the DPU-SOC. Once the traffic reaches the DPU-SOC, it then travels through the OVS network to the corresponding Pod. However, the DPU-HOST not only has to offload a large amount of network traffic but also needs to process business traffic, which requires providing computing power. This transmission of network traffic consumes resources on the DPU-HOST, affecting its ability to handle other business traffic, thus impacting its computing and memory resources, and potentially wasting container cloud costs.
[0063] To address the aforementioned technical issues, this disclosure provides a traffic processing method. When Kubernetes supports BGP, it utilizes a local DPU-SOC node as the traffic receiving point, fully leveraging the low latency and high throughput characteristics of the DPU network interface card to reduce resource consumption on the DPU-HOST. This allows the DPU-HOST to handle more customer business traffic, while also enabling better utilization of the DPU-HOST's computing and memory resources on the business containers, thereby saving customers the cost of using container cloud platforms. Detailed explanations are provided through one or more of the following embodiments.
[0064] The traffic processing method provided in this disclosure is applicable to scenarios where Kubernetes interacts with external networks. This method can be executed by a traffic processing device, which can be implemented in software and / or hardware and can be integrated into an electronic device. The electronic device can include, but is not limited to, mobile terminals such as smartphones, laptops, digital radio receivers, personal digital assistants (PDAs), tablet computers (Tablet PCs), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable devices, etc., as well as fixed terminals such as digital televisions, desktop computers, smart home devices, etc.
[0065] Figure 2This is a flowchart illustrating a traffic processing method provided in an embodiment of the present disclosure, applied to a target cluster. The target cluster includes at least one DPU device, at least one router, and multiple nodes. The router refers to the upper-layer router of the network interface card (NIC) included in the DPU device. The NIC is configured with a control system, which is used to control traffic forwarding.
[0066] Understandably, the traffic processing method is applied to the target cluster, which refers to a Kubernetes cluster. The application scenario is traffic transmission between an external network and a node within the Kubernetes cluster. For example, it transmits outbound traffic determined by access requests from the external network and / or return traffic determined by responses to access requests. The target cluster includes at least one DPU device, at least one router, and multiple nodes. The DPU device includes at least one network interface card (NIC) with traffic transmission capabilities (hereinafter referred to as NIC). The at least one NIC can be a NIC used to handle different types of traffic. For example, a first type of NIC is used to handle outbound traffic, a second type of NIC is used to handle return traffic, and a third type of NIC is used to handle both outbound and return traffic. Other NIC types are not limited. Specifically, the NIC refers to the aforementioned DPU-SOC. The NIC is configured with a control system / operating system. The operating system is used to control the forwarding of traffic from the NIC to the nodes and / or routers. The NIC can be deployed on a small physical server. In addition, each network interface card (NIC) has at least one upstream router, meaning each NIC establishes a traffic transmission relationship with at least one router. Simultaneously, each NIC also establishes a traffic transmission relationship with at least one node, where a node refers to a Pod within the cluster. For a detailed explanation of the process of external network traffic transmission to the same node through the routers and NICs in the cluster, please refer to the following embodiment.
[0067] For example, see Figure 3 , Figure 3This is another K8S network architecture diagram provided in this embodiment of the disclosure, which is also the network architecture diagram of the target cluster involved in this embodiment of the disclosure. The target cluster includes multiple routers, multiple DPU devices, and multiple nodes. The multiple routers, multiple DPU devices, and multiple nodes establish communication connections through BGP service. Among them, the multiple routers include Router 1 and Router 2, the multiple DPU devices include DPU1 and DPU2, DPU1 includes DPU1-HOST and DPU1-SOC, DPU2 includes DPU2-HOST and DPU2-SOC, and DPU-HOST and DPU-SOC can also transmit traffic. DPU-HOST refers to any server in DPU1-HOST and DPU2-HOST, and DPU-SOC refers to any network interface card in DPU1-SOC and DPU2-SOC. The multiple nodes include Pod1, Pod2, and multiple VM nodes. Specifically, the router is used to forward traffic between the external network and DPU-SOC, and DPU-SOC is used to forward traffic between the router and Pod. Specifically, DPU-SOC realizes traffic transmission with Pod through VPC1.
[0068] Traffic processing methods applied to the target cluster include, for example Figure 2 The following steps are shown:
[0069] S201. Deploy BGP service on the network card and establish a communication connection between the network card and the corresponding router through the BGP service.
[0070] The BGP service is a service in ovn-kubernetes CNI.
[0071] Understandably, deploying BGP services on each network interface card (NIC) used for network traffic forwarding is an approach. BGP services, specifically those within the ovn-kubernetes CNI, allow different NICs to be configured to forward different types of traffic. After BGP service deployment, a communication connection is established between the NIC and its corresponding router, constructing router information. This means that the router receiving the access request can determine the specific NIC receiving the traffic based on the router information advertised by the BGP service. In other words, each time traffic is forwarded between the router and the NIC, the upstream router and the receiving NIC can be determined based on the router information advertised by the BGP service.
[0072] Optionally, the above-mentioned establishment of a communication connection between the network card and the corresponding router through the BGP service can be achieved through the following steps:
[0073] Enable the BGP service on the corresponding router and configure the BGP service information; wherein, the BGP service information includes the AS and the IP address of the network card, so that the network card and the corresponding router can establish a connection through the BGP service.
[0074] Understandably, after deploying BGP service on the network interface card (NIC), the corresponding BGP function must be enabled on the upstream router of the NIC, and BGP service information must be configured. The upstream router of the NIC refers to the router corresponding to the NIC. Furthermore, the number of upstream routers for the NIC is not limited; that is, the same NIC may have multiple upstream routers. The BGP service information includes the Application Server (AS) and the NIC's IP address, among other things. After deploying BGP service on the NIC and enabling BGP service on the router, a communication connection can be established between the NIC and the corresponding router based on the router information.
[0075] S202. Determine the target network card among the network cards included in the at least one DPU device, and determine the target network card as the receiving node for the target traffic.
[0076] The target traffic is a first traffic determined based on the access request, and / or a second traffic determined based on the response to the access request, wherein the access request refers to an external network request to access a target node among the plurality of nodes.
[0077] Understandably, based on the above S201, the target network interface card (NIC) is determined through router information advertised via BGP service, and the target NIC is designated as the receiving node for the target traffic. One possible scenario is that the upper-layer router determines the target NIC as the receiving node through router information, which is the first scenario where an external network accesses or responds to the target node, i.e., the external network sends traffic to the target node. Another possible scenario is that the virtual private cloud deploying the target node determines the target NIC as the receiving node through router information, which is the second scenario where the target node accesses or responds to the external network, i.e., the target node sends traffic to the external network. Here, the target traffic is the first traffic determined based on the access request. The first traffic refers to the outbound traffic when the external network accesses the target node in the first scenario, reflecting the process of data being sent from the client to the server or target node. The target traffic can also be the second traffic determined based on the response to the access request (GET request). The second traffic refers to the return traffic when the target node responds to the external network in the second scenario, reflecting the process of data returning from the server or target node to the client. An access request is a request from an external network to access a target node among multiple nodes. The traffic corresponding to an access request is called the first traffic. The response is the target node's response to the access request. The traffic corresponding to the response is called the second traffic.
[0078] S203. The target network interface card (NIC) forwards the target traffic between the target router and the target node through the router information advertised by the BGP service.
[0079] The at least one router includes the target router.
[0080] Understandably, based on the above S202, the target network card forwards the target traffic between the target router and the target node through the router information advertised by the BGP service. For example, the target network card forwards the target traffic to the target router, or the target network card forwards the target traffic to the target node. Specifically, the next node to receive the target traffic from the target network card and the previous node to send the target traffic to the target network card can be determined according to the type of the target traffic. This will be explained in detail in the following embodiments.
[0081] Optionally, if the target traffic is a first type of traffic determined based on the access request, the target network interface card (NIC) forwards the target traffic between the target router and the target node using the router information advertised by the BGP service. This can be achieved through the following steps:
[0082] After receiving the first traffic, the first router in the at least one router forwards the first traffic to the first network interface card (NIC) through the router information advertised by the BGP service; wherein, the target router includes the first router, and the target NIC includes the first NIC; the first NIC forwards the first traffic to the target node.
[0083] Understandably, when the target traffic is the first traffic, the traffic transmission between the upper-layer router, the target network interface card (NIC), and the target node should be progressive. The specific process is as follows: After receiving the first traffic determined based on the access request, the first router in at least one router uses the router information advertised by the BGP service to determine the first NIC among multiple NICs. Alternatively, it can use the router information to determine the target DPU device in at least one DPU device, and use the NIC in the target DPU device as the first NIC, that is, use the first NIC as the traffic receiving point and forward the first traffic to the first NIC. Here, the target router includes the first router, and the target NIC includes the first NIC. After receiving the first traffic, the first NIC forwards the first traffic to the target node through its OVS bridge.
[0084] Optionally, the first network interface card (NIC) forwards the first traffic to the target node, which can be achieved through the following steps:
[0085] The first network interface card (NIC) forwards the first traffic to the target node via a virtual private cloud (VPN); wherein the gateway of the VPN is configured to use the NIC for traffic transmission.
[0086] Understandably, the first network interface card (NIC) forwards the initial traffic to the target node through the Virtual Private Cloud (VPC), and the VPC gateway is configured to use the NIC. This means the NIC and the VPC can establish a communication connection via BGP. The VPC comprises multiple subnets, which can be understood as a block of IP addresses within the VPC, defining a network area within the VPC. Multiple subnets can further subdivide the VPC to improve network management flexibility and security. Pods are deployed within the VPC, and different Pods are deployed in different subnets, such as... Figure 3 In the network structure diagram shown, VPC1 is divided into multiple subnets, including Subnet1 and Subnet2. Pod1 is deployed in the network area of Subnet1, and Pod2 is deployed in the network area of Subnet2. Pods can communicate with network cards, routers, and external networks through the routing and network security rules provided by VPC. VPC ensures that communication between Pods is isolated, which improves security.
[0087] Optionally, before the first router receives the first traffic, the method further includes:
[0088] According to business needs, the network information of the multiple nodes under the virtual private cloud is advertised to the corresponding router through the BGP service, so that the network card can establish a connection with the virtual private cloud through the BGP service.
[0089] Understandably, based on business / user needs, network information of multiple nodes within a Virtual Private Cloud (VPN) network is advertised to upper-layer routers via BGP services. These nodes include Pods, VMs, and subnets, establishing communication connections between network interface cards (NICs) and their corresponding routers through BGP. Understandably, when multiple routers correspond to a NIC, all routers need to be configured with BGP information, and this configuration information should be shared among the routers to form a highly available network architecture.
[0090] The at least one router further includes a second router, and the router information advertised by the BGP service is shared between the first router and the second router.
[0091] Understandably, when an external network accesses a target node and the target node responds to the external network, at least one router also includes a second router. The first router and the second router are different, and the first router and the second router share router information. That is, the configuration information of the BGP service is updated synchronously among multiple routers.
[0092] Optionally, after the first network interface card forwards the first traffic to the target node, the method further includes:
[0093] The target node generates second traffic based on the response to the access request; it determines the second router that will handle the second traffic based on the router information, and returns the second traffic to the external network through the second router; wherein, the target router further includes the second router.
[0094] Understandably, the target node responds to the access request, obtains the corresponding data, generates an acquisition response, and determines the second router that will handle the second traffic corresponding to the acquisition response based on the router information. The second router then returns the second traffic to the external network. The target router includes the first router and the second router. In this scenario, the external network accesses the target node through the first router, and the target node responds to the access request from the external network through the second router. In other words, in the interaction between the external network and the target node, outbound traffic and return traffic can be forwarded through different routers.
[0095] The at least one DPU device includes a first DPU device and a second DPU device, wherein the first DPU device includes the first network interface card (NIC) and the second DPU device includes the second NIC.
[0096] Understandably, at least one DPU device includes a first DPU device and a second DPU device, which are different from each other. The first DPU device includes a first network interface card (NIC), and the second DPU device includes a second NIC.
[0097] Optionally, determining the second router that undertakes the second traffic based on the router information, so as to return the second traffic to the external network through the second router, can be achieved through the following steps:
[0098] The target node determines the second network interface card (NIC) to handle the second traffic based on the router information and forwards the second traffic to the second NIC; wherein, the target NIC further includes the second NIC; the second NIC forwards the second traffic to the second router based on the router information; the second router returns the second traffic to the external network.
[0099] Understandably, the target node determines the second network interface card (NIC) to handle the second traffic based on the router information advertised by the BGP service, and forwards the second traffic to the second NIC via the VPC. The first NIC forwards the first traffic from the first router to the target node, and the second NIC forwards the second traffic from the target node to the second router. In other words, external network access to the target node is achieved through the first router and the first NIC, while the target node's response to the external network is achieved through the second router and the second NIC. The access and response processes involve routers and NICs that can be the same or different, determined by the router information currently advertised by the BGP service. Subsequently, the second NIC determines the second router based on the router information advertised in real-time by the BGP service, forwards the second traffic to the second router, and the second router then returns the second traffic to the external network.
[0100] Optionally, if the target traffic is a second type of traffic determined based on the response to the access request, the target network interface card (NIC) forwards the target traffic between the target router and the target node using the router information advertised by the BGP service. This can be achieved through the following steps:
[0101] The target node forwards the second traffic to the target network interface card (NIC); the target NIC forwards the second traffic to the target router through the router information advertised by the BGP service; the target router returns the second traffic to the external network.
[0102] Understandably, when the target traffic is the second traffic determined by the response to the access request, i.e., when the target traffic is return traffic, the DPU-SOC is directly used as the node to receive the return traffic and is returned to the external network through the upper-layer router. The outbound traffic can be forwarded directly to the target node using the DPU-SOC as the receiving point, meaning both outbound and return traffic use the DPU-SOC as the receiving point. Alternatively, the outbound traffic can also use the DPU-HOST as the receiving point and then forward it to the target node through the DPU-SOC, meaning both outbound and return traffic use the DPU-SOC as the receiving point. In other words, the receiving point for outbound traffic is not limited, but the receiving point for return traffic is directly determined to be the DPU-SOC. The DPU-SOC directly forwards traffic between the target router and the target node, thereby reducing the resource consumption of the DPU-HOST by the return traffic.
[0103] This disclosure provides a traffic processing method in which a DPU-SOC is used as a node to handle target traffic via BGP services. The target traffic can be backhaul traffic and / or outhaul traffic. When the upper-layer router forwards the backhaul traffic to the DPU-SOC, it reaches the corresponding target node through the OVS bridge on the DPU-SOC. This reduces the traffic path and fully utilizes the low latency and high throughput characteristics of the DPU network card to accelerate traffic transmission efficiency. At the same time, it also reduces the resource occupation on the DPU-HOST, enabling the DPU-HOST to handle more customer service traffic and improve user experience.
[0104] Figure 4 This is a schematic diagram of a traffic processing device provided in an embodiment of this disclosure. The traffic processing device provided in this embodiment can execute the processing flow provided in the traffic processing method embodiment, and is applied to a target cluster. The target cluster includes at least one DPU device, at least one router, and multiple nodes. The router refers to the upper-layer router of the network interface card included in the DPU device, such as... Figure 4 As shown, the traffic processing device 400 includes a service deployment unit 401, a determination unit 402, and a traffic forwarding unit 403, wherein:
[0105] Service deployment unit 401 is used to deploy BGP service on the network interface card and establish a communication connection between the network interface card and the corresponding router through the BGP service;
[0106] The determining unit 402 is configured to determine a target network interface card (NIC) among the NICs included in the at least one DPU device, and to determine the target NIC as the receiving node for the target traffic. The target traffic is a first traffic determined based on an access request, and / or a second traffic determined based on the response to the access request. The access request refers to an external network request to access the target node among the plurality of nodes.
[0107] Traffic forwarding unit 403 is used to forward the target traffic between the target router and the target node through router information advertised by the target network interface card via the BGP service, wherein the at least one router includes the target router.
[0108] Optionally, service deployment unit 401 is used for:
[0109] Enable the BGP service on the corresponding router of the network card and configure the BGP service information; wherein, the BGP service information includes the AS and the IP address of the network card, so that the network card and the corresponding router can establish a connection through the BGP service.
[0110] Optionally, the traffic forwarding unit 403 is used for:
[0111] After receiving the first traffic, the first router in the at least one router forwards the first traffic to the first network interface card (NIC) through the router information advertised by the BGP service; wherein, the target router includes the first router, and the target NIC includes the first NIC;
[0112] The first network interface card forwards the first traffic to the target node.
[0113] Optionally, the traffic forwarding unit 403 is used for:
[0114] The first network interface card (NIC) forwards the first traffic to the target node via a virtual private cloud (VPN); wherein the gateway of the VPN is configured to use the NIC for traffic transmission.
[0115] Optionally, the flow processing device 400 is also used for:
[0116] According to business needs, the network information of the multiple nodes under the virtual private cloud is advertised to the corresponding router through the BGP service, so that the network card can establish a connection with the virtual private cloud through the BGP service.
[0117] The at least one router further includes a second router, and the router information advertised by the BGP service is shared between the first router and the second router.
[0118] Optionally, the flow processing device 400 is also used for:
[0119] The target node generates a second flow based on the first flow;
[0120] The second router that takes over the second traffic is determined based on the router information, so that the second traffic can be returned to the external network through the second router.
[0121] The at least one DPU device includes a first DPU device and a second DPU device, wherein the first DPU device includes the first network interface card (NIC) and the second DPU device includes the second NIC.
[0122] Optionally, the flow processing device 400 is also used for:
[0123] The target node determines the second network interface card (NIC) to handle the second traffic based on the router information, and forwards the second traffic to the second NIC; wherein, the target NIC further includes the second NIC;
[0124] The second network interface card forwards the second traffic to the second router based on the router information;
[0125] The second router returns the second traffic to the external network.
[0126] Optionally, the traffic forwarding unit 403 is used for:
[0127] The target node forwards the second traffic to the target network interface card;
[0128] The target network interface card forwards the second traffic to the target router through the router information advertised by the BGP service;
[0129] The target router returns the second traffic to the external network.
[0130] Figure 4 The traffic processing device shown in the embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.
[0131] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. See below for details. Figure 5 The diagram illustrates a structural schematic suitable for implementing the electronic device 500 in the embodiments of this disclosure. The electronic device 500 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0132] like Figure 5 As shown, the electronic device 500 may include a processing unit 501 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503 to implement the traffic processing method as described in the embodiments of this disclosure. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0133] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0134] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the traffic processing method as described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0135] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0136] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0137] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0138] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0139] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0140] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions 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 using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0141] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0142] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0143] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0144] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or gateway that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or gateway. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or gateway that includes said element.
[0145] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A flow processing method, characterized in that, Applied to a target cluster, the target cluster including at least one DPU device, at least one router, and multiple nodes, wherein the router refers to the upper-layer router of the network interface card included in the DPU device, the method includes: Deploy BGP service on the network interface card (NIC) and establish a communication connection between the NIC and the corresponding router through the BGP service. A target network interface card (NIC) is identified among the NICs included in the at least one DPU device, and the target NIC is identified as the receiving node for the target traffic. The target traffic is a first traffic determined based on an access request, and / or a second traffic determined based on the response to the access request. The access request refers to an external network request to access the target node among the plurality of nodes. The target network interface card (NIC) forwards the target traffic between the target router and the target node through the router information advertised by the BGP service, wherein the at least one router includes the target router; The step of establishing a communication connection between the network card and the corresponding router through the BGP service includes: Enable the BGP service on the corresponding router of the network card and configure the BGP service information; wherein, the BGP service information includes the AS and the IP address of the network card, so that the network card and the corresponding router can establish a connection through the BGP service.
2. The method according to claim 1, characterized in that, When the target traffic is a first type of traffic determined based on an access request, the target network interface card (NIC) forwards the target traffic between the target router and the target node using router information advertised by the BGP service, including: After receiving the first traffic, the first router in the at least one router forwards the first traffic to the first network interface card (NIC) through the router information advertised by the BGP service; wherein, the target router includes the first router, and the target NIC includes the first NIC; The first network interface card forwards the first traffic to the target node.
3. The method according to claim 2, characterized in that, The first network interface card forwards the first traffic to the target node, including: The first network interface card (NIC) forwards the first traffic to the target node via a virtual private cloud (VPN); wherein the gateway of the VPN is configured to use the NIC for traffic transmission.
4. The method according to claim 3, characterized in that, Before the first router receives the first traffic, the method further includes: According to business needs, the network information of the multiple nodes under the virtual private cloud is advertised to the corresponding router through the BGP service, so that the network card can establish a connection with the virtual private cloud through the BGP service.
5. The method according to claim 2, characterized in that, The at least one router further includes a second router, and the first router and the second router share the router information advertised by the BGP service. After the first network interface card forwards the first traffic to the target node, the method further includes: The target node generates a second traffic based on the response to the access request; The second router that receives the second traffic is determined based on the router information, so that the second traffic can be returned to the external network through the second router; wherein, the target router further includes the second router.
6. The method according to claim 5, characterized in that, The at least one DPU device includes a first DPU device and a second DPU device. The first DPU device includes a first network interface card (NIC), and the second DPU device includes a second NIC. The step of determining the second router that handles the second traffic based on the router information, so as to return the second traffic to the external network through the second router, includes: The target node determines the second network interface card (NIC) to handle the second traffic based on the router information, and forwards the second traffic to the second NIC; wherein, the target NIC further includes the second NIC; The second network interface card forwards the second traffic to the second router based on the router information; The second router returns the second traffic to the external network.
7. The method according to claim 1, characterized in that, When the target traffic is a second type of traffic determined based on the response to the access request, the target network interface card (NIC) forwards the target traffic between the target router and the target node using the router information advertised by the BGP service, including: The target node forwards the second traffic to the target network interface card; The target network interface card forwards the second traffic to the target router through the router information advertised by the BGP service; The target router returns the second traffic to the external network.
8. A flow processing device, characterized in that, Applied to a target cluster, the target cluster including at least one DPU device, at least one router, and multiple nodes, wherein the router refers to the upper-layer router of the network interface card included in the DPU device, and the device includes: A service deployment unit is used to deploy BGP services on the network interface card (NIC) and establish a communication connection between the NIC and the corresponding router through the BGP services. A determining unit is configured to determine a target network interface card (NIC) among the NICs included in the at least one DPU device, and to determine the target NIC as the receiving node for the target traffic, wherein the target traffic is a first traffic determined based on an access request, and / or a second traffic determined based on the response to the access request, wherein the access request refers to an external network request to access the target node among the plurality of nodes; A traffic forwarding unit is used to forward the target traffic between the target router and the target node through router information advertised by the target network interface card via the BGP service, wherein the at least one router includes the target router; The step of establishing a communication connection between the network card and the corresponding router through the BGP service includes: Enable the BGP service on the corresponding router of the network card and configure the BGP service information; wherein, the BGP service information includes the AS and the IP address of the network card, so that the network card and the corresponding router can establish a connection through the BGP service.
9. An electronic device, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the traffic processing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the traffic processing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for managing traffic in cloud computing system
CN108965025A
Traffic transmission method and device, equipment and medium
CN111756651A