Multi-cluster network communication method and device, computer equipment, readable storage medium and program product

By classifying the molecular cluster in multi -cluster scenes and using routing devices and privatized network devices for data packet routing, the performance problems brought by network tunnel communication in traditional technologies have been solved, and efficient multi -set network communication is achieved.

CN119363839APending Publication Date: 2025-01-24BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411496622.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In multi-cluster scenarios, traditional technology uses network tunnels to communicate with container networks, resulting in data packets and unpacking occupying more network bandwidth, resulting in poor performance.

Method used

By dividing the first cluster into sub-clusters, each sub-cluster corresponds to a routing device, routes the data packet to the target routing device, and routes the data packet to the target container group in the second cluster according to the global routing table through the privatized network device to avoid constructing Network tunnel.

Benefits of technology

This method does not require packets and packaging data packages, which improves the performance of multi -cluster network communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363839A_ABST
    Figure CN119363839A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-cluster network communication method and device, computer equipment, a computer readable storage medium and a computer program product. The method is applied to a first cluster, the first cluster divides a first node of the same network segment into a sub-cluster, each sub-cluster corresponds to a first routing device, and the method comprises the following steps: acquiring a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster; routing the data packet to a first target routing device corresponding to the first container group; sending the data packet and the destination address to a private network device based on the first target routing device; and the privatized network equipment is used for routing the data packet and the destination address to second target routing equipment in the second cluster according to the global routing table, so that the second target routing equipment transmits the data packet to a target container group corresponding to the destination address. By adopting the method, the performance of multi-cluster network communication can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a multi-cluster network communication method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of cloud-native technologies, the increase in business volume, and the requirements for high availability and disaster recovery, more and more enterprises are using multi-cluster containerized deployment for their business applications. However, in multi-cluster scenarios, it is necessary to connect the container networks in each cluster to enable communication between multiple services distributed in different clusters.

[0003] In traditional technology, communication channels between different clusters are established by building network tunnels in different clusters. When the first Pod in the first cluster needs to send a data packet to the second Pod in the second cluster, a network tunnel needs to be established with the cloud, and the data packet is encapsulated using the network tunnel. The encapsulated data packet is sent to the data receiving end, i.e., the second Pod, through the cloud. The data packet is unpacked by the second Pod to complete the communication between the container networks in multiple clusters.

[0004] However, in the current traditional technology, since the communication of container networks in multiple clusters that build network tunnels requires packet packaging and unpacking, it will occupy more network bandwidth resources, resulting in poor performance of multi-cluster network communication. Summary of the invention

[0005] Based on this, it is necessary to provide a multi-cluster network communication method, apparatus, computer equipment, computer-readable storage medium and computer program product to address the above technical issues.

[0006] In a first aspect, the present application provides a multi-cluster network communication method, the method being applied to a first cluster, the first cluster dividing a first node in the same network segment into a sub-cluster, each of the sub-cluster corresponding to a first routing device, including:

[0007] Obtaining a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster;

[0008] Routing the data packet to a first target routing device corresponding to the first container group;

[0009] The data packet and the destination address are sent to a privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to a second target routing device in a second cluster according to a global routing table, so that the second target routing device transmits the data packet to a target container group corresponding to the destination address.

[0010] In one embodiment, before obtaining the data packet and the destination address corresponding to the communication request initiated by the first container group in the first cluster, the method further includes:

[0011] For each default routing device in each sub-cluster, according to each node associated with the default routing device, obtain routing information of each container group corresponding to each node;

[0012] Constructing a network segment routing table corresponding to each of the default routing devices based on each of the default routing devices and the routing information;

[0013] The network segment routing table is shared with a private network device, and the network segment routing table is shared with other default routing devices according to the private network device, and each network segment routing table is used to construct a global routing table.

[0014] In one embodiment, routing the data packet to a first target routing device corresponding to the first container group includes:

[0015] Routing the destination address and the data packet to a first target node corresponding to the first container group;

[0016] The destination address is matched according to a first routing table corresponding to the first target node to obtain a first matching result, and the data packet is routed to a first target routing device based on the first matching result.

[0017] In a second aspect, the present application provides a multi-cluster network communication method, the method being applied to a second cluster, the method comprising:

[0018] Acquire a data packet and a destination address; the data packet and the destination address are sent to a privatized network device based on a first target routing device, the privatized network device is used to route the data packet and the destination address to a second target routing device in the second cluster according to a global routing table; the second target routing device includes a global routing table;

[0019] Based on the second target routing device, the global routing table and the destination address, the data packet is routed to the target container group corresponding to the destination address in the second cluster.

[0020] In one embodiment, before obtaining the data packet and the destination address, the method further includes:

[0021] Acquire a network segment routing table shared by the private network devices through each second routing device;

[0022] For each second routing device, a global routing table is constructed according to the network segment routing table shared by the privatized network device and the network segment routing table included in the second routing device.

[0023] In one embodiment, routing the data packet to the target container group corresponding to the destination address in the second cluster based on the second target routing device, the global routing table and the destination address includes:

[0024] Determine a target node corresponding to the destination address based on the second target routing device and the global routing table, and route the data packet to the target node based on the second target routing device;

[0025] The data packet is routed to a target container group according to the target node.

[0026] In a third aspect, the present application further provides a multi-cluster network communication device, the device being applied to a first cluster, the first cluster dividing a first node in the same network segment into a sub-cluster, each of the sub-cluster corresponding to a first routing device, including:

[0027] A first acquisition module, configured to acquire a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster;

[0028] A first routing module, configured to route the data packet to a first target routing device corresponding to the first container group;

[0029] A second routing module is used to send the data packet and the destination address to a privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to a second target routing device in a second cluster according to a global routing table, so that the second target routing device transmits the data packet to a target container group corresponding to the destination address.

[0030] In one embodiment, the device further comprises:

[0031] A second acquisition module is used to acquire, for each default routing device in each sub-cluster, routing information of each container group corresponding to each node according to each node associated with the default routing device;

[0032] A first construction module, configured to construct a network segment routing table corresponding to each of the default routing devices based on each of the default routing devices and the routing information;

[0033] A sharing module is used to share the network segment routing table with a private network device, and to share the network segment routing table with other default routing devices according to the private network device, and each network segment routing table is used to construct a global routing table.

[0034] In one of the embodiments, the first routing module is specifically used to route the destination address and the data packet to a first target node corresponding to the first container group;

[0035] The destination address is matched according to a first routing table corresponding to the first target node to obtain a first matching result, and the data packet is routed to a first target routing device based on the first matching result.

[0036] In a fourth aspect, the present application further provides a multi-cluster network communication device, which is applied to the second cluster, including:

[0037] A third acquisition module is used to acquire a data packet and a destination address; the data packet and the destination address are sent to a privatized network device based on a first target routing device, and the privatized network device is used to route the data packet and the destination address to a second target routing device in the second cluster according to a global routing table; the second target routing device includes a global routing table;

[0038] The third routing module is configured to route the data packet to a target container group corresponding to the destination address in the second cluster based on the second target routing device, the global routing table and the destination address.

[0039] In one embodiment, the device further comprises:

[0040] A fourth acquisition module, used for acquiring a network segment routing table shared by the private network devices through each second routing device;

[0041] The second construction module is used to construct a global routing table for each second routing device according to the network segment routing table shared by the privatized network device and the network segment routing table included in the second routing device.

[0042] In one of the embodiments, the third routing module is specifically used to determine the target node corresponding to the destination address based on the second target routing device and the global routing table, and route the data packet to the target node based on the second target routing device;

[0043] The data packet is routed to a target container group according to the target node.

[0044] In a fifth aspect, the present application also provides a multi-cluster network communication system, the system comprising:

[0045] The first cluster is used to obtain a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster; route the data packet to a first target routing device corresponding to the first container group; send the data packet and the destination address to a privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to a second target routing device in the second cluster according to a global routing table, so that the second target routing device transmits the data packet to a target container group corresponding to the destination address;

[0046] A privatized network device, used for routing the data packet and the destination address to a second target routing device;

[0047] The second cluster is used to transmit the data packet to a target container group corresponding to the destination address.

[0048] In one of the embodiments, the privatized network device is specifically used to obtain a first network segment routing table shared by each first routing device and a second network segment routing table shared by each second routing device;

[0049] A global routing table is constructed according to each of the first network segment routing tables and each of the second network segment routing tables.

[0050] In one of the embodiments, the privatized network device is specifically used to determine the second target routing device corresponding to the destination address in the global routing table;

[0051] The data packet is routed to the second target device according to the address corresponding to the second target routing device.

[0052] In a sixth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0053] Obtaining a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster;

[0054] Routing the data packet to a first target routing device corresponding to the first container group;

[0055] The data packet and the destination address are sent to a privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to a second target routing device in a second cluster according to a global routing table, so that the second target routing device transmits the data packet to a target container group corresponding to the destination address.

[0056] In a seventh aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0057] Obtaining a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster;

[0058] Routing the data packet to a first target routing device corresponding to the first container group;

[0059] The data packet and the destination address are sent to a privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to a second target routing device in a second cluster according to a global routing table, so that the second target routing device transmits the data packet to a target container group corresponding to the destination address.

[0060] In an eighth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0061] Obtaining a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster;

[0062] Routing the data packet to a first target routing device corresponding to the first container group;

[0063] The data packet and the destination address are sent to a privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to a second target routing device in a second cluster according to a global routing table, so that the second target routing device transmits the data packet to a target container group corresponding to the destination address.

[0064] The above-mentioned multi-cluster network communication method, device, computer equipment, computer-readable storage medium and computer program product obtain the data packet and destination address corresponding to the communication request initiated by the first container group in the first cluster; route the data packet to the first target routing device corresponding to the first container group; send the data packet and destination address to the privatized network device based on the first target routing device; the privatized network device is used to route the data packet and destination address to the second target routing device in the second cluster according to the global routing table, so that the second target routing device transmits the data packet to the target container group corresponding to the destination address. With this method, the data packet and destination address are sent to the privatized network device through the first target routing device, the data packet and destination address are routed to the second target routing device by the privatized network device, and then the data packet is sent to the second container group through the second target routing device to realize the network connection between multiple clusters. There is no need to build an overlay (network virtualization technology) network processing of the network tunnel, which can avoid packetization and unpacking of the data packet, thereby improving the performance of multi-cluster network communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0066] Figure 1 An application environment diagram of a multi-cluster network communication method in one embodiment;

[0067] Figure 2 A schematic diagram of a flow chart of a method for a first cluster to perform multi-cluster network communication in one embodiment;

[0068] Figure 3 A schematic diagram of a multi-cluster network architecture in one embodiment;

[0069] Figure 4 A schematic diagram of a process of sharing a network segment routing table in one embodiment;

[0070] Figure 5 A schematic diagram of a process of routing a data packet by a first cluster in an embodiment;

[0071] Figure 6 A schematic diagram of a process of a second cluster performing multi-cluster network communication in one embodiment;

[0072] Figure 7 A schematic diagram of a process for constructing a global routing table in one embodiment;

[0073] Figure 8 A schematic diagram of a process of routing a data packet by a second cluster in one embodiment;

[0074] Fig. 9 is a structural block diagram of a multi-cluster network communication device of a first cluster in an embodiment;

[0075] Fig.10 is a structural block diagram of a multi-cluster network communication device of a second cluster in one embodiment;

[0076] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0078] In order to more clearly explain the relevant technologies involved in this application, the relevant professional terms and English-specific vocabulary that may be involved in this application are explained below.

[0079] Kubernetes (K8S for short): A container cluster management system used to manage containerized applications on multiple hosts in a cloud platform.

[0080] Node, a native resource object in a K8S cluster: Node is the basic computing unit in a K8S cluster, representing the server in the cluster. Each Node has a unique IP (Internet Protocol) address and is responsible for hosting the running Pod.

[0081] Pod, the native resource object in the K8S cluster: Pod is the smallest deployable unit in K8S, representing a group of closely related containers. The containers in the Pod share network and storage resources and run distributedly on the Nodes of the cluster. Each Pod also has a unique IP address.

[0082] Native resource object Service in K8S cluster: Service is the access entry for defining a group of Pods in K8S, similar to a proxy service. Service provides a stable IP address and supports basic load balancing to distribute requests to the corresponding Pods.

[0083] BGP (Border Gateway Protocol): BGP is a widely used and mature routing protocol that allows different routers to exchange routing information to achieve efficient delivery of data packets.

[0084] BGP Router Reflector: A BGP configuration that receives routing updates from a specific BGP routing device and reflects these updates to other routing devices, simplifying the management of the BGP network.

[0085] Dynamic Neighbors feature: A BGP configuration method that allows the router to automatically identify and establish adjacency with new nodes based on the specified network segment, avoiding manual configuration of the IP address of each node, thereby adapting to the frequent addition and deletion of nodes in the K8S cluster.

[0086] Default route: A route record in the Linux routing table that specifies the next-hop address to which a packet should be sent when the destination address of the packet does not match any other route.

[0087] Default routing device: The specific routing device corresponding to the next hop address specified in the Linux routing table. For example, on a Linux machine, if a default route is defined in its routing table, all traffic that does not match a directly connected route will be sent to the default routing device.

[0088] The multi-cluster network communication method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the first cluster 102 and the second cluster 104 communicate with the privatized network device 106 through the network respectively. The first cluster 102 obtains the data packet and the destination address corresponding to the communication request initiated by the first container group in the first cluster 102; the first cluster 102 routes the data packet to the first target routing device corresponding to the first container group; the first cluster 102 sends the data packet and the destination address to the privatized network device 106 based on the first target routing device; the privatized network device 106 is used to route the data packet and the destination address to the second target routing device in the second cluster 104 according to the global routing table, so that the second target routing device transmits the data packet to the target container group corresponding to the destination address. Among them, the first cluster 102 and the second cluster 104 can be independent physical servers, or they can be server clusters or distributed systems composed of multiple physical servers.

[0089] In an exemplary embodiment, Figure 2 As shown, a multi-cluster network communication method is provided, and the method is applied to Figure 1Taking the first cluster 102 in the example as an example, the method includes the following steps 202 to 206. Among them:

[0090] Step 202: Obtain a data packet and a destination address corresponding to a communication request initiated by a first container group in a first cluster.

[0091] The first cluster divides the first nodes of the same network segment into a sub-cluster, and each sub-cluster corresponds to a first routing device, such as Figure 3 As shown, each K8S cluster contains multiple interconnected servers, which are divided into multiple groups of servers, i.e., multiple sub-clusters. The servers in each sub-cluster have achieved Layer 2 network connectivity. The servers in each sub-cluster share a routing device (first routing device), i.e., multiple servers in a sub-cluster belong to the same network segment, and the first routing device is the default router device of the sub-cluster. The three-layer network connectivity is achieved between different sub-clusters with the help of the first routing device. For example, Node01 to Node0253 are the first nodes in the same network segment, and the first cluster divides Node01 to Node0253 into a sub-cluster, and the first routing device corresponding to the sub-cluster is Router10.

[0092] In one of the embodiments, the first cluster and the second cluster are Kubernetes (hereinafter referred to as "K8S") clusters as an example for illustration. The clusters described in the following embodiments of this application are all K8S clusters. In the following embodiments, "K8S cluster" is referred to as "cluster". The business application adopts multi-cluster containerized deployment, such as Figure 3 As shown, Figure 3 In the K8S cluster 1, there are multiple first nodes, for example, Node01, Node02, Node11, etc. Each first node also contains multiple container groups (Pod, Figure 3 ), wherein the container groups in the following embodiments are all Pods. When a first container group (Pod) in K8S cluster 1 (K8S cluster 1 is the first cluster) initiates a communication request, the communication request includes a corresponding data packet and a destination address, wherein the destination address may be included in the data packet, and the destination address is the IP address or service entry of the container group in the other K8S cluster (as the second cluster), and the container group corresponding to the destination address in the second cluster is used as the target container group.

[0093] Step 204: Routing the data packet to a first target routing device corresponding to the first container group.

[0094] In one embodiment, each cluster pre-installs a CNI (Container Network Interface, API interface of container network) plug-in and turns on BGP mode. The CNI plug-in can be Calico or Cilium, where Calico and Cilium are the two most mainstream and stable CNI plug-in implementations in the K8S ecosystem. Calico mainly relies on the network protocol stack of the Linux kernel, and Cilium mainly relies on eBPF technology. Both support the use of the BGP protocol. At this time, each first node can act as a routing device to transmit data packets initiated by the first container group it contains. The first container group that initiates a communication request sends a data packet to the first target node where the first container group is located, and then the first cluster routes the data packet to the first target routing device corresponding to the first target node through the first target node. Among them, the first target device is the default routing device corresponding to the first container group that initiates the communication request among the default routing devices of the first cluster.

[0095] Step 206: Send the data packet and the destination address to the private network device based on the first target routing device.

[0096] The privatized network device is used to route the data packet and the destination address to the second target routing device in the second cluster according to the global routing table, so that the second target routing device transmits the data packet to the target container group corresponding to the destination address.

[0097] Among them, the first cluster represents the sending cluster of the data packet, and the second cluster represents the receiving cluster of the data packet, that is, the first container group (Pod) in the first cluster transmits the data packet across clusters to the target container group (Pod) in the second cluster. The embodiment of the present application does not limit the first cluster and the second cluster.

[0098] In one embodiment, the first cluster receives a data packet and a destination address sent by the first container group through a first routing device, and the first routing device has a global routing table, which includes the network topology, reachability information, and optimal forwarding path of each cluster, that is, routing information of each node in each cluster and the container group in each node. The privatized network device can be a border routing device, which can be applied to private cloud scenarios or non-cloud privatization scenarios. This embodiment does not limit the application scenario of the border routing device.

[0099] The first cluster determines the next hop corresponding to the data packet and the destination address in the privatized network device through the first target routing device and in combination with the global routing table. The first target routing device sends the data packet and the destination address to the privatized network device according to the corresponding next hop in the privatized network device, and further transmits and processes the data packet through the privatized network device.

[0100] Specifically, connecting the container network across clusters is achieved through network communication between different clusters using Pod IP and Service Cluster IP. In the K8S networking structure of multi-cluster communication in this embodiment, each node (server) of each sub-cluster (a group of nodes in the same network segment) in each cluster acts as a BGP Router Reflector Client, and the default routing device of the sub-cluster acts as a BGP Router Reflector, so that the default routing device of each sub-cluster can learn the routing information of the container network (including Pod IP and Service Cluster IP).

[0101] For Pod IP, after installing and starting the CNI plug-in (such as Calico or Cilium) in each cluster, each node in the cluster can act as a BGP routing device, sharing the routing information of the container group (Pod) to the default routing device through the BGP protocol. At this time, when the Pod of the first cluster needs to communicate with the Pod of the second cluster, the IP address of the target Pod can be learned through the BGP protocol, thereby realizing cross-cluster routing forwarding.

[0102] For Service ClusterIP, Kubernetes Service usually allocates a ClusterIP as the access entrance for Pods in the same cluster. Through BGP, the default routing device of the node can build a corresponding global routing table based on the shared network segment routing table, so that the request of Service ClusterIP as the destination address can be routed to any of the default routing devices of each sub-cluster in the target cluster, and then the next hop can access the target Service on the target cluster, so that the request for the destination address Service ClusterIP can be routed to any Node in the cluster to which the Service belongs.

[0103] In the above multi-cluster network communication method, a data packet and a destination address are sent to a privatized network device through a first target routing device, and the data packet and the destination address are routed to a second target routing device by using the privatized network device, and then the data packet is sent to a second container group through the second target routing device to realize network connectivity between multiple clusters. There is no need to construct an overlay (network virtualization technology) network processing of a network tunnel, and the data packet can be avoided from being packaged and unpacked, thereby improving the performance of multi-cluster network communication.

[0104] In an exemplary embodiment, before the first cluster and the second cluster communicate across the cluster network, it is necessary to pre-build the K8S networking structure. Specifically, the user determines the number of clusters and the number of nodes in each cluster according to the business application. The number of nodes is used to determine the number of subnets to be used, as well as the number of default routing devices as the default routes of the subnets, and plan the planned network segments of the nodes, pods and services in each cluster. Among them, the default routing device is used as the default route of the subnet. The default routing device needs to support the BGP protocol and the Dynamic Neighbors function characteristics, and the nodes, pods and services in each cluster correspond to unique network segments, and ensure that the network segments corresponding to the nodes, pods and services are globally unique in the private network within the user's enterprise. On each default routing device, use the Dynamic Neighbors function to configure the network segment corresponding to the node of the cluster it is responsible for, so that the connected node can act as a BGP Router Reflector Client.

[0105] In an exemplary embodiment, Figure 4 As shown, before step 202, the method further includes steps 402 to 406. Among them:

[0106] Step 402 : For each default routing device in each sub-cluster, obtain routing information of each container group corresponding to each node according to each node associated with the default routing device.

[0107] In one of the embodiments, after the planning and construction of each cluster is completed, the corresponding CNI plug-in is installed in all clusters to ensure that the Node, Pod and Service network segments of each cluster are consistent with the planned network segments. The CNI plug-in installed in each cluster can be Calico or Cilium. This embodiment does not limit the type of CNI plug-in installed in each cluster. A label is added to each Node to represent the default routing device to which the Node belongs, for example, router=router1, router=router2. Furthermore, a group of Nodes using the same default routing device correspond to the same label, and the label can be used to set the Node of a certain BGP configuration later. The BGP configuration needs to use the above two CNI plug-ins to configure the corresponding resource objects provided by BGP.

[0108] The user responsible for cluster construction, in each cluster, marks the nodes in the sub-clusters that use the same default routing device with the same label. For the nodes with the same node label in each sub-cluster, create a BGP Peer configuration. The BGP Peer configuration is mainly implemented through the resource objects provided by the Calico or Cilium CNI plug-in after the BGP mode is turned on. Calico uses BGPPeer, and Cilium uses CiliumBGPPeeringPolicy. Both use nodeSelector to specify which nodes in the cluster the BGP configuration described by the resource object acts on. Among them, the configured Service ClusterIP routing information can be learned by the default routing device. The configuration methods of the two CNI plug-ins are different. Calico is configured through BGPConfiguration; Cilium is configured through CiliumBGPPeeringPolicy.

[0109] In each cluster, use the corresponding CNI plugin to configure BGP related resource objects, such as Calico's BGPConfiguration and BGPPeer, or Cilium's CiliumBGPPeeringPolicy. Then, according to the number of default routing devices required by the cluster, configure the corresponding number of BGP Peers. Each BGP Peer resource object should be configured according to the label set for the Node in the above steps to determine the default routing device it connects to.

[0110] After each cluster completes resource configuration and successfully turns on BGP mode, the Node in each cluster can act as a routing device that supports the BGP protocol, and share the routing information corresponding to each Pod in the Node to the default routing device. That is, each default routing device in the first cluster can receive the routing information of each container group shared by the node it contains, and save the routing information of the container group contained in each node.

[0111] Step 404: construct a network segment routing table corresponding to each default routing device based on each default routing device and routing information.

[0112] In one of the embodiments, the default routing device in the first cluster confirms the mapping relationship between the IP address of each node and its container group and the corresponding default routing device through the collected routing information, as the network segment routing table corresponding to the default routing device, and the default routing device can determine the routing path of the data packet through the network segment routing table. For example, there are three Nodes in the cluster, namely Node A, Node B and Node C, each of which has multiple Pods. The IP address range of the Pod shared by Node A is 192.168.1.0 / 24, Node B shares 192.168.2.0 / 24, and Node C shares 192.168.3.0 / 24. After receiving the shared routing information, the default routing devices corresponding to the three Nodes will establish a routing table containing the routing information to facilitate effective routing in the network.

[0113] Step 406, sharing the network segment routing table with the private network device, and sharing the network segment routing table with other default routing devices according to the private network device.

[0114] Among them, the routing table of each network segment is used to build the global routing table.

[0115] In one of the embodiments, the first cluster shares the routing table corresponding to each routing device to the private network device through each routing device, and after each cluster completes the networking, the default routing device in each cluster shares the network segment routing table it constructs to the private network device, ensuring that the private network device can obtain the network information in each cluster and provide a scheduling basis for multi-cluster network communications.

[0116] In an optional embodiment, the user can adjust the number of clusters, nodes, and Pods according to business needs. The user completes the configuration of Dynamic Neighbors for the nodes of the same subcluster corresponding to each routing device through the default routing device. With the Dynamic Neighbors feature, the user does not need to configure Static Neighbors on the default router of the Node every time K8S adds or deletes a node, because this feature allows configuration of a network segment rather than a single IP address, which minimizes the network configuration work.

[0117] Specifically, if a cluster node needs to be added to add a Pod, the user first determines whether the current cluster contains an available Node address based on the pre-set planned network segment. If an available Node address exists, select from multiple available Node addresses and determine the address of the default routing device corresponding to the selected address. The new Node (server) is connected to the default routing device through the address of the default routing device, and a label is added to indicate the default routing device to which the Node belongs, thereby completing the addition of the new Node. If there is no available Node address, the user needs to plan a new Node network segment, add a default routing device for the new Node network segment, configure DynamicNeighbors for the newly planned Node network segment on the new default routing device, and then obtain an available address in the new Node network segment, determine the address of the corresponding default routing device, and add a label to the new Node according to the same principle as above to complete the addition of the new Node.

[0118] If you need to delete a node in the cluster, first determine whether the default routing device corresponding to the node to be deleted contains other nodes. If there are other nodes on the default routing device, directly delete the current node to be deleted; if there are no other nodes on the default routing device, after deleting the current node to be deleted, notify the user to confirm the removal of the default routing device.

[0119] For adding a cluster, the default routing device and Node can be added according to the same operation as for a single cluster. At this time, the newly added cluster can communicate with the container groups between other clusters by default. The specific process of adding the default routing device, Node and Pod will not be repeated in this embodiment.

[0120] To remove a cluster, you first need to clean up all business applications in the cluster, then destroy the cluster, and finally notify the user to remove and recycle the default routing devices used by all nodes in the cluster.

[0121] In an optional embodiment, as the Pod in the cluster changes dynamically (e.g., creation, deletion, or migration of the Pod), the first cluster needs to regularly update and maintain the global routing table to ensure that all devices have the latest network information. Specifically, after the Node or the Pod in the Node is adjusted, the Node sends the updated network segment routing table to the private network device and other default routing devices.

[0122] In this embodiment, the default routing device is used to obtain the routing information of each node including the container group and construct a network segment routing table, and the network segment routing table is shared among the privatized network device and all other default routing devices of each cluster, so that the default routing device of the entire cluster has a global routing table as the basis for cross-cluster network communication, thereby realizing multi-cluster network communication.

[0123] In an exemplary embodiment, Figure 5 As shown, step 204 includes steps 502 to 504. Among them:

[0124] Step 502: Routing the destination address and the data packet to the first target node corresponding to the first container group.

[0125] In one of the embodiments, the first cluster sends the data packet and the destination address to the next hop of the container group through the container group that initiates the communication request. Since the container group is deployed in the first target node, the first target node corresponding to the container group is used as the next hop, and the destination address and the data packet are directly sent to the first target node.

[0126] Step 504: Match the destination address according to the first routing table corresponding to the first target node to obtain a first matching result, and route the data packet to the first target routing device based on the first matching result.

[0127] In one of the embodiments, the first cluster accesses the first routing table of the first target node to confirm the matching rule between its configuration and the destination address. Since the destination address is the address of the target container group in the second cluster, the matching result of the destination address and the first routing table is that there is no direct route in the first routing table that matches the destination address. The first target node routes the data packet to the default route, that is, the first target node determines the next hop of the data packet as the first target routing device.

[0128] In this embodiment, by matching the destination address with the first routing table of the first target node, the destination address and the data packet can be accurately sent to the first target node, and by direct routing, the packet and destination address are avoided from being encapsulated, thereby improving the performance of data communication within the first cluster.

[0129] In an exemplary embodiment, Figure 6 As shown, a multi-cluster network communication method is provided, and the method is applied to Figure 1 Taking the second cluster 104 in FIG. 1 as an example, the method includes the following steps 602 to 604. Among them:

[0130] Step 602, obtaining the data packet and the destination address.

[0131] Among them, the data packet and the destination address are sent to the privatized network device based on the first target routing device, and the privatized network device is used to route the data packet and the destination address to the second target routing device in the second cluster according to the global routing table; the second target routing device includes a global routing table.

[0132] In one embodiment, the second cluster routes the data packet and destination address corresponding to the communication request initiated by the first container to the second target routing device in the second cluster through the routing of the privatized network device, so as to obtain the data packet and destination address sent by the first container group in the first cluster. After building a multi-cluster network, the privatized network device receives the network segment routing table shared by each default routing device in each cluster through the BGP protocol, combines the routing information of each node and the container group in each node contained in each network segment routing table, and builds a global routing table. After the privatized network device receives the data packet and destination address, it matches the destination address according to the global routing table, determines the second target routing device among the multiple default routing devices in the second cluster, and enables the second cluster to obtain the data packet and destination address.

[0133] Step 604 : Based on the second target routing device, the global routing table and the destination address, the data packet is routed to the target container group corresponding to the destination address in the second cluster.

[0134] In one embodiment, the second cluster matches the global routing table and the destination address through the second target routing device, the global routing table includes all nodes of the network segment to which the second target routing device belongs, and the routing information of each container group included in each node, determines the target container group according to the destination address, and reversely determines the target node corresponding to the target container group. The second cluster routes the destination address and the data packet to the target node, and forwards the data packet to the target container group through the target node.

[0135] In this embodiment, the second routing device matches the destination address by matching the global routing table, and directly routes the data packet to the IP address of the target container group, without unpacking and repackaging the data packet and the destination address. The data packet can remain in its original state during the routing process, reducing communication delays and the amount of flowing data on the network, effectively reducing the performance loss of the container network, and thereby improving the performance of multi-cluster communication.

[0136] In an exemplary embodiment, Figure 7 As shown, before step 602, the method further includes steps 702 to 704. Among them:

[0137] Step 702: Acquire a network segment routing table shared by the private network devices through each second routing device.

[0138] In one of the embodiments, after completing the multi-cluster networking, the second cluster uses the BGP protocol to obtain the network segment routing table shared by the privatized network device through multiple second routing devices that serve as default routing devices. The network segment routing table is shared by the default routing device of each sub-cluster in all clusters, and contains the routing information of the nodes and container groups associated with all other default routing devices in the entire multi-cluster except the current second routing device.

[0139] Step 704: for each second routing device, a global routing table is constructed according to the network segment routing table shared by the privatized network device and the network segment routing table included in the second routing device.

[0140] In one of the embodiments, each second routing device in the second cluster contains routing information of each node and container group corresponding to itself, that is, the second routing device itself contains its own network segment routing table, and combines its own network segment routing table with the network segment routing tables of other default routing devices shared by the privatized network devices to construct a global routing table.

[0141] In this embodiment, a global routing table is constructed by the second routing device, so that each second routing device in the second cluster contains routing information of nodes and container groups in the entire cluster as a basis for cross-cluster network communication, thereby realizing multi-cluster network communication.

[0142] In an exemplary embodiment, Figure 8 As shown, step 604 includes steps 802 to 804. Among them:

[0143] Step 802: determine a target node corresponding to the destination address based on the second target routing device and the global routing table, and route the data packet to the target node based on the second target routing device.

[0144] In one of the embodiments, the second cluster matches the global routing table and the destination address through the second target routing device, reversely determines the target container group corresponding to the destination address, and uses the second node to which the target container group belongs as the target node among the multiple second nodes associated with the second target routing device, and routes the data packet and the destination address to the target node through the second routing device.

[0145] Step 804 : Routing the data packet to the target container group according to the target node.

[0146] In one embodiment, after the data packet and the destination address are transmitted to the target node, the second cluster routes the data packet through the target node to the target container group corresponding to the destination address, that is, routes the data packet to the IP address corresponding to the destination address.

[0147] In this embodiment, the data packet is directly routed to the IP address of the target container group through the target node, without the need to unpack and repack the data packet and the destination address. The data packet can remain in its original state during the routing process, reducing communication delays and the amount of flowing data on the network, effectively reducing the performance loss of the container network, and thereby improving the performance of multi-cluster communication.

[0148] In an exemplary embodiment, a multi-cluster network communication system is provided, the system comprising:

[0149] The first cluster is used to obtain a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster; route the data packet to a first target routing device corresponding to the first container group; send the data packet and the destination address to a privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to a second target routing device in the second cluster according to a global routing table, so that the second target routing device transmits the data packet to a target container group corresponding to the destination address;

[0150] A privatized network device for routing the data packet and the destination address to a second target routing device;

[0151] The second cluster is used to transmit the data packet to the target container group corresponding to the destination address.

[0152] In one embodiment, the target container group and the first container group that initiates the communication request may be in different clusters or in the same cluster.

[0153] 1. If the target container group and the first container group are in different clusters, the first cluster routes the data packet and the destination address to the private network device through steps 202 to 206 of the above embodiment, and the second cluster implements network communication between multiple clusters through steps 602 to 604 of the above embodiment. The detailed communication process in this scenario is not described in detail in this embodiment.

[0154] 2. If the target container group and the first container group are in the same cluster, it includes two cases: (1) the target container group and the first container group are in different subclusters and (2) the target container group and the first container group are in the same subcluster.

[0155] (1) For the case where the target container group and the first container group are in different subclusters of the same cluster: the first cluster routes the data packet and the destination address to the private network device according to the same principle as steps 202 to 206, and the second cluster finally transmits the data packet to the target container group through the same principle as steps 602 to 604. This process is similar to the network communication between multiple clusters. The difference is that the K8S networking configuration divides the node where the first container group is located and the node where the target container group is located into different clusters, but the communication process is the same. The detailed process in this scenario will not be repeated in this embodiment.

[0156] (2) For the case where the target container group and the first container group are in the same subcluster of the same cluster, the case where the target container group and the first container group are in the same node and the case where the target container group and the first container group are in different nodes is also included: (a) If the target container group and the first container group are in the same node, and the first target node to which the first container group belongs and the target node are the same node, then the first target node (target node) in BGP mode can act as a routing device and can directly route data packets to other container groups contained in the first target node, that is, the first target node matches the destination address in the first routing table contained therein, and the matching result is that there is routing information matching the destination address in the first routing table, then the first target node directly routes the data packet sent by the first container group to the destination address, that is, routes it to the target container group.

[0157] (b) If the target container group and the first container group are in different nodes under the same sub-cluster (in the same network segment), the first target node corresponding to the first container group matches the destination address in the first routing table. At this time, there is no routing information matching the destination address in the first routing table. In the absence of a direct route, the first target node routes the data packet and the destination address to the default routing device, that is, to the first target routing device. The first target routing device matches the destination address in the global routing table. If the matching result is that the other first nodes contain the target container group corresponding to the destination address, the first target routing device uses the other first nodes as the target node. At this time, the first target routing device routes the data packet and the destination address to the target node, and routes the data packet to the target container group through the target node to achieve communication within the same sub-cluster (same network segment).

[0158] In an exemplary embodiment, the second cluster is specifically used to obtain a data packet and a destination address; the data packet and the destination address are based on the first target routing device sending the data packet and the destination address to the privatized network device, and the privatized network device is used to route the data packet and the destination address to the second target routing device in the second cluster according to the global routing table; the second target routing device includes a global routing table;

[0159] Based on the second target routing device, the global routing table and the destination address, the data packet is routed to the target container group corresponding to the destination address in the second cluster.

[0160] In an exemplary embodiment, the first cluster is further configured to:

[0161] For each routing device in each sub-cluster, obtain the routing information of each container group corresponding to each node according to each node associated with the routing device;

[0162] Construct a network segment routing table corresponding to each routing device based on each routing device and routing information;

[0163] Share the network segment routing table with private network devices, and share the network segment routing table with other routing devices based on the private network devices. Each network segment routing table is used to build a global routing table.

[0164] In an exemplary embodiment, the first cluster is specifically used to route the destination address and the data packet to the first target node corresponding to the first container group;

[0165] The destination address is matched according to a first routing table corresponding to the first target node to obtain a first matching result, and the data packet is routed to the first target routing device based on the first matching result.

[0166] In an exemplary embodiment, the second cluster is further configured to:

[0167] Acquire a network segment routing table shared by the private network devices through each second routing device;

[0168] For each second routing device, a global routing table is constructed according to the network segment routing table shared by the privatized network device and the network segment routing table included in the second routing device.

[0169] In an exemplary embodiment, the second cluster is specifically used to determine a target node corresponding to the destination address based on the second target routing device and the global routing table, and to route the data packet to the target node based on the second target routing device;

[0170] Routes packets to target container groups based on target nodes.

[0171] In an exemplary embodiment, the privatized network device is specifically used to obtain a first network segment routing table shared by each first routing device and a second network segment routing table shared by each second routing device;

[0172] A global routing table is constructed according to each first network segment routing table and each second network segment routing table.

[0173] In an exemplary embodiment, the privatized network device is specifically used to determine the second target routing device corresponding to the destination address in the global routing table;

[0174] The data packet is routed to the second target device according to the address corresponding to the second target routing device.

[0175] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0176] Based on the same inventive concept, the embodiment of the present application also provides a multi-cluster network communication device for implementing the multi-cluster network communication method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more multi-cluster network communication device embodiments provided below can refer to the limitations of the multi-cluster network communication method above, and will not be repeated here.

[0177] In an exemplary embodiment, Fig. 9 As shown, a multi-cluster network communication device 900 is provided. The device 900 is applied to a first cluster. The first cluster divides the first node of the same network segment into a sub-cluster. Each sub-cluster corresponds to a first routing device, including: a first acquisition module 901, a first routing module 902 and a second routing module 903, wherein:

[0178] A first acquisition module 901 is used to acquire a data packet and a destination address corresponding to a communication request initiated by a first container group in a first cluster;

[0179] A first routing module 902, configured to route the data packet to a first target routing device corresponding to the first container group;

[0180] The second routing module 903 is used to send the data packet and the destination address to the privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to the second target routing device in the second cluster according to the global routing table, so that the second target routing device transmits the data packet to the target container group corresponding to the destination address.

[0181] In one embodiment, the apparatus 900 further includes:

[0182] A second acquisition module is used to acquire, for each default routing device in each sub-cluster, routing information of each container group corresponding to each node according to each node associated with the default routing device;

[0183] A first construction module is used to construct a network segment routing table corresponding to each default routing device based on each default routing device and routing information;

[0184] The sharing module is used to share the network segment routing table with the private network device, and share the network segment routing table with other default routing devices according to the private network device. Each network segment routing table is used to construct a global routing table.

[0185] In one of the embodiments, the first routing module 902 is specifically used to route the destination address and the data packet to the first target node corresponding to the first container group;

[0186] The destination address is matched according to a first routing table corresponding to the first target node to obtain a first matching result, and the data packet is routed to the first target routing device based on the first matching result.

[0187] In an exemplary embodiment, Fig.10 As shown, a multi-cluster network communication device 1000 is provided, and the device 1000 is applied to the second cluster, including: a third acquisition module 1001 and a third routing module 1002, wherein:

[0188] The third acquisition module 1001 is used to acquire a data packet and a destination address; the data packet and the destination address are sent to the privatized network device based on the first target routing device, and the privatized network device is used to route the data packet and the destination address to the second target routing device in the second cluster according to the global routing table; the second target routing device includes a global routing table;

[0189] The third routing module 1002 is configured to route the data packet to a target container group corresponding to the destination address in the second cluster based on the second target routing device, the global routing table and the destination address.

[0190] In one embodiment, the apparatus 1000 further includes:

[0191] A fourth acquisition module, used for acquiring a network segment routing table shared by the private network devices through each second routing device;

[0192] The second construction module is used to construct a global routing table for each second routing device according to the network segment routing table shared by the privatized network device and the network segment routing table included in the second routing device.

[0193] In one of the embodiments, the third routing module 1002 is specifically used to determine the target node corresponding to the destination address based on the second target routing device and the global routing table, and route the data packet to the target node based on the second target routing device;

[0194] Routes packets to target container groups based on target nodes.

[0195] Each module in the multi-cluster network communication device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0196] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.11 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a multi-cluster network communication method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0197] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0198] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0199] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0200] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0201] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0202] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0203] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0204] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A multi-cluster network communication method, characterized in that: The method is applied to a first cluster, where the first cluster divides the first nodes in the same network segment into a sub-cluster, each of the sub-cluster corresponds to a first routing device, and the method includes: Obtaining a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster; Routing the data packet to a first target routing device corresponding to the first container group; The data packet and the destination address are sent to a privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to a second target routing device in a second cluster according to a global routing table, so that the second target routing device transmits the data packet to a target container group corresponding to the destination address.

2. The method according to claim 1, characterized in that: Before obtaining the data packet and the destination address corresponding to the communication request initiated by the first container group in the first cluster, the method further includes: For each default routing device in each sub-cluster, according to each node associated with the default routing device, obtain routing information of each container group corresponding to each node; Constructing a network segment routing table corresponding to each of the default routing devices based on each of the default routing devices and the routing information; The network segment routing table is shared with a private network device, and the network segment routing table is shared with other default routing devices according to the private network device, and each network segment routing table is used to construct a global routing table.

3. The method according to claim 1, characterized in that The step of routing the data packet to a first target routing device corresponding to the first container group includes: Routing the destination address and the data packet to a first target node corresponding to the first container group; The destination address is matched according to a first routing table corresponding to the first target node to obtain a first matching result, and the data packet is routed to a first target routing device based on the first matching result.

4. A multi-cluster network communication method, characterized in that: The method is applied to the second cluster, and the method comprises: Acquire a data packet and a destination address; the data packet and the destination address are sent to a privatized network device based on a first target routing device, the privatized network device is used to route the data packet and the destination address to a second target routing device in the second cluster according to a global routing table; the second target routing device includes a global routing table; Based on the second target routing device, the global routing table and the destination address, the data packet is routed to the target container group corresponding to the destination address in the second cluster.

5. The method according to claim 4, characterized in that Before obtaining the data packet and the destination address, the method further includes: Acquire a network segment routing table shared by the private network devices through each second routing device; For each second routing device, a global routing table is constructed according to the network segment routing table shared by the privatized network device and the network segment routing table included in the second routing device.

6. The method according to claim 4, characterized in that The step of routing the data packet to a target container group corresponding to the destination address in the second cluster based on the second target routing device, the global routing table, and the destination address includes: Determine a target node corresponding to the destination address based on the second target routing device and the global routing table, and route the data packet to the target node based on the second target routing device; The data packet is routed to a target container group according to the target node.

7. A multi-cluster network communication system, characterized in that: The system comprises: The first cluster is used to obtain a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster; route the data packet to a first target routing device corresponding to the first container group; send the data packet and the destination address to a privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to a second target routing device in the second cluster according to a global routing table, so that the second target routing device transmits the data packet to a target container group corresponding to the destination address; A privatized network device, used for routing the data packet and the destination address to a second target routing device; The second cluster is used to transmit the data packet to a target container group corresponding to the destination address.

8. The system according to claim 7, characterized in that The privatized network device is specifically used to obtain a first network segment routing table shared by each first routing device and a second network segment routing table shared by each second routing device; A global routing table is constructed according to each of the first network segment routing tables and each of the second network segment routing tables.

9. The system according to claim 8, characterized in that The privatized network device is specifically used to determine the second target routing device corresponding to the destination address in the global routing table; The data packet is routed to the second target routing device according to the address corresponding to the second target routing device.

10. A multi-cluster network communication device, characterized in that: The device is applied to a first cluster, the first cluster divides the first nodes in the same network segment into a sub-cluster, each of the sub-cluster corresponds to a first routing device, and the device includes: A first acquisition module, configured to acquire a data packet and a destination address corresponding to a communication request initiated by a first container group in the first cluster; A first routing module, configured to route the data packet to a first target routing device corresponding to the first container group; A second routing module is used to send the data packet and the destination address to a privatized network device based on the first target routing device; the privatized network device is used to route the data packet and the destination address to a second target routing device in a second cluster according to a global routing table, so that the second target routing device transmits the data packet to a target container group corresponding to the destination address.

Citation Information

Cited By

  • Multi-cluster network communication method, device, equipment, medium and product

    CN121125592A