Traffic processing method and device, equipment and storage medium
By deploying BGP services in the Kubernetes network architecture and determining the target network card as the traffic undertaker node, the DPU-HOST device solves the problem of efficiency and resource waste when handling network and service traffic at the same time, and achieves more efficient traffic transmission and resource utilization.
Patent Information
- Application Number
- CN202411583821.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-07
AI Technical Summary
In the Kubernetes network architecture, DPU-HOST devices need to bear both network traffic offloading and service traffic processing, resulting in reduced network traffic transmission efficiency and waste of resources.
By deploying BGP services on the network card of the DPU device, establishing a communication connection between the network card and the router, determining the target network card as the hosting node of the target traffic, and forwarding the target traffic between the target router and the target node through the router information announced by the BGP service.
It improves the transmission efficiency of network traffic, reduces the use of DPU-HOST resources, enables DPU-HOST to provide sufficient resources for more service traffic, and reduces the cost of container cloud platform.
Smart Images

Figure CN119697112A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic processing technology, and in particular to a traffic processing method, device, equipment and storage medium. Background Art
[0002] Kubernetes (K8S), a container orchestration and management system, is a portable, extensible open source platform for managing containerized workloads and services that facilitates declarative configuration and automation.
[0003] Data Processing Unit or Dedicated Data Processing Unit (DPU) is a data processing unit that integrates a network card, a central processing unit, and hardware offloads to perform various network traffic offloads.
[0004] At present, DPU devices are mostly used in K8S network architecture to offload network traffic, and DPU-HOST (server of DPU device) is mostly used as the node to bear the traffic. However, DPU-HOST not only needs to bear the offloading of a large amount of network traffic, but also needs to provide computing power for business traffic. When taking into account both network traffic offloading and computing power at the same time, it is not only easy to affect the transmission efficiency of network traffic, but also easy to cause waste of DPU-HOST resources. Summary of the invention
[0005] In order to solve the above technical problems, the embodiments of the present disclosure provide a traffic processing method, apparatus, device and storage medium.
[0006] In a first aspect, an embodiment of the present disclosure provides a traffic processing method, which is applied to a target cluster, wherein the target cluster includes at least one DPU device, at least one router, and multiple nodes, wherein the router refers to an upper-layer router of a network card included in the DPU device, and the method includes:
[0007] Deploy a BGP service on the network card, and establish a communication connection between the network card and a corresponding router through the BGP service;
[0008] Determine a target network card among the network cards included in the at least one DPU device, and determine the target network card as a receiving node for target traffic, wherein the target traffic is a first traffic determined according to an access request and / or a second traffic determined according to an acquisition response to the access request, wherein the access request refers to an external network request to access a target node among the multiple nodes;
[0009] The target network card forwards the target traffic between the target router and the target node through the router information announced by the BGP service, wherein the at least one router includes the target router.
[0010] Optionally, establishing a communication connection between the network card and the corresponding router through the BGP service includes:
[0011] The BGP service is enabled on the corresponding router, and information of the BGP service is configured; wherein the information of the BGP service includes the AS and the IP address of the network card, so that a connection is established between the network card and the corresponding router through the BGP service.
[0012] Optionally, when the target traffic is the first traffic determined according to the access request, the target network card implements forwarding of the target traffic between the target router and the target node through the router information announced by the BGP service, including:
[0013] After receiving the first traffic, the first router among the at least one router forwards the first traffic to the first network card through the router information announced by the BGP service; wherein the target router includes the first router, and the target network card includes the first network card;
[0014] The first network card forwards the first traffic to the target node.
[0015] Optionally, the first network card forwarding the first traffic to the target node includes:
[0016] The first network card forwards the first traffic to the target node through a virtual private cloud; wherein the gateway of the virtual private cloud is configured to utilize the network card for traffic transmission.
[0017] Optionally, before the first router receives the first traffic, the method further includes:
[0018] According to business requirements, the network information of the multiple nodes under the virtual private cloud is announced to the corresponding router through the BGP service, so that the network card establishes a connection with the virtual private cloud through the BGP service.
[0019] Optionally, the at least one router further includes a second router, the first router and the second router share the router information announced by the BGP service, and after the first network card forwards the first traffic to the target node, the method further includes:
[0020] The target node generates a second flow according to an acquisition response to the access request;
[0021] The second router that receives the second traffic is determined according to the router information, so as to return the second traffic to the external network through the second router; wherein the target router also 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 the first network card, and the second DPU device includes a second network card, and determining the second router that undertakes the second traffic according to the router information to return the second traffic to the external network through the second router includes:
[0023] The target node determines the second network card that receives the second traffic according to the router information, and forwards the second traffic to the second network card; wherein the target network card also includes the second network card;
[0024] The second network card forwards the second traffic to the second router according to the router information;
[0025] The second router returns the second traffic to the external network.
[0026] Optionally, when the target traffic is the second traffic determined according to the acquisition response of the access request, the target network card implements forwarding of the target traffic between the target router and the target node through the router information announced by the BGP service, including:
[0027] The target node forwards the second traffic to the target network card;
[0028] The target network card forwards the second traffic to the target router through the router information announced by the BGP service;
[0029] The target router returns the second traffic to the external network.
[0030] In a second aspect, an embodiment of the present disclosure provides a traffic processing device, which is applied to a target cluster, wherein the target cluster includes at least one DPU device, at least one router, and multiple nodes, wherein the router refers to an upper-layer router of a network card included in the DPU device, and the device includes:
[0031] A service deployment unit, configured to deploy a BGP service on the network card and establish a communication connection between the network card and a corresponding router through the BGP service;
[0032] a determining unit, configured to determine a target network card among the network cards included in the at least one DPU device, and determine the target network card as a receiving node for target traffic, wherein the target traffic is a first traffic determined according to an access request and / or a second traffic determined according to an acquisition response to the access request, wherein the access request refers to an external network request to access a target node among the multiple nodes;
[0033] A traffic forwarding unit is used for the target network card to forward the target traffic between the target router and the target node through the router information announced by the BGP service, wherein the at least one router includes the target router.
[0034] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0035] Memory;
[0036] Processor; and
[0037] Computer programs;
[0038] The computer program is stored in the memory and is configured to be executed by the processor to implement the traffic processing method as described above.
[0039] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the traffic processing method as described above are implemented.
[0040] The traffic processing method provided by the present disclosure 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 router of the network card included in the DPU device, and the method includes: deploying a BGP service on the network card, and establishing a communication connection between the network card and the corresponding router through the BGP service; determining a target network card in the network card included in the at least one DPU device, and determining the target network card as a receiving node for the target traffic, the target traffic is a first traffic determined according to an access request, and / or a second traffic determined according to a response to the access request, the access request refers to an external network request to access a target node among the multiple nodes; the target network card realizes the forwarding of the target traffic between the target router and the target node through the router information announced by the BGP service, wherein the at least one router includes the target router. The method provided by the present application uses the network card in the DPU device as the receiving point for part of the traffic, makes full use of the transmission characteristics of the network card such as low latency and high throughput, improves the transmission efficiency of the traffic, and further reduces the resource occupation of the network traffic for the DPU-HOST, so that the DPU-HOST can provide sufficient resources for more business traffic. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 A K8S network architecture diagram provided for an embodiment of the present disclosure;
[0044] Figure 2 A flow chart of a flow processing method provided by an embodiment of the present disclosure;
[0045] Figure 3 Another K8S network architecture diagram provided for an embodiment of the present disclosure;
[0046] Figure 4 A schematic diagram of the structure of a flow processing device provided in an embodiment of the present disclosure;
[0047] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0048] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0049] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0050] Before explaining this application, it is first necessary to explain the terms involved:
[0051] DPU is short for Data Processing Unit, which is a large category of special-purpose processors. In addition to CPU (Central Processing Unit) and GPU (Graphics Processing Unit), it is an important computing chip in data center scenarios, providing a computing engine for high-bandwidth, low-latency, and data-intensive computing scenarios. DPU integrates network cards, central processing units, and hardware-unloaded data processing units, and can perform various network traffic unloading.
[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 for easy management and service discovery.
[0053] Pod is the smallest basic unit of deployment and management in a kubernetes cluster, used for collaborative addressing and collaborative scheduling. Pod is a collection of one or more containers, an abstract collection of one or a group of services (processes), and can also share network and storage in Pod.
[0054] CNI Container Network Interface (CNI) consists of a set of specifications and libraries for configuring network interfaces for Linux containers, and also includes plug-ins. CNI focuses on network allocation when containers are created and releasing network resources when containers are deleted.
[0055] Linux containers provide a lightweight virtualization method that can run multiple virtual environments (containers) simultaneously on a single host. The processor emulates the entire hardware environment, and the hypervisor controls the virtual machines. Containers are different in that they provide virtualization at the operating system level, where the kernel controls isolated containers.
[0056] Virtual Private Cloud (VPC), Virtual Private Cloud has the following features: Isolation: VPC allows users to create an isolated network environment in the cloud to ensure that the user's resources are isolated from other users' resources. IP address range: Users can select the IP address range assigned to VPC to define the IP address space of the VPC internal network. Subnet: VPC can be divided into multiple subnets, each of which can be associated with different availability zones (AvailabilityZone) to improve high availability. Routing table: Users can configure the routing table within the VPC to define the routing rules for network traffic. Security group and network ACL: Security group and network access control list (ACL) are used to control the traffic in and out of the VPC to ensure the security of the network. Cloud service connection: VPC allows connection to other cloud services, such as cloud databases, load balancers, etc. VPN connection: VPC supports establishing a secure connection through a virtual private network (VPN) to connect the local data center to the VPC in the cloud. Scalability in the cloud: Users can expand the resources in the VPC as needed, such as adding subnets, adjusting the IP address range, connecting different VPCs, etc. 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 the Kubernetes cluster 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: The server / machine / system that is connected to the DPU via the PCIe port.
[0059] DPU-SOC: DPU machine / system on chip.
[0060] OVS: Open virtual switch is an open source multi-layer virtual switch.
[0061] BGP (Border Gateway Protocol): a protocol used to exchange router information between autonomous systems (AS), and is the core routing protocol of the Internet. The main function of BGP is to enable routing selection between different autonomous systems and ensure that data packets are transmitted correctly and efficiently in the global Internet.
[0062] Specifically, Figure 1A K8S network architecture diagram is provided for the embodiment of the present disclosure. The process of traffic transmission based on the existing K8S network architecture is as follows: when the external network accesses the Pod, the switch / router transmits the traffic to the DPU-HOST, that is, the DPU-HOST is used as the node to receive the traffic. When the traffic reaches the DPU-HOST node, it reaches the DPU-SOC through vf. The DPU device includes DPU-HOST and DPU-SOC. After the traffic reaches the DPU-SOC, it reaches the corresponding Pod through the OVS network. However, the DPU-HOST not only has to bear the unloading of a large amount of network traffic, but also needs to process the business traffic, that is, it also needs to provide computing power. The transmission of this kind of network traffic occupies the resources on the DPU-HOST, affecting the DPU-HOST's acceptance of other business traffic, and then affecting the DPU-HOST's computing and memory resources, and it is also easy to cause a waste of container cloud costs.
[0063] In view of the above technical problems, the embodiments of the present disclosure provide a traffic processing method. When K8S supports the BGP function, the local DPU-SOC node is used as the traffic receiving point, and the low latency and high throughput characteristics of the DPU network card are fully utilized to reduce the occupation of resources on the DPU-HOST, so that the DPU-HOST can fully receive more customer business traffic. At the same time, the computing and memory resources of the DPU-HOST can be better used on the business container, thereby saving the cost of customers using the container cloud platform. This is described in detail through one or more of the following embodiments.
[0064] The traffic processing method provided by the embodiment of the present disclosure can be applied to the scenario where K8S interacts with an external network. The method can be performed by a traffic processing device, which can be implemented by software and / or hardware, and the device can be integrated in an electronic device. Among them, electronic devices can include but are not limited to mobile terminals such as smart phones, laptops, digital broadcast receivers, personal digital assistants (PDA), tablet computers (Tablet Personal Computer, Tablet PC), PMP (portable multimedia player), vehicle terminals (such as vehicle navigation terminals), wearable devices, etc., and fixed terminals such as digital televisions, desktop computers, smart home devices, etc.
[0065] Figure 2A flow chart of a traffic processing method provided for an embodiment of the present disclosure is applied to a target cluster, wherein the target cluster includes at least one DPU device, at least one router and multiple nodes, wherein the router refers to an upper-layer router of a network card included in the DPU device, wherein a control system is configured on the network card, and the control system is used to control traffic forwarding.
[0066] It can be understood that the traffic processing method is applied to the target cluster, and the target cluster refers to the K8S cluster. The application scenario is traffic transmission between the external network and a node in K8S, for example, the transmission of outbound traffic determined according to the access request of the external network, and / or the return traffic determined according to the acquisition response of the access request, etc. The target cluster includes at least one DPU device, at least one router and multiple nodes, wherein the DPU device includes at least one network card with traffic transmission function (hereinafter referred to as the network card), and at least one network card can be a network card for processing different traffic types. For example, the first type of network card is used to process outbound traffic, the second type of network card is used to process return traffic, and the third type of network card is used to process outbound traffic and return traffic. Other network card types are not limited. Specifically, the network card refers to the above-mentioned DPU-SOC, and the network card is configured with a control system / operating system. The operating system is used to control the forwarding of traffic from the network card to the node and / or router, and the network card can be deployed on a small physical server. In addition, each network card has at least one upper-layer router, that is, each network card has established a traffic transmission relationship with at least one router, and at the same time, each network card has also established a traffic transmission relationship with at least one node, where the node refers to the Pod in the cluster. The detailed process of the external network realizing traffic transmission with the same node through the router and network card in the cluster is shown in the following embodiment.
[0067] For example, see Figure 3 , Figure 3Another K8S network architecture diagram provided for an embodiment of the present disclosure is also a network architecture diagram of a target cluster involved in an embodiment of the present 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 services, wherein 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 traffic transmission can also be performed between DPU-HOST and DPU-SOC. DPU-HOST refers to any server in DPU1-HOST and DPU2-HOST, DPU-SOC refers to any network card in DPU1-SOC and DPU2-SOC, and the multiple nodes include Pod1, Pod2 and multiple VM nodes. Specifically, the router is used to forward traffic between the external network and the DPU-SOC, and the DPU-SOC is used to forward traffic between the router and the Pod. The DPU-SOC specifically realizes traffic transmission with the Pod through VPC1.
[0068] Traffic processing methods applied to the target cluster include: Figure 2 The following steps are shown:
[0069] S201. Deploy a BGP service on the network card, and establish a communication connection between the network card and a corresponding router through the BGP service.
[0070] The BGP service is a service in ovn-kubernetes CNI.
[0071] Understandably, BGP service is deployed on each network card used for network traffic forwarding. BGP service refers to the service in ovn-kubernetes CNI, which can be set to forward different types of traffic for different network cards. After the BGP service is deployed, the communication connection between the network card and the corresponding router is established through the BGP service, and the router information is constructed. That is, the router that receives the access request can determine the specific network card to receive the traffic based on the router information announced by the BGP service. That is, each time the traffic is forwarded between the router and the network card, the upper-layer router and the receiving network card can be determined based on the router information announced by the BGP service.
[0072] Optionally, the communication connection between the network card and the corresponding router is established through the BGP service, which can be implemented through the following steps:
[0073] The BGP service is enabled on the corresponding router, and information of the BGP service is configured; wherein the information of the BGP service includes the AS and the IP address of the network card, so that a connection is established between the network card and the corresponding router through the BGP service.
[0074] It is understandable that after deploying the BGP service on the network card, the BGP function is enabled on the upper router of the network card accordingly, and the BGP service information is configured. The upper router of the network card refers to the corresponding router of the network card. In addition, the number of upper routers of the network card is not limited, that is, there may be multiple upper routers for the same network card, wherein the information of the BGP service includes information such as the AS and the IP address of the network card. After deploying the BGP service on the network card and enabling the BGP service on the router, a communication connection between the network card and the corresponding router can be established based on the router information.
[0075] S202. Determine a target network card among the network cards included in the at least one DPU device, and determine the target network card as a receiving node for target traffic.
[0076] The target traffic is a first traffic determined according to an access request and / or a second traffic determined according to an acquisition response to the access request, and the access request refers to an external network request to access a target node among the multiple nodes.
[0077] It is understandable that, based on the above S201, the target network card is determined through the router information announced by the BGP service, and the target network card is determined as the receiving node of the target traffic. One possible situation is that the upper-layer router determines the target network card as the receiving node through the router information, that is, the first scenario in which the external network accesses the target node, or the external network responds to the target node, that is, the external network sends traffic to the target node. Another possible situation is that the virtual private cloud that deploys the target node determines the target network card as the receiving node through the router information, that is, the target node accesses the external network, or the target node responds to the second scenario of the external network, that is, the target node sends traffic to the external network. Among them, the target traffic is the first traffic determined according to the access request, the first traffic refers to the outbound traffic when the external network accesses the target node in the first scenario, and the outbound traffic reflects the process of sending data from the client to the server or the target node. The target traffic can also be the second traffic determined according to the access request Get response (GET request), the second traffic refers to the return traffic of the target node responding to the external network in the second scenario, and the return traffic reflects the process of data returning from the server or the target node to the client. An access request refers to a request from an external network to access a target node among multiple nodes. The traffic corresponding to the access request is recorded as the first traffic. A response is a response of the target node to the access request. The traffic corresponding to the response is recorded as the second traffic.
[0078] S203: The target network card forwards the target traffic between the target router and the target node through the router information announced by the BGP service.
[0079] The at least one router includes the target router.
[0080] It can be understood that, 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 announced 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, which is explained in detail through the following embodiments.
[0081] Optionally, in the case where the target traffic is the first traffic determined according to the access request, the target network card implements forwarding of the target traffic between the target router and the target node through the router information announced by the BGP service, which can be specifically implemented by the following steps:
[0082] After receiving the first traffic, the first router among the at least one router forwards the first traffic to the first network card through the router information announced by the BGP service; wherein the target router includes the first router, and the target network card includes the first network card; the first network card forwards the first traffic to the target node.
[0083] It is understandable that when the target traffic is the first traffic, that is, the traffic transmission of the upper router, the target network card and the target node is to be performed progressively, and the specific process is as follows: after the first router in at least one router receives the first traffic determined based on the access request, the first network card is determined among multiple network cards through the router information announced by the BGP service, or the target DPU device can also be determined in at least one DPU device through the router information, and the network card in the target DPU device is used as the first network card, that is, the first network card is used as the traffic receiving point, and the first traffic is forwarded to the first network card, wherein the target router includes the first router, and the target network card includes the first network card. After the first network card receives the first traffic, it forwards the first traffic to the target node through the OVS bridge on it.
[0084] Optionally, the first network card forwards the first traffic to the target node, which can be specifically implemented by the following steps:
[0085] The first network card forwards the first traffic to the target node through a virtual private cloud; wherein the gateway of the virtual private cloud is configured to utilize the network card for traffic transmission.
[0086] It can be understood that the first network card forwards the first traffic to the target node through the virtual private cloud, and sets the gateway of the virtual private cloud (VPC) to use the network card, that is, the network card and the virtual private cloud can establish a communication connection through the BGP service, wherein the virtual private cloud includes multiple subnets (Subnet), which can be understood as an IP address block in the VPC, defining a network area within the VPC, and multiple Subnets can further subdivide the VPC to improve the flexibility and security of network management. Pods are deployed in 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. Pod can communicate with network cards, routers, and external networks through the routing and network security rules provided by VPC. VPC ensures that the communication between Pods is isolated, thereby improving security.
[0087] Optionally, before the first router receives the first traffic, the method further includes:
[0088] According to business requirements, the network information of the multiple nodes under the virtual private cloud is announced to the corresponding router through the BGP service, so that the network card establishes a connection with the virtual private cloud through the BGP service.
[0089] It is understandable that the network information of multiple nodes under the virtual private cloud network is announced to the upper router through the BGP service according to business needs / user needs, and the multiple nodes include Pod, VM and subnet, so as to establish a communication connection between the network card and the corresponding router through the BGP service. It is understandable that when there are multiple routers corresponding to the network card, all the multiple routers need to be configured with BGP information, and the configuration information is shared between the multiple routers to form a highly available network architecture.
[0090] The at least one router further includes a second router, and the first router and the second router share the router information announced by the BGP service.
[0091] It is understandable that, when the external network accesses the 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 router information is shared between the first router and the second router, that is, the configuration information of the BGP service is synchronously updated among multiple routers.
[0092] Optionally, after the first network card forwards the first traffic to the target node, the method further includes:
[0093] The target node generates a second flow according to the response obtained from the access request; determines the second router that receives the second flow according to the router information, so as to return the second flow to the external network through the second router; wherein the target router also includes the second router.
[0094] It can be understood that the target node responds to the access request to obtain the corresponding data, generates an acquisition response, and determines the second router that takes over the second traffic corresponding to the acquisition response based on the router information, so as to return the second traffic to the external network through the second router. The target router includes a first router and a 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 of the external network through the second router. That is, in the interaction between the external network and the target node, the outbound traffic and the 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, the first DPU device includes the first network card, and the second DPU device includes a second network card.
[0096] It can be understood that at least one DPU device includes a first DPU device and a second DPU device, the first DPU device and the second DPU device are different, the first DPU device includes a first network card, and the second DPU device includes a second network card.
[0097] Optionally, determining the second router that receives the second traffic according to the router information so as to return the second traffic to the external network through the second router may be specifically implemented through the following steps:
[0098] The target node determines a second network card that receives the second traffic according to the router information, and forwards the second traffic to the second network card; wherein the target network card also includes the second network card; the second network card forwards the second traffic to the second router according to the router information; and the second router returns the second traffic to the external network.
[0099] It is understandable that the target node determines the second network card that receives the second traffic based on the router information announced by the BGP service, and forwards the second traffic to the second network card through the VPC, wherein the first network card forwards the first traffic forwarded by the first router to the target node, and the second network card forwards the second traffic forwarded by the target node to the second router, that is, the external network accesses the target node through the first router and the first network card, and the target node responds to the external network through the second router and the second network card, that is, the routers and network cards involved in the access and response process can be the same or different, and are determined based on the router information currently announced by the BGP service. Subsequently, the second network card determines the second router based on the router information announced in real time by the BGP service, and forwards the second traffic to the second router, and the second router returns the second traffic to the external network.
[0100] Optionally, in a case where the target traffic is the second traffic determined according to the acquisition response of the access request, the target network card implements forwarding of the target traffic between the target router and the target node through the router information announced by the BGP service, which can be specifically implemented by the following steps:
[0101] The target node forwards the second traffic to the target network card; the target network card forwards the second traffic to the target router through the router information announced by the BGP service; the target router returns the second traffic to the external network.
[0102] It is understandable that, when the target traffic is the second traffic determined according to the acquisition response of the access request, that is, when the target traffic is the return traffic, the DPU-SOC is directly used as the node for receiving the return traffic and returned to the external network through the upper router, wherein the outbound traffic can be directly forwarded to the target node with the DPU-SOC as the receiving point, that is, both the outbound traffic and the return traffic directly use the DPU-SOC as the receiving point, or, 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, that is, the outbound traffic uses the DPU-HOST as the receiving point, and the return traffic uses the DPU-SOC as the receiving point, that is, the receiving point of the outbound traffic is not limited, and the receiving point of the return traffic is directly determined as the DPU-SOC, and the traffic forwarding between the target router and the target node is directly performed through the DPU-SOC, thereby reducing the occupation of the DPU-HOST resources by the return traffic.
[0103] A traffic processing method provided by an embodiment of the present disclosure uses DPU-SOC as a node for BGP service to undertake target traffic. The target traffic can be return traffic and / or outbound traffic. After the upper-layer router forwards the return traffic to the DPU-SOC, the return traffic reaches the corresponding target node through the OVS bridge on the DPU-SOC, thereby reducing the traffic path and making full use of the low latency and high throughput characteristics of the DPU network card to speed up traffic transmission efficiency. At the same time, it can also reduce the occupation of resources on the DPU-HOST, so that the DPU-HOST can undertake more customer business traffic and improve user experience.
[0104] Figure 4 A schematic diagram of the structure of a traffic processing device provided by an embodiment of the present disclosure. The traffic processing device provided by an embodiment of the present disclosure can execute the processing flow provided by the traffic processing method embodiment, and is applied to a target cluster, wherein the target cluster includes at least one DPU device, at least one router and multiple nodes, wherein the router refers to an upper-layer router of a network 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] A service deployment unit 401 is used to deploy a BGP service on the network card and establish a communication connection between the network card and a corresponding router through the BGP service;
[0106] A determining unit 402 is configured to determine a target network card from the network cards included in the at least one DPU device, and determine the target network card as a receiving node for target traffic, wherein the target traffic is a first traffic determined according to an access request and / or a second traffic determined according to an acquisition response to the access request, wherein the access request refers to an external network request to access a target node among the multiple nodes;
[0107] The traffic forwarding unit 403 is used for the target network card to forward the target traffic between the target router and the target node through the router information announced by the BGP service, wherein the at least one router includes the target router.
[0108] Optionally, the service deployment unit 401 is used to:
[0109] The BGP service is enabled on the corresponding router of the network card, and the information of the BGP service is configured; wherein the information of the BGP service includes the AS and the IP address of the network card, so that a connection is established between the network card and the corresponding router through the BGP service.
[0110] Optionally, the traffic forwarding unit 403 is configured to:
[0111] After receiving the first traffic, the first router among the at least one router forwards the first traffic to the first network card through the router information announced by the BGP service; wherein the target router includes the first router, and the target network card includes the first network card;
[0112] The first network card forwards the first traffic to the target node.
[0113] Optionally, the traffic forwarding unit 403 is configured to:
[0114] The first network card forwards the first traffic to the target node through a virtual private cloud; wherein the gateway of the virtual private cloud is configured to utilize the network card for traffic transmission.
[0115] Optionally, the traffic processing device 400 is further used for:
[0116] According to business requirements, the network information of the multiple nodes under the virtual private cloud is announced to the corresponding router through the BGP service, so that the network card establishes a connection with the virtual private cloud through the BGP service.
[0117] The at least one router further includes a second router, and the first router and the second router share the router information announced by the BGP service.
[0118] Optionally, the traffic processing device 400 is further used for:
[0119] The target node generates a second flow according to the first flow;
[0120] The second router that receives the second traffic is determined according to the router information, so as to return the second traffic 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, the first DPU device includes the first network card, and the second DPU device includes a second network card.
[0122] Optionally, the traffic processing device 400 is further used for:
[0123] The target node determines the second network card that receives the second traffic according to the router information, and forwards the second traffic to the second network card; wherein the target network card also includes the second network card;
[0124] The second network card forwards the second traffic to the second router according to the router information;
[0125] The second router returns the second traffic to the external network.
[0126] Optionally, the traffic forwarding unit 403 is configured to:
[0127] The target node forwards the second traffic to the target network card;
[0128] The target network card forwards the second traffic to the target router through the router information announced by the BGP service;
[0129] The target router returns the second traffic to the external network.
[0130] Figure 4 The flow processing device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned 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 by an embodiment of the present disclosure. Figure 5 , which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiment of the present disclosure. The electronic device 500 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0132] like Figure 5 As shown, the electronic device 500 may include a processing device 501 (e.g., a central processing unit, a graphics processing unit, 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 to a random access memory (RAM) 503 to implement the traffic processing method of the embodiment described in the present disclosure. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0133] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0134] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart, thereby implementing the traffic processing method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0135] 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.
[0136] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0137] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0138] Optionally, when the above one or more programs 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 the present disclosure may 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, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate 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 a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0140] 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 a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0141] 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.
[0142] 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.
[0143] In the context of the present disclosure, a machine-readable 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 machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-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.
[0144] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or gateway that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or gateway. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or gateway that includes the elements.
[0145] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be 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 the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A traffic processing method, characterized in that: 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 an upper-layer router of a network card included in the DPU device, and the method includes: Deploy a BGP service on the network card, and establish a communication connection between the network card and a corresponding router through the BGP service; Determine a target network card among the network cards included in the at least one DPU device, and determine the target network card as a receiving node for target traffic, wherein the target traffic is a first traffic determined according to an access request and / or a second traffic determined according to an acquisition response to the access request, wherein the access request refers to an external network request to access a target node among the multiple nodes; The target network card forwards the target traffic between the target router and the target node through the router information announced by the BGP service, wherein the at least one router includes the target router.
2. The method according to claim 1, characterized in that The establishing of a communication connection between the network card and the corresponding router through the BGP service includes: The BGP service is enabled on the corresponding router of the network card, and the information of the BGP service is configured; wherein the information of the BGP service includes the AS and the IP address of the network card, so that a connection is established between the network card and the corresponding router through the BGP service.
3. The method according to claim 1, characterized in that In a case where the target traffic is the first traffic determined according to the access request, the target network card implements forwarding of the target traffic between the target router and the target node through the router information announced by the BGP service, including: After receiving the first traffic, the first router among the at least one router forwards the first traffic to the first network card through the router information announced by the BGP service; wherein the target router includes the first router, and the target network card includes the first network card; The first network card forwards the first traffic to the target node.
4. The method according to claim 3, characterized in that The first network card forwarding the first traffic to the target node includes: The first network card forwards the first traffic to the target node through a virtual private cloud; wherein the gateway of the virtual private cloud is configured to utilize the network card for traffic transmission.
5. The method according to claim 4, characterized in that Before the first router receives the first traffic, the method further includes: According to business requirements, the network information of the multiple nodes under the virtual private cloud is announced to the corresponding router through the BGP service, so that the network card establishes a connection with the virtual private cloud through the BGP service.
6. The method according to claim 3, characterized in that: The at least one router further includes a second router, the first router and the second router share the router information announced by the BGP service, and after the first network card forwards the first traffic to the target node, the method further includes: The target node generates a second flow according to an acquisition response to the access request; The second router that receives the second traffic is determined according to the router information, so as to return the second traffic to the external network through the second router; wherein the target router also includes the second router.
7. The method according to claim 6, characterized in that The at least one DPU device includes a first DPU device and a second DPU device, the first DPU device includes the first network card, the second DPU device includes a second network card, and determining the second router that undertakes the second traffic according to the router information to return the second traffic to the external network through the second router includes: The target node determines the second network card that receives the second traffic according to the router information, and forwards the second traffic to the second network card; wherein the target network card also includes the second network card; The second network card forwards the second traffic to the second router according to the router information; The second router returns the second traffic to the external network.
8. The method according to claim 1, characterized in that In a case where the target traffic is the second traffic determined according to the acquisition response of the access request, the target network card implements forwarding of the target traffic between the target router and the target node through the router information announced by the BGP service, including: The target node forwards the second traffic to the target network card; The target network card forwards the second traffic to the target router through the router information announced by the BGP service; The target router returns the second traffic to the external network.
9. A flow processing device, characterized in that: 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 an upper-layer router of a network card included in the DPU device, and the device includes: A service deployment unit, configured to deploy a BGP service on the network card and establish a communication connection between the network card and a corresponding router through the BGP service; a determining unit, configured to determine a target network card among the network cards included in the at least one DPU device, and determine the target network card as a receiving node for target traffic, wherein the target traffic is a first traffic determined according to an access request and / or a second traffic determined according to an acquisition response to the access request, wherein the access request refers to an external network request to access a target node among the multiple nodes; A traffic forwarding unit is used for the target network card to forward the target traffic between the target router and the target node through the router information announced by the BGP service, wherein the at least one router includes the target router.
10. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the traffic processing method as claimed in any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the traffic processing method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method and device for managing traffic in cloud computing system
CN108965025A
Traffic transmission method and device, equipment and medium
CN111756651A
Distributed gateway configuration method and device based on DPU, equipment and medium
CN118524015A
Methods, systems, and computer readable media for exposing data processing unit (DPU) traffic in a smartswitch
US11853254B1