DPU-based cluster network interconnection method and apparatus, and storage medium
By obtaining the connection between logical switches and logical routers in the Kubernetes cluster, determining the DPU gateway and realizing network interconnection, the problem of CPU resource occupation during cross-cluster network interconnection is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202411265323.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-10
AI Technical Summary
In Kubernetes clusters based on open virtual networks, when interconnecting across cluster networks, the existing technology needs to occupy the host CPU resources, resulting in performance bottlenecks and poor user experience under high load conditions.
By obtaining the connection between logical switches and logical routers, determine the DPU gateway in the cluster, and use the DPU gateway to achieve network interconnection with other clusters, avoiding the large amount of CPU resources occupies when cluster interactions.
Effectively save CPU resources, reduce the impact on other CPU tasks, and improve user experience.
Smart Images

Figure CN119094339A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a cluster network interconnection method, device and storage medium based on DPU. Background Art
[0002] In a Kubernetes cluster based on Open Virtual Network (OVN), there may be a need for containers in the cluster network to access traffic outside the cluster, which requires configuring a cross-cluster network interconnection solution between clusters.
[0003] The current cross-cluster network interconnection solution usually uses the network interface card of the node in the cluster to send or receive traffic from other clusters. That is to say, in the current cross-cluster network interconnection solution, when exchanging data across clusters, operations such as data packet parsing, encapsulation, verification and routing require the central processing unit (CPU) resources of the host machine. In this way, under high load, there may be performance bottlenecks when processing large amounts of data traffic, resulting in a poor user experience. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a DPU-based cluster network interconnection method, device and storage medium, which can save CPU resources and improve user experience.
[0005] In the first aspect, the present application provides a cluster network interconnection method based on DPU, including: obtaining a logical switch; creating a connection between the logical switch and the logical router; the logical router is the logical router of the virtual private cloud VPC in the cluster; determining the DPU gateway in the cluster; and realizing network interconnection with other clusters through the logical router, logical switch, and DPU gateway.
[0006] In some embodiments, obtaining the logical switch includes: reading the logical switch corresponding to the cluster from a global interconnect northbound database; the global interconnect northbound database is pre-created and accessible to any cluster.
[0007] In some embodiments, determining a DPU gateway in a cluster includes: obtaining configuration parameters of each DPU in the cluster; the configuration parameters are used to indicate whether the DPU is used as a gateway device; and determining a DPU gateway from multiple DPUs in the cluster according to the configuration parameters.
[0008] In some embodiments, network interconnection with other clusters is jointly achieved through logical routers, logical switches, and DPU gateways, including: when traffic to access other clusters is received, a first DPU gateway is determined from the DPU gateways in the cluster; at least one other DPU gateway is determined from the global interconnect southbound database, and a second DPU gateway is determined from the other DPU gateways; the other DPU gateways are DPU gateways corresponding to other clusters, which are pre-added to the global interconnect southbound database for other clusters; and the traffic is transmitted to other clusters via the logical router, the logical switch, the first DPU gateway, and the second DPU gateway.
[0009] In some embodiments, determining a second DPU gateway from other DPU gateways includes: receiving routing broadcasts from other clusters to obtain multiple routing paths corresponding to other clusters; counting the number of times each other DPU gateway appears in multiple routing paths; and determining the other DPU gateway with the least number of appearances as the second DPU gateway.
[0010] In some embodiments, after determining the DPU gateway in the cluster, the DPU-based cluster network interconnection method also includes: adding the DPU gateway information of the DPU gateway to the global interconnection southbound database; the DPU gateway information is used by other clusters to access the cluster according to the DPU gateway information.
[0011] On the second aspect, the present application provides a cluster network interconnection device based on DPU, including: an acquisition module for acquiring a logical switch; a processing module for creating a connection between a logical switch and a logical router; the logical router is a logical router of a virtual private cloud VPC in the cluster; a determination module for determining a DPU gateway in the cluster; the processing module is also used to realize network interconnection with other clusters through logical routers, logical switches, and DPU gateways.
[0012] In some embodiments, the acquisition module is specifically used to read the logical switch corresponding to the cluster from the global interconnect northbound database; the global interconnect northbound database is pre-created and can be accessed by any cluster.
[0013] In some embodiments, the determination module is specifically used to: obtain configuration parameters of each DPU in the cluster; the configuration parameters are used to indicate whether the DPU is used as a gateway device; and determine a DPU gateway from multiple DPUs in the cluster according to the configuration parameters.
[0014] In some embodiments, the processing module includes a determination submodule and a transmission submodule; the determination submodule is used to: when receiving traffic to access other clusters, determine a first DPU gateway from the DPU gateways in the cluster; determine at least one other DPU gateway from the global interconnect southbound database, and determine a second DPU gateway from the other DPU gateways; the other DPU gateways are DPU gateways corresponding to other clusters, which are pre-added to the global interconnect southbound database for other clusters; the transmission submodule is used to: transmit the traffic to other clusters via the logical router, the logical switch, the first DPU gateway, and the second DPU gateway.
[0015] In some embodiments, the determination submodule is specifically used to: receive routing broadcasts from other clusters to obtain multiple routing paths corresponding to other clusters; count the number of times each other DPU gateway appears in multiple routing paths; and determine the other DPU gateway with the least number of appearances as the second DPU gateway.
[0016] In some embodiments, the processing module is further used to add the DPU gateway information of the DPU gateway to the global interconnect southbound database after determining the DPU gateway in the cluster; the DPU gateway information is used by other clusters to access the cluster based on the DPU gateway information.
[0017] In a third aspect, the present application provides a computer-readable storage medium, including: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the DPU-based cluster network interconnection method as in the second aspect is implemented.
[0018] In a fourth aspect, the present application provides a computer program product, comprising: when the computer program product runs on a computer, the computer implements the DPU-based cluster network interconnection method as in the second aspect.
[0019] The technical solution provided by the present application has the following advantages over the prior art: First, obtain the logical switch and create a connection between the logical switch and the logical router. The logical router is the logical router of the virtual private cloud VPC in the cluster. After that, determine the DPU gateway in the cluster, and realize network interconnection with other clusters through the logical router, logical switch, and DPU gateway. In this way, when realizing cross-cluster network interconnection, the DPU in the cluster is used as a gateway device to realize network interconnection between clusters, avoiding the situation where a large amount of CPU resources are occupied during cluster interaction, indirectly reducing the impact on other tasks in the CPU, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0021] In order to more clearly illustrate the embodiments of the present application 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.
[0022] Figure 1 One of the flow diagrams of the DPU-based cluster network interconnection method provided in the embodiment of the present application;
[0023] Figure 2 A schematic diagram of an application scenario of a cluster network interconnection method based on a DPU provided in an embodiment of the present application;
[0024] Figure 3 The second flowchart of the DPU-based cluster network interconnection method provided in the embodiment of the present application;
[0025] Figure 4 The third flowchart of the DPU-based cluster network interconnection method provided in the embodiment of the present application;
[0026] Figure 5 A fourth flowchart of a cluster network interconnection method based on a DPU provided in an embodiment of the present application;
[0027] Figure 6 One of the structural schematic diagrams of the DPU-based cluster network interconnection device provided in the embodiment of the present application;
[0028] Figure 7 The second structural diagram of the DPU-based cluster network interconnection device provided in the embodiment of the present application;
[0029] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0031] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0032] First, some nouns or terms involved in the specification and claims of this application are explained below.
[0033] DPU: Data Processing Unit is a programmable computer processor specifically used for data processing. It tightly integrates a general-purpose CPU with network interface hardware and can replace traditional network interface cards. Its main function is to process and manage data so that data can be effectively transmitted, stored, analyzed and operated, thereby reducing the burden on the main CPU to handle complex network tasks.
[0034] Kubernetes: k8s for short, is an open source container orchestration platform that provides a platform for automatically deploying, scaling, and managing containerized applications. It can effectively manage large-scale containerized applications and simplify the deployment, update, and maintenance of applications.
[0035] VPC: Virtual Private Cloud (VPC) is a virtual network environment created in a public cloud environment, designed to provide users with isolation and security for building and managing resources in the cloud. VPC allows users to create multiple logically isolated virtual networks in the cloud and customize network configuration, subnet division, routing policies, etc. to meet specific application requirements. VPC is an important network service in the cloud environment, providing users with a flexible, secure and scalable network environment.
[0036] OVN: Open Virtual Network is an open source virtual network solution that provides a distributed Software Defined Networking (SDN) implementation for building and managing virtual networks.
[0037] The following is a detailed description of the DPU-based cluster network interconnection method, device and storage medium provided in the embodiments of the present application through specific embodiments in conjunction with the accompanying drawings.
[0038] In some cases, multiple Kubernetes clusters may need to be deployed to prevent a single point of failure from affecting the entire system. For example, deploy a Kubernetes cluster for each available zone and deploy different Kubernetes clusters in different physical areas. Although the control planes of different Kubernetes clusters are independent of each other, the VPCs of different Kubernetes clusters may need to communicate across clusters.
[0039] The current cross-cluster network interconnection solution usually uses the network interface card of the node in the cluster to send or receive traffic from other clusters. That is to say, in the current cross-cluster network interconnection solution, when exchanging data across clusters, operations such as data packet parsing, encapsulation, verification and routing require the central processing unit (CPU) resources of the host machine. In this way, under high load, there may be performance bottlenecks when processing large amounts of data traffic, resulting in a poor user experience.
[0040] In view of the above problems, the embodiment of the present application provides a cluster network interconnection method based on DPU, which can obtain a logical switch; create a connection between a logical switch and a logical router; the logical router is a logical router of a virtual private cloud VPC in the cluster; determine the DPU gateway in the cluster; and realize network interconnection with other clusters through logical routers, logical switches, and DPU gateways. It avoids the situation where a large amount of CPU resources are occupied during cluster interaction, indirectly reduces the impact on other tasks in the CPU, and thus improves the user experience.
[0041] The DPU-based cluster network interconnection method provided in the embodiment of the present application can be executed by a DPU-based cluster network interconnection device, and the DPU-based cluster network interconnection device can be hardware or software. When the DPU-based cluster network interconnection device is hardware, it can be various electronic devices with a DPU-based cluster network interconnection function, including but not limited to mobile phones, computers, computers, tablet computers, televisions, smart TVs, vehicle-mounted equipment, smart vehicles, laser projection equipment, monitors, electronic whiteboards (electronic bulletin boards), electronic desktops (electronic tables), etc. When the DPU-based cluster network interconnection device is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules, or it can be implemented as a single software or software module. No specific limitation is made here.
[0042] Figure 1 A schematic diagram of a cluster network interconnection method based on a DPU provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the DPU-based cluster network interconnection method may include the following steps:
[0043] S11. Get the logical switch.
[0044] First, create a VPC in each cluster that needs to be connected to the network.
[0045] Among them, in the VPC environment built by OVN, OVN provides a distributed virtual network implementation that can be used to build and manage virtual networks, while VPC provides a logically isolated virtual network environment that enables users to create their own network space in the cloud and deploy and manage applications in it. In Kubernetes, VPC is usually a network isolation and virtualization service provided by a cloud service provider. VPC provides a logically isolated virtual network environment that enables users to create their own network space in the cloud and deploy and manage applications in it. Pod deployment in Kubernetes is usually performed on an already created VPC. In general, users create and manage Pods on the selected VPC, and the Kubernetes cluster automatically manages network connections and communications, as well as network isolation and security between Pods. Therefore, creating a VPC in an OVN-based Kubernetes cluster can provide a good operating environment for the Kubernetes cluster.
[0046] After that, get the logical switch (transit switch, ts).
[0047] Among them, since OVN has a distributed virtual network architecture, it can create and manage virtual networks between multiple nodes and support the deployment of large-scale virtual network environments in clusters. It provides the functions of virtual switches and virtual routers, which can realize the forwarding and routing of Layer 2 and Layer 3 networks, and supports network functions such as load balancing, firewalls, source network address translation (SNAT), and destination network address translation (DNAT). Therefore, in the VPC network based on OVN, users can build their own virtual network topology by defining objects such as logical routers, logical switches, and logical ports. OVN provides a wealth of network functions and policies, including Layer 2 and Layer 3 network connections, security groups, load balancing, etc., which can meet users' needs for network isolation, security, and availability. Users can create multiple logical switches in VPC and connect different logical ports to these switches to achieve network isolation between different subnets. Therefore, if you get the logical switch created by the user, you can connect to the logical router in the VPC through the logical port.
[0048] Specifically, the method for obtaining the logical switch may be to directly read the logical switch from a pre-stored logical switch list, or to obtain the logical switch set by the user in real time.
[0049] In some embodiments, the logical switch may be obtained by reading the logical switch corresponding to the cluster from a global interconnected northbound database (NBDB), wherein the global interconnected northbound database is pre-created and accessible to any cluster.
[0050] Specifically, an OVN global interconnection northbound database is created in any cluster that needs to be interconnected to provide users with an entry for configuring the logical switches of each cluster. That is to say, users can configure the logical switches of each cluster in the global interconnection northbound database, and then the cluster's integrated circuit (IC) controller (ic-controller) reads the corresponding logical switch from the global interconnection northbound database.
[0051] S12. Create a connection between the logical switch and the logical router.
[0052] The logical router is the logical router of the virtual private cloud VPC in the cluster.
[0053] Specifically, the way to create a connection between a logical switch and a logical router is that the ic-controller of the cluster adds the logical switch to the northbound database of the cluster itself, and creates a logical port (patch port) in the northbound database of the cluster itself, thereby establishing a connection between the logical switch and the logical router of the VPC in the cluster through the logical port. For example, Figure 2 As shown, for the VPC network 201 of the first cluster, the logical switch (ts) obtained by the VPC network 201 of the first cluster is connected to the logical router (router) in the VPC network 201 of the first cluster through the logical port; for the VPC network 202 of the second cluster, the logical switch (ts) obtained by the VPC network 202 of the second cluster is connected to the logical router (router) in the VPC network 202 of the second cluster through the logical port.
[0054] S13. Determine the DPU gateway in the cluster.
[0055] In some embodiments, before determining the DPU gateway in the cluster, the DPU-based cluster network interconnection method also includes: deploying an open source virtual switch (Open vSwitch, OVS) on the DPU, and configuring parameters for connecting to the cluster OVN southbound database in OVS. The parameters may include: (1) ovn-encap-ip: the Internet Protocol (IP) address on the DPU, through which the cluster OVN southbound database will be connected to the DPU. (2) ovn-encap-type: the encapsulated tunnel type, for example, can support geneve, vxlan and stt. (3) ovn-remote: the cluster OVN southbound database address to which this DPU is connected. (4) system-id: the chassis name of this DPU in the cluster OVN southbound database. (5) hostname: the host name of this DPU in the chassis table of the cluster OVN southbound database. Afterwards, the cluster is connected to the DPU according to the above parameters.
[0056] After that, identify the DPU gateways in the cluster.
[0057] Specifically, the DPU gateway in the cluster may be determined by directly reading the DPU gateway in the cluster from a pre-stored DPU gateway list, or may be a DPU gateway configured by a user in real time.
[0058] S14. Network interconnection with other clusters is achieved through logical routers, logical switches, and DPU gateways.
[0059] Specifically, gateway devices include distributed gateways and centralized gateways. Distributed gateways are gateway devices that are separated from each node for communication; centralized gateways designate one or two gateway devices as the entrance and exit of all network traffic. Therefore, when the network interconnection with other clusters is achieved through logical routers, logical switches, and DPU gateways, the determined DPU gateway is used as a distributed gateway or a centralized gateway.
[0060] Since there may be multiple DPU gateways determined, when achieving network interconnection with other clusters through logical routers, logical switches, and DPU gateways, it is first necessary to determine a DPU gateway from multiple DPU gateways as the first DPU gateway for network interconnection between this cluster and other clusters, and then forward the traffic to other clusters through the path of the logical router, logical switch, the first DPU gateway, and the DPU gateways of other clusters.
[0061] For example, in Figure 2The scenario shown includes a VPC network 201 of the first cluster and a VPC network 202 of the second cluster. The DPU gateway determined by the VPC network 201 of the first cluster is the first DPU gateway, and the communication gateway between the VPC network 202 of the second cluster and the VPC network 201 of the first cluster is the second DPU gateway; then the path for traffic to be transmitted from the VPC network 201 of the first cluster to the VPC network 202 of the second cluster is: the logical router (router) of the VPC network 201 of the first cluster, the logical switch (ts) of the VPC network 201 of the first cluster, the first DPU gateway, the second DPU gateway, and the VPC network 202 of the second cluster.
[0062] In the above solution, first obtain the logical switch and create a connection between the logical switch and the logical router. The logical router is the logical router of the virtual private cloud VPC in the cluster. After that, determine the DPU gateway in the cluster, and realize network interconnection with other clusters through the logical router, logical switch, and DPU gateway. In this way, when realizing cross-cluster network interconnection, the DPU in the cluster is used as a gateway device to realize network interconnection between clusters, avoiding the situation of occupying a large amount of CPU resources when clusters interact, indirectly reducing the impact on other tasks in the CPU, thereby improving the user experience.
[0063] In some embodiments, Figure 3 As shown, the method of determining the DPU gateway in the cluster may include the following steps:
[0064] S131. Obtain configuration parameters of each DPU in the cluster.
[0065] The configuration parameter is used to indicate whether the DPU is used as a gateway device.
[0066] For example, the hostname of the DPU may be configured to indicate that the DPU is selected as a gateway device.
[0067] In some embodiments, the configuration parameters of the DPU may be default or may be set by the user in real time according to actual conditions.
[0068] S132. Determine a DPU gateway from multiple DPUs in the cluster according to the configuration parameters.
[0069] In some embodiments, the OVS parameter ovn-is-interconn can also be set for the DPU gateway. When the DPU gateway is used, the ovn-is-interconn corresponding to the DPU of the gateway device is set to true to indicate that the DPU is being used as a gateway for cluster interconnection.
[0070] In the above scheme, the configuration parameters of each DPU in the cluster are obtained, and the DPU gateway is determined from multiple DPUs in the cluster according to the configuration parameters. In this way, the user can designate the DPU device as a gateway device at any time through the configuration parameters of the DPU, making the use of the DPU more flexible.
[0071] In some embodiments, Figure 4 As shown in the figure, the method of realizing network interconnection with other clusters through logical routers, logical switches, and DPU gateways may include the following steps:
[0072] S141. When traffic for accessing other clusters is received, a first DPU gateway is determined from the DPU gateways in the cluster.
[0073] Specifically, the method of determining the first DPU gateway from the DPU gateways in the cluster can be to determine any DPU gateway in the cluster as the first DPU gateway; or the load of each DPU gateway can be first counted, and the DPU gateway with the least load can be determined as the first DPU gateway. This application does not limit this.
[0074] S142: Determine at least one other DPU gateway from the global interconnect southbound database, and determine a second DPU gateway from the other DPU gateways.
[0075] Among them, other DPU gateways are DPU gateways corresponding to other clusters, which are pre-added to the global interconnect southbound database by other clusters.
[0076] Specifically, when traffic to access other clusters is received, the information of other clusters to which the traffic needs to reach can be known, so that other DPU gateways corresponding to the other clusters are read from the global interconnection southbound database according to the information of the other clusters. After that, a second DPU gateway for interconnecting with the cluster is determined from the other DPU gateways.
[0077] In some embodiments, the method of determining the second DPU gateway for interconnecting with the cluster from other DPU gateways may be to determine any DPU gateway among the other DPU gateways as the second DPU gateway.
[0078] S143. Transmit the traffic to other clusters via the logical router, the logical switch, the first DPU gateway, and the second DPU gateway.
[0079] In the above scheme, the first DPU gateway used for cluster interconnection in this cluster and the second DPU gateway used for cluster interconnection in other clusters can be determined, thereby realizing the interconnection between this cluster and other clusters, avoiding the situation where a large amount of CPU resources are occupied during cluster interaction, indirectly reducing the impact on other tasks in the CPU, and thus improving the user experience.
[0080] In some embodiments, the second DPU gateway may be determined from other DPU gateways by receiving routing broadcasts from other clusters and learning the second DPU gateway from routing paths in the routing broadcasts.
[0081] Exemplarily, the routing form learned from the routing path in the routing broadcast may be as follows:
[0082] root@master:~#kubectl-yolr-route-list vpc1 / / View the routing path of traffic in VPC1.
[0083] IPv4 Routes / / IPv4 routing configuration.
[0084] Route Table <main>: / / Default routing table.
[0085] 10.100.1.0 / 24169.254.100.104dst-ip(learned) / / The learned route, that is, the address of the second DPU gateway.
[0086] In some embodiments, Figure 5 As shown, the method of receiving routing broadcasts of other clusters and learning the second DPU gateway from the routing path in the routing broadcasts may specifically include the following steps:
[0087] S1421. Receive routing broadcasts from other clusters to obtain multiple routing paths corresponding to other clusters.
[0088] Specifically, each cluster will perform routing learning, and different clusters will also broadcast routing paths. In this way, the cluster can obtain multiple routing paths corresponding to other clusters through the routing broadcast content of other clusters.
[0089] S1422. Count the number of times each other DPU gateway appears in multiple routing paths.
[0090] For example, if other DPU gateways include the first gateway, the second gateway, and the third gateway; the routing broadcast content of other clusters includes 5 paths in total, the first path is the first gateway→A, the second path is the first gateway→B, the third path is the second gateway→A, the fourth path is the first gateway→C, and the fifth path is the second gateway→C; it can be obtained that the number of occurrences of the first gateway is 3, the number of occurrences of the second gateway is 2, and the number of occurrences of the third gateway is 0.
[0091] S1423. Determine the other DPU gateway with the least number of appearances as the second DPU gateway.
[0092] For example, the other DPU gateways include a first gateway, a second gateway, and a third gateway; and the first gateway appears 3 times, the second gateway appears 2 times, and the third gateway appears 0 times, then the third gateway is determined as the second DPU gateway.
[0093] In some embodiments, when there are multiple other DPU gateways with the least number of appearances, one of the other DPU gateways with the least number of appearances is selected as the second DPU gateway.
[0094] In the above scheme, the routing broadcasts of other clusters are received to obtain multiple routing paths corresponding to other clusters, and the number of times each other DPU gateway appears in multiple routing paths is counted, and then the other DPU gateway with the least number of appearances is determined as the second DPU gateway. In this way, other DPU gateway devices that are used less frequently can be selected for interconnection, which maximizes the quality of interconnection and improves user experience.
[0095] In some embodiments, after the traffic is transmitted to other clusters via the logical router, the logical switch, the first DPU gateway, and the second DPU gateway, the DPU-based cluster network interconnection method further includes broadcasting the routing path so that other clusters can select a suitable DPU gateway to interconnect with the cluster. In this way, after the routing path is determined, the routing path can be broadcasted in a timely manner, and the quality of interconnection with other clusters can be guaranteed as much as possible, thereby improving the user experience.
[0096] In some embodiments, after determining the DPU gateway in the cluster, the DPU-based cluster network interconnection method further includes: adding the DPU gateway information of the DPU gateway to the global interconnection southbound database, so that other clusters can access the cluster according to the DPU gateway information. In this way, the DPU gateway information of the DPU gateway is added to the global interconnection southbound database, so that other clusters can access the cluster according to the DPU gateway information, avoiding the situation where a large amount of CPU resources are occupied during cluster interaction, indirectly reducing the impact on other tasks in the CPU, and thus improving the user experience.
[0097] The embodiment of the present application can divide the functional modules of the cluster network interconnection device based on the DPU according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0098] like Figure 6 As shown, it is a structural diagram of a DPU-based cluster network interconnection device provided in an embodiment of the present application. The DPU-based cluster network interconnection device includes an acquisition module 71, a processing module 72 and a determination module 73.
[0099] The acquisition module 71 is used to obtain the logical switch; the processing module 72 is used to create a connection between the logical switch and the logical router; the logical router is the logical router of the virtual private cloud VPC in the cluster; the determination module 73 is used to determine the DPU gateway in the cluster; the processing module 72 is also used to realize network interconnection with other clusters through the logical router, logical switch and DPU gateway.
[0100] In some embodiments, the acquisition module 71 is specifically used to read the logical switch corresponding to the cluster from the global interconnect northbound database; the global interconnect northbound database is pre-created and can be accessed by any cluster.
[0101] In some embodiments, the determination module 73 is specifically used to: obtain configuration parameters of each DPU in the cluster; the configuration parameters are used to indicate whether the DPU is used as a gateway device; and determine a DPU gateway from multiple DPUs in the cluster according to the configuration parameters.
[0102] In some embodiments, Figure 7 As shown, the processing module 72 includes a determination submodule and a transmission submodule; the determination submodule is used to: when receiving traffic to access other clusters, determine a first DPU gateway from the DPU gateways in the cluster; determine at least one other DPU gateway from the global interconnect southbound database, and determine a second DPU gateway from the other DPU gateways; the other DPU gateways are DPU gateways corresponding to other clusters, which are pre-added to the global interconnect southbound database for other clusters; the transmission submodule is used to: transmit the traffic to other clusters via the logical router, the logical switch, the first DPU gateway, and the second DPU gateway.
[0103] In some embodiments, the determination submodule is specifically used to: receive routing broadcasts from other clusters to obtain multiple routing paths corresponding to other clusters; count the number of times each other DPU gateway appears in multiple routing paths; and determine the other DPU gateway with the least number of appearances as the second DPU gateway.
[0104] In some embodiments, the processing module 72 is also used to add the DPU gateway information of the DPU gateway to the global interconnect southbound database after determining the DPU gateway in the cluster; the DPU gateway information is used by other clusters to access the cluster based on the DPU gateway information.
[0105] The DPU-based cluster network interconnection device provided in this embodiment can execute the DPU-based cluster network interconnection method provided in the above method embodiment. Its implementation principle and technical effect are similar to those of the above method and will not be repeated here.
[0106] Figure 8 An electronic device according to an exemplary embodiment may include a processor 802, and the processor 802 is used to execute application code, so as to implement the cluster network interconnection method based on DPU in the present application.
[0107] The processor 802 may be a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0108] like Figure 8 As shown, the electronic device may further include a memory 803. The memory 803 is used to store application program codes for executing the solution of the present application, and the execution is controlled by the processor 802.
[0109] The memory 803 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 803 may exist independently and be connected to the processor 802 via the bus 804. The memory 803 may also be integrated with the processor 802.
[0110] like Figure 8 As shown, the electronic device may further include a communication interface 801, wherein the communication interface 801, the processor 802, and the memory 803 may be coupled to each other, for example, via a bus 804. The communication interface 801 is used to exchange information with other devices, for example, to support information exchange between the electronic device and other devices.
[0111] It should be pointed out that Figure 8 The device structure shown in the figure does not constitute a limitation on the electronic device, except Figure 8 In addition to the components shown, the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. The electronic device provided in this embodiment can execute the cluster network interconnection method based on DPU provided in the above method embodiment, and its implementation principle and technical effect are similar to the above method, which will not be repeated here.
[0112] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the DPU-based cluster network interconnection method in the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0113] The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0114] An embodiment of the present application provides a computer program product, which stores a computer program. When the computer program is executed by a processor, each process of the cluster network interconnection method based on DPU in the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0115] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.
[0116] In this application, memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0117] In this application, computer-readable media includes permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data and carrier waves.
[0118] 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 device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0119] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application 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.< / main>
Claims
1. A cluster network interconnection method based on DPU, characterized in that: include: Get the logical switch; Creating a connection between the logical switch and the logical router; The logical router is a logical router of a virtual private cloud VPC in the cluster; Determining a DPU gateway in the cluster; The logical router, the logical switch, and the DPU gateway are used together to realize network interconnection with other clusters.
2. The cluster network interconnection method according to claim 1, characterized in that: The obtaining of the logical switch comprises: The logical switch corresponding to the cluster is read from a global interconnect northbound database; the global interconnect northbound database is pre-created and accessible to any cluster.
3. The cluster network interconnection method according to claim 1, characterized in that: The determining of the DPU gateway in the cluster includes: Obtaining configuration parameters of each DPU in the cluster; the configuration parameters are used to indicate whether the DPU is used as a gateway device; A DPU gateway is determined from the multiple DPUs in the cluster according to the configuration parameters.
4. The cluster network interconnection method according to claim 1, characterized in that: The interconnection with other clusters through the logical router, the logical switch, and the DPU gateway includes: When receiving traffic to access other clusters, determining a first DPU gateway from the DPU gateways in the cluster; Determine at least one other DPU gateway from the global interconnect southbound database, and determine a second DPU gateway from the other DPU gateways; the other DPU gateways are DPU gateways corresponding to the other clusters, and are pre-added to the global interconnect southbound database for the other clusters; The traffic is transmitted to the other clusters via the logical router, the logical switch, the first DPU gateway, and the second DPU gateway.
5. The cluster network interconnection method according to claim 4, characterized in that: The determining the second DPU gateway from the other DPU gateways includes: Receiving routing broadcasts of the other clusters, and obtaining multiple routing paths corresponding to the other clusters; Counting the number of occurrences of each of the other DPU gateways in the multiple routing paths; The other DPU gateway with the least number of appearances is determined as the second DPU gateway.
6. The cluster network interconnection method according to claim 1, characterized in that: After determining the DPU gateway in the cluster, the method further includes: The DPU gateway information of the DPU gateway is added to the global interconnected southbound database; the DPU gateway information is used by other clusters to access the cluster according to the DPU gateway information.
7. A cluster network interconnection device based on DPU, characterized in that: include: An acquisition module, used to acquire a logical switch; A processing module, configured to create a connection between the logical switch and the logical router; The logical router is a logical router of a virtual private cloud VPC in the cluster; A determination module, used to determine the DPU gateway in the cluster; The processing module is also used to realize network interconnection with other clusters through the logical router, the logical switch, and the DPU gateway.
8. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the DPU-based cluster network interconnection method as described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the DPU-based cluster network interconnection method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that When the computer program product runs on a computer, the computer is enabled to implement the DPU-based cluster network interconnection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Trunking communication method, device, system and equipment and readable storage medium
CN114866467A
Systems and methods for increased throughput and scalability
CN117223261A
Gateway unloading method and device based on DPU network card, electronic equipment and storage medium
CN117792830A
Distributed gateway configuration method and device based on DPU, equipment and medium
CN118524015A
Data processing unit for compute nodes and storage nodes
US20190012278A1
Cited By
Peer-to-peer optical interconnection circuit switching networking method and system based on DPU
CN119767175A
