WO2023165137A1 - Cross-cluster network communication system and method - Google Patents

Cross-cluster network communication system and method Download PDF

Info

Publication number
WO2023165137A1
WO2023165137A1 PCT/CN2022/124573 CN2022124573W WO2023165137A1 WO 2023165137 A1 WO2023165137 A1 WO 2023165137A1 CN 2022124573 W CN2022124573 W CN 2022124573W WO 2023165137 A1 WO2023165137 A1 WO 2023165137A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
cluster
target node
target
original data
Prior art date
Application number
PCT/CN2022/124573
Other languages
French (fr)
Chinese (zh)
Inventor
王琨
赵建星
樊建刚
牛丽
田文杰
Original Assignee
京东科技信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东科技信息技术有限公司 filed Critical 京东科技信息技术有限公司
Publication of WO2023165137A1 publication Critical patent/WO2023165137A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets

Definitions

  • the present disclosure relates to the technical field of cloud platforms, and in particular to a cross-cluster network communication system and method.
  • Cloud Native provides powerful container orchestration capabilities, opens up network interfaces, and supports customized and flexible container networks.
  • each container group has an independent IP address, and the container group runs on a flat network, and the containers can be directly connected to each other.
  • a container group network interface protocol defines the interface specification of the container network.
  • the container network can be configured through a custom plug-in.
  • the existing container group network interface protocol can only realize the communication between container groups in a single cluster. Consider the intercommunication of multi-cluster container groups.
  • the present disclosure provides a cross-cluster network communication system and method, which realize communication between different clusters.
  • a cross-cluster network communication system includes:
  • the first cluster is configured to determine the target address of the original data packet as the second cluster, and encapsulate the original data packet to generate an encapsulated data packet;
  • the first gateway component is set corresponding to the first cluster, and is used to receive the encapsulated data packet sent by the first cluster;
  • the second gateway component is set corresponding to the second cluster, and is used to receive the encapsulated data packet sent by the first gateway component, and send the encapsulated data packet to the second cluster;
  • the second cluster is configured to receive the encapsulated data packet sent by the second gateway component, and decapsulate the encapsulated data packet to obtain the original data packet.
  • the network communication system further includes:
  • the first target node set in the first cluster is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port;
  • the second target node set in the second cluster is used to receive the encapsulated data packet sent by the second gateway component through the receiving port, and decapsulate the encapsulated data packet to obtain the original data packet;
  • the source address of the original data packet is the first destination node
  • the destination address of the original data packet is the second destination node
  • a first target node is set in the first cluster, a second target node is set in the second cluster, and the first target node includes a first target container group;
  • the source address of the original data packet is the first target container group, and the target address of the original data packet is the second target node;
  • the first target container group is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port of the first target node;
  • the second target node is configured to receive the encapsulated data packet sent by the second gateway component through the receiving port, and decapsulate the encapsulated data packet to obtain the original data packet.
  • a first target node is set in the first cluster, a second target node is set in the second cluster, and the second target node includes a second target container group;
  • the source address of the original data packet is the first target node, and the target address of the original data packet is the second target container group;
  • the first target node is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port;
  • the second target container group is used to receive the original data packet sent by the second target node according to the target address, wherein the original data packet sent by the second target node is the encapsulation data sent by the second gateway component received by the second target node through the receiving port packet, which is obtained by decapsulating the encapsulated data packet.
  • a first target node is set in the first cluster, a second target node is set in the second cluster, the first target node includes a first target container group, and the second target node includes a second target container group;
  • the source address of the original data packet is the first target container group, and the target address of the original data packet is the second target container group;
  • the first target container group is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port of the first target node;
  • the second target container group is used to receive the original data packet sent by the second target node according to the target address, wherein the original data packet sent by the second target node is the encapsulation data sent by the second gateway component received by the second target node through the receiving port packet, which is obtained by decapsulating the encapsulated data packet.
  • the network communication system further includes:
  • the first gateway route is set between the first cluster and the first gateway component, and is used to send the encapsulated data packet to the first gateway component corresponding to the first cluster;
  • the second gateway route is set between the first gateway component and the second gateway component, and is used to send the encapsulated data packet in the first gateway component to the second gateway component corresponding to the second cluster;
  • the third gateway route is set between the second gateway component and the second cluster, and is used to send the encapsulated data packet in the second gateway component to the second cluster.
  • the first cluster includes the first target node, and the second cluster includes the second target node; the source address of the original data packet is the first target node, and the target address of the original data packet is the second target node.
  • Two target nodes are two target nodes;
  • the method also includes:
  • the encapsulated data packet sent by the second gateway component is received through the receiving port of the second target node, and the encapsulated data packet is decapsulated to obtain the original data packet.
  • the first cluster includes the first target node, the first target node includes the first target container group, and the second cluster includes the second target node;
  • the source address of the original data packet is the first The target container group, the target address of the original data packet is the second target node;
  • the method also includes:
  • the encapsulated data packet sent by the second gateway component is received through the receiving port of the second target node, and the encapsulated data packet is decapsulated to obtain an original data packet.
  • the first cluster includes a first target node
  • the second cluster includes a second target node
  • the second target node includes a second target container group
  • the source address of the original data packet is the first target node
  • the target address of the original data packet is the second target container group
  • the method also includes:
  • the original data packet sent by the second target node according to the target address is received through the second target container group, wherein the original data packet sent by the second target node is that the second target node receives the
  • the encapsulated data packet sent by the second gateway component is obtained by decapsulating the encapsulated data packet.
  • the first cluster includes a first target node, the first target node includes a first target container group, the second cluster includes a second target node, and The second target node includes a second target container group; the source address of the original data packet is the first target container group, and the target address of the original data packet is the second target container group;
  • the method also includes:
  • the original data packet sent by the second target node according to the target address is received through the second target container group, wherein the original data packet sent by the second target node is that the second target node receives the
  • the encapsulated data packet sent by the second gateway component is obtained by decapsulating the encapsulated data packet.
  • an electronic device including a memory, a processor, and a computer program stored on the memory and operable on the processor.
  • the processor executes the program, any of the above-mentioned The cross-cluster network communication method described in the item.
  • a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the cross-cluster network communication method as described in any one of the above is implemented.
  • a computer program product including a computer program, and when the computer program is executed by a processor, the cross-cluster network communication method as described in any one of the above is implemented.
  • the present disclosure provides a cross-cluster network communication system and method.
  • the target address of the original data packet is determined as the second cluster through the first cluster, and the first gateway component corresponding to the first cluster cannot directly identify the original data packet. Therefore, Encapsulating the original data packet enables the first gateway component to receive the encapsulated original data; through the first gateway component, the encapsulated data packet is sent again to the second gateway component corresponding to the second cluster, and finally the second gateway component will encapsulate The data packet is sent to the second cluster, and the second cluster decapsulates the encapsulated data packet to obtain the original data packet. With the help of the first gateway component corresponding to the first cluster and the second gateway component corresponding to the second cluster, the communication between different clusters is realized. communication between.
  • FIG. 1 is one of the schematic structural diagrams of a cross-cluster network communication system according to an embodiment of the present disclosure
  • FIG. 2 is the second schematic structural diagram of a cross-cluster network communication system according to an embodiment of the present disclosure
  • Fig. 3 is a third structural schematic diagram of a cross-cluster network communication system according to an embodiment of the present disclosure.
  • FIG. 4 is a fourth schematic structural diagram of a cross-cluster network communication system according to an embodiment of the present disclosure.
  • FIG. 5 is a fifth schematic structural diagram of a cross-cluster network communication system according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of the principles of the Cni program and the Agent program according to an embodiment of the disclosure
  • FIG. 7 is a block diagram of Pod communication between Cluster1 and Cluster2 according to an embodiment of the present disclosure
  • FIG. 8 is a schematic flowchart of a cross-cluster network communication method according to an embodiment of the present disclosure.
  • Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • Cloud native is a software development technique that takes full advantage of cloud computing, deploying applications as microservices using a software technology stack.
  • cloud-native applications are built as a set of microservices running in Docker containers, orchestrated in Kubernetes, and managed and deployed using DevOps and GitOps workflows.
  • the advantage of using Docker containers is the ability to package all the software and environment configuration required for execution into a single executable package. Containers run in a virtualized environment, isolating the contained application from its environment.
  • K8s Kubernetes
  • the underlying layer is based on container technologies such as Docker and Rkt, providing powerful application management and resource management and scheduling capabilities.
  • K8s has complete cluster management capabilities, including multi-level security protection and access mechanisms, multi-tenant application support capabilities, transparent service registration and service discovery mechanisms, built-in intelligent load balancers, powerful fault discovery and self-healing functions, Service rolling upgrade and online expansion capabilities, scalable resource automatic scheduling mechanism, and multi-granularity resource allocation quota management capabilities.
  • K8s provides comprehensive management tools that cover all aspects including development, test deployment, and operation and maintenance monitoring. Therefore, K8s is a brand-new distributed architecture solution based on container technology, and it is a one-stop, complete distributed system development and support platform.
  • the Underlay network all Nodes and Pods are on the Layer 3 or Layer 2 network plane, and cross-cluster communication can be realized directly through the routing configuration of the switch; for the Overlay network, PodIP is a private network address, and the switches between Nodes will not have Pods For the routing of the network segment, the communication between Pods needs to encapsulate the corresponding Overlay header, find the route to the destination host according to the outer header, and then send it to the destination Pod after decapsulation.
  • the Overlay network is selected. Specifically, the Overlay network is to build a virtual network on top of the existing physical network.
  • the upper-layer application is only related to the virtual network. Under the condition of no large-scale modification, the bearing of the application on the network can be realized, and it can be separated from other network services, and the basic network technology based on IP is the main one.
  • Embodiments of the present disclosure provide a cross-cluster network communication system.
  • the network communication system includes multiple clusters, and each cluster is correspondingly provided with a gateway component.
  • Cluster is a collection of computing, storage and network resources, K8s uses these resources to run various container-based applications.
  • Each component point of the cluster is called a node (Node), and the combination of nodes forms a cluster.
  • the responsibility of Node is to run the container application.
  • Node is responsible for monitoring and reporting the status of the container, and managing the life cycle of the container according to the requirements of the Cluster.
  • Node runs on the Linux operating system, which can be a physical machine or a virtual machine.
  • the gateway device refers to Gateway, abbreviated as (GW).
  • Gateway is the gateway service framework under the SpringCloud technology stack. In the SpringCloud-based microservice environment, external requests will reach the Gateway, and the Gateway forwards, filters, authenticates, and Fusing and other pre-operations.
  • the Gateway running in the Kubernetes environment can get the Kubernetes Service list if the Spring-Cloud-Kubernetes framework is used. Therefore, the Gateway can assume the role of a gateway and forward external requests to the Services in Kubernetes.
  • FIG. 1 it is one of the schematic structural diagrams of a cross-cluster network communication system provided by an embodiment of the present disclosure, including:
  • the first cluster 11 is configured to determine the target address of the original data packet as the second cluster, and encapsulate the original data packet to generate an encapsulated data packet.
  • the first cluster is represented by Cluster1
  • the second cluster is represented by Cluster2
  • the original data packet refers to the data packet in Cluster1.
  • Encapsulation refers to hiding the attributes and implementation details of the original data packet, only exposing the interface to the outside world, and controlling the access level of reading and modifying attributes in the program.
  • encapsulation refers to the outside of the original data packet Add a packet header of the Overlay network.
  • the message header can be understood as some information segments.
  • the message is the unit sent by the network. During the transmission process, it will be continuously encapsulated into groups, packets, and frames for transmission. The way of encapsulation is to add some information segments. The added information segments It is the header.
  • IP tunneling technology is used to encapsulate the original data packet.
  • IP tunneling technology is a process in which a router encapsulates one network layer protocol into another protocol for transmission across the network to another router.
  • IP tunneling technology is a data packet encapsulation technology, which encapsulates the original IP packet (whose header contains the original sender and final destination) in the data payload of another data packet (called encapsulated IP packet) for transmission .
  • the original data packet is encapsulated through the IP tunneling technology, and the encapsulated data packet is called an encapsulated data packet.
  • the first gateway component 12 is set corresponding to the first cluster, and is used for receiving the encapsulated data packet sent by the first cluster.
  • the first gateway component refers to the Gateway1 correspondingly set in the first cluster, and sends the encapsulated data packet to the Gateway1 set in the first cluster.
  • one or more gateway components can be set in the first cluster, and when the scale of the cluster is large, it supports horizontal expansion to add gateway components to achieve load balancing.
  • the second gateway component 13 is set corresponding to the second cluster, and is used for receiving the encapsulated data packet sent by the first gateway component, and sending the encapsulated data packet to the second cluster.
  • the second gateway component refers to Gateway2 set in the second cluster, and similarly, one or more gateway components may also be set in the second cluster.
  • Gateway1 of the first cluster sends the encapsulated data packet to Gateway2 of the second cluster, and then Gateway2 of the second cluster sends the encapsulated data packet to the second cluster.
  • the second cluster 14 is configured to receive the encapsulated data packet sent by the second gateway component, and decapsulate the encapsulated data packet to obtain the original data packet.
  • decapsulation is the inverse process of encapsulation, and the header of the added Overlay network is removed to obtain the original data.
  • the encapsulated data packet is decapsulated by Node2 in Cluster2 to obtain the original data packet, that is, the data packet in Cluster1 is obtained.
  • the present disclosure provides a cross-cluster network communication system.
  • the target address of the original data packet is determined as the second cluster through the first cluster.
  • the first gateway component corresponding to the first cluster cannot directly identify the original data packet. Therefore, the original Encapsulation of the data packet enables the first gateway component to receive the encapsulated original data; the encapsulated data packet is sent to the second gateway component corresponding to the second cluster through the first gateway component again, and finally the second gateway component will encapsulate the data packet sent to the second cluster, the second cluster decapsulates the encapsulated data packet to obtain the original data packet, and realizes the communication between different clusters by means of the first gateway component corresponding to the first cluster and the second gateway component corresponding to the second cluster communication.
  • the second schematic structural diagram of a cross-cluster network communication system provided by an embodiment of the present disclosure includes:
  • the first target node 21 set in the first cluster is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component 22 through the sending port;
  • the second target node 24 arranged in the second cluster is used to receive the encapsulated data packet sent by the second gateway component 23 through the receiving port, and decapsulate the encapsulated data packet to obtain the original data packet;
  • the source address of the original data packet is the first destination node
  • the destination address of the original data packet is the second destination node
  • the cluster includes multiple nodes, and the nodes are represented by Node, the first target node is represented by Node1, and the second target node is represented by Node2.
  • Node1 encapsulates the original data packet, generates an encapsulated data packet, and sends the encapsulated data packet to Gateway1 through the sending port, and Node2 receives the encapsulated data packet sent by Gateway2 through the receiving port, and decapsulates the encapsulated data packet to obtain the original data pack.
  • the cross-cluster network communication system provided by the embodiments of the present disclosure implements Overlay network communication between nodes in different clusters.
  • the third schematic structural diagram of a cross-cluster network communication system provided by an embodiment of the present disclosure includes:
  • a first target node is set in the first cluster, a second target node is set in the second cluster, and the first target node includes a first target container group;
  • the source address of the original data packet is the first target container group, and the target address of the original data packet is the second target node;
  • the first target container group 31 is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component 32 via the sending port of the first target node;
  • the second target node 34 is configured to receive the encapsulated data packet sent by the second gateway component 33 through the receiving port, and decapsulate the encapsulated data packet to obtain the original data packet.
  • a container group refers to a Pod, which is a basic management unit in K8s, rather than a container (Container).
  • a Pod is a layer of encapsulation of K8s on a container.
  • Container composition is a basic management unit in K8s, rather than a container (Container).
  • Pod can support multiple containers to share network addresses and file systems in a Pod, and services can be combined and completed in simple and efficient ways such as inter-process communication and file sharing.
  • Node On the working node
  • a Pod will never span multiple working nodes.
  • the first target container group refers to Pod1 in Node1.
  • Pod1 encapsulates the original data to generate an encapsulated data packet, and Pod1 sends the encapsulated data packet to Gateway1 corresponding to Cluster1.
  • the fourth schematic structural diagram of a cross-cluster network communication system provided by an embodiment of the present disclosure includes:
  • a first target node is set in the first cluster, a second target node is set in the second cluster, and the second target node includes a second target container group;
  • the source address of the original data packet is the first target node, and the target address of the original data packet is the second target container group;
  • the first target node 41 is configured to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component 42 through the sending port;
  • the second target container group 44 is used to receive the original data packet sent by the second target node according to the target address, wherein the original data packet sent by the second target node is received by the second target node through the receiving port and sent by the second gateway component 43
  • the encapsulated data packet is obtained by decapsulating the encapsulated data packet.
  • the second target container group refers to Pod2 in Node2.
  • Pod2 decapsulates the encapsulated data packet to obtain the original data packet.
  • the cross-cluster network communication system provided by the embodiments of the present disclosure realizes Overlay network communication between container groups and nodes in different clusters.
  • the fifth structural diagram of a cross-cluster network communication system provided by an embodiment of the present disclosure includes:
  • a first target node is set in the first cluster, a second target node is set in the second cluster, the first target node includes a first target container group, and the second target node includes a second target container group;
  • the source address of the original data packet is the first target container group, and the target address of the original data packet is the second target container group;
  • the first target container group 51 is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component 52 via the sending port of the first target node;
  • the second target container group 54 is used to receive the original data packet sent by the second target node according to the target address, wherein the original data packet sent by the second target node is received by the second target node through the receiving port and sent by the second gateway component 53
  • the encapsulated data packet is obtained by decapsulating the encapsulated data packet.
  • a first target node Node1 is set in the first cluster Cluster1
  • Pod1 is set in Node1
  • a second target node Node2 is set in the second cluster Cluster2
  • Pod2 is set in Node2.
  • the cross-cluster network communication system provided by the embodiments of the present disclosure implements Overlay network communication between container groups in different clusters.
  • the system also includes:
  • the first gateway route is set between the first cluster and the first gateway component, and is used to send the encapsulated data packet to the first gateway component corresponding to the first cluster;
  • the second gateway route is set between the first gateway component and the second gateway component, and is used to send the encapsulated data packet in the first gateway component to the second gateway component corresponding to the second cluster;
  • the third gateway route is set between the second gateway component and the second cluster, and is used to send the encapsulated data packet in the second gateway component to the second cluster.
  • routing refers to the process in which a router receives a data packet from one interface, directs it according to the destination address of the data packet, and forwards it to another interface.
  • the encapsulated data packet is sent from the sending node to the first gateway component.
  • the first gateway route may be understood as route 1 pointing to Gateway1, and route 1 is generated by the Route-Controller.
  • a route pointing to Gateway1 is determined by the sending node in the first cluster, and the encapsulated data packet is sent to the first gateway component, ie, Gateway1, based on the route of Gateway1.
  • the second gateway route is route 2 pointing to Gateway2, and route 2 is generated by Route-Controller. Send the encapsulated data packet in Gateway1 to Gateway2 corresponding to the second cluster based on route 2.
  • the third route is route 3 pointing to the second cluster (which can be understood as pointing to the receiving node Node2 in the second cluster), and the route 3 is generated by the Node-Controller.
  • Gateway2 sends the encapsulated data packet to Node2 in the second cluster based on route 3.
  • the fourth route pointing to the second target container group can be determined through Node2, and the encapsulated data packet is sent to the second target container group of Node2 based on the fourth route.
  • the fourth route is route 4 pointing to Node2, and route 4 It is generated by Node-Controller. Send the encapsulated data packet to Pod2 of Node2 based on route 4.
  • Step 1 Create a CRD (Custom Resource Definition) to represent the routing information of the Overlay network.
  • CRD Customer Resource Definition
  • TunnelType to represent the type of Overlay tunnel
  • Route concrete route information
  • Destination is the purpose IP address of route
  • purpose IP address is the IP address of the destination cluster, which is the second cluster in the embodiment of the disclosure
  • Remote is the next hop list of the route (the next hop includes the first gateway component and the second gateway component in the embodiment of the disclosure), if It is multiple destination IPs, forming an equal-cost route (ECMP, Equal Cost Multi-path).
  • ECMP Equal Cost Multi-path
  • Equal-cost routing can be understood as in a network environment where there are multiple different links to the same destination address, if traditional routing technology is used, the data packet sent to the destination address can only use one of the links, and the other Links are in a backup state or invalid state, and it takes a certain amount of time to switch between each other in a dynamic routing environment, and the equivalent multipath routing protocol can use multiple links at the same time in this network environment, which not only increases the transmission bandwidth, but also can Back up the data transmission of the failed link without delay or packet loss.
  • the biggest feature of ECMP is that it realizes multi-path load balancing under the condition of equal value.
  • Step 2 use the Cni program to configure the container network, and use the Agent program to configure the container Overlay network route.
  • the Cni program is implemented using the K8s standard Cni interface, which is used to assign an IP (IPAM function) to the Pod, and is used to configure the route pointing to the Pod.
  • IP IP
  • Agent program The role of the Agent program is to interact with the Apiserver to obtain Pod, Node, and RouteCRD information, and configure container Overlay network routing.
  • Apiserver is the core of the cluster and is responsible for the communication between the functional modules of the cluster.
  • Each functional module in the cluster stores information into etcd through Apiserver. ) to achieve information exchange between modules.
  • Step 3 the Agent program is initialized through the Config configuration file, starts the corresponding controller (Controller), List/Watch Apiserver and sends the Overlay route.
  • Controller includes: Pod-Controller, Node-Controller, Route-Controller.
  • the Agent program is initialized through the Config configuration file.
  • the configuration structure is: Kubeconfig is the address of the authentication file communicating with the Apiserver, TlIPRoute/TlNodeRoute/TlRoute respectively indicate the switch to enable the Pod-Controller, Node-Controller, and Route-Controller, and TlRouteLabel It is the label selector of RouteCRD monitored by Route-controller.
  • FIG. 6 is a schematic diagram of the principles of the Cni program and the Agent program provided by the embodiment of the present disclosure.
  • the function is to List/Watch Pod information, issue the Overlay route pointing to the Pod, and use it for Pod cross-Node communication, for example, ip route add ⁇ PodIP ⁇ via ⁇ NodeIP ⁇ dev tunl0 onlink, the destination IP is the IP of the Pod, and the next hop is The NodeIP where the Pod is located, and the outbound interface is tunl0.
  • the role is to List/Watch Node information.
  • the Overlay route pointing to Node is issued for the intercommunication between Pod and Node. For example, ip route add ⁇ NodeIP ⁇ via ⁇ NodeIP ⁇ dev tunl0 onlink table 16, destination IP and next The jumps are the IP of the Node, and the outgoing interface is the tunl0 port. Among them, table 16 stores Overlay routing information about Node.
  • the function is to List/Watch RouteCRD information, and issue the Overlay route pointing to the destination network segment (the network segment of other clusters), which is mainly used for inter-cluster routing, such as ip route add ⁇ Destination ⁇ onlink nexthop via ⁇ GW1 ⁇ dev tunl0 weight 2 onlink nexthop via ⁇ GW2 ⁇ dev tunl0 weight 2 onlink, the destination is a network segment or IP, the next hop is the IP of the gateway (multiple next hops form ECMP), and the outbound interface is tunl0.
  • the destination network segment the network segment of other clusters
  • the destination is a network segment or IP
  • the next hop is the IP of the gateway (multiple next hops form ECMP)
  • the outbound interface is tunl0.
  • FIG. 7 is a block diagram of Pod communication between Cluster1 and Cluster2 provided by the embodiment of the present disclosure.
  • the specific process of Pod communication between Cluster1 and Cluster2 is steps 11-14.
  • the first cluster is represented by Cluster1
  • the node is represented by Node1
  • the container group is represented by Pod1
  • the second cluster is represented by Cluster2
  • the node is represented by Node2
  • the container group is represented by Pod2
  • GW1 represents The first cluster corresponds to the configured gateway
  • GW2 indicates the second cluster corresponds to the configured gateway.
  • relevant routing information has been configured during communication, which are directly represented by route 1, route 2, route 3 and route 4.
  • Step 11 obtain the original data packet of Pod1, determine the route 1 according to the IP of Pod2, encapsulate the original data packet, generate an encapsulated data packet, and send it from the network card of Node1.
  • the original data packet comes out of Pod1, and the route is searched according to the destination IP (Pod2 IP).
  • First search in table 16 if there is no suitable route, then check the table main, and confirm that there is route 1 of the outbound interface tun10 (the route pointing to GW1),
  • the original data is encapsulated by IP tunneling technology to generate an encapsulated data packet, (in the encapsulated data packet, the original IP is the IP of Node1, and the destination IP is the IP of GW1) and then sent from the network card (eth) of Node1.
  • table 16 stores Overlay routing information about Node, and table main stores related routing information about Pod and gateway components.
  • Step 12 After receiving the encapsulated data packet, GW1 decapsulates it, searches for the route according to the IP of the next hop to determine route 2, encapsulates the data packet again, and sends it out from the network card of GW1.
  • GW1 After GW1 receives the encapsulated data packet, it decapsulates the IPIP header, searches for the route, finds that there is route 2 with an outbound interface tun10, and the next hop is the gateway component GW2 of Cluster2, and then encapsulates the IPIP header again (the original IP in the encapsulated data packet is The IP of GW1 of Cluster1, the destination IP is the IP of GW2 of Cluster2), and then sent from the network card (eth) of GW1.
  • Step 13 After receiving the encapsulated data packet, GW2 of Cluster2 decapsulates it, determines route 3 according to Pod2 IP, encapsulates the original data packet again, and sends it out from the network card of GW2.
  • GW2 of Cluster2 decapsulates the IPIP header, searches for the route according to the destination IP (Pod2 IP), determines that there is a route 3 (pointing to the Pod2 IP) of the outbound interface tun10, and encapsulates the IPIP header again (in The original IP in the encapsulated data packet is the IP of GW2, and the destination IP is the IP of GW2 in Cluster2), and then sent from the network card (eth) of GW2.
  • Step 14 after receiving the encapsulated data packet, Node2 decapsulates it to obtain the original data packet, determines that there is a route 4 pointing to Pod2 in Node2, and forwards the original data packet directly to Pod2.
  • Node2 After Node2 receives the encapsulated data packet, it decapsulates the IPIP header, looks up the route according to the inner destination IP (Pod2), looks up the table main table, determines that there is a route 4 pointing to veth, and forwards it directly to the veth of Pod2.
  • Pod2 the inner destination IP
  • the cross-cluster network communication system provided by the embodiments of the present disclosure realizes communication between container groups in different clusters.
  • FIG. 8 is a schematic flowchart of a cross-cluster network communication method provided by an embodiment of the present disclosure, the method includes:
  • the present disclosure provides a cross-cluster network communication method.
  • the target address of the original data packet is determined as the second cluster through the first cluster.
  • the first gateway component corresponding to the first cluster cannot directly identify the original data packet. Therefore, the original Encapsulation of the data packet enables the first gateway component to receive the encapsulated original data; the encapsulated data packet is sent to the second gateway component corresponding to the second cluster through the first gateway component again, and finally the second gateway component will encapsulate the data packet sent to the second cluster, the second cluster decapsulates the encapsulated data packet to obtain the original data packet, and realizes the communication between different clusters by means of the first gateway component corresponding to the first cluster and the second gateway component corresponding to the second cluster communication.
  • the first cluster includes a first target node
  • the second cluster includes a second target node
  • the source address of the original data packet is the first target node
  • the target address of the original data packet is the second target node
  • the method also includes:
  • the encapsulated data packet sent by the second gateway component is received through the receiving port of the second target node, and the encapsulated data packet is decapsulated to obtain the original data packet.
  • the first cluster includes a first target node, the first target node includes a first target container group, and the second cluster includes a second target node;
  • the source address of the original data packet is the first target container group,
  • the destination address of the original data packet is the second destination node;
  • the method also includes:
  • the encapsulated data packet sent by the second gateway component is received through the receiving port of the second target node, and the encapsulated data packet is decapsulated to obtain the original data packet.
  • the first cluster includes the first target node
  • the second cluster includes the second target node
  • the second target node includes the second target container group
  • the source address of the original data packet is the first target node
  • the original The destination address of the data packet is the second destination container group
  • the method also includes:
  • the original data packet sent by the second target node according to the target address is received through the second target container group, wherein the original data packet sent by the second target node is an encapsulated data packet sent by the second gateway component received by the second target node through the receiving port, Obtained by decapsulating the encapsulated data packet.
  • the first cluster includes a first target node, the first target node includes a first target container group, the second cluster includes a second target node, and the second target node includes a second target container group;
  • the original data The source address of the packet is the first target container group, and the target address of the original data packet is the second target container group;
  • the method also includes:
  • the original data packet sent by the second target node according to the target address is received through the second target container group, wherein the original data packet sent by the second target node is an encapsulated data packet sent by the second gateway component received by the second target node through the receiving port, Obtained by decapsulating the encapsulated data packet.
  • FIG. 9 illustrates a schematic diagram of the physical structure of an electronic device.
  • the electronic device may include: a processor (processor) 910, a communication interface (Communications Interface) 920, a memory (memory) 930 and a communication bus 940, Wherein, the processor 910 , the communication interface 920 , and the memory 930 communicate with each other through the communication bus 940 .
  • processor processor
  • Communication interface Communication interface
  • memory memory
  • FIG. 940 illustrates a schematic diagram of the physical structure of an electronic device.
  • the electronic device may include: a processor (processor) 910, a communication interface (Communications Interface) 920, a memory (memory) 930 and a communication bus 940, Wherein, the processor 910 , the communication interface 920 , and the memory 930 communicate with each other through the communication bus 940 .
  • memory memory
  • the processor 910 can call the logic instructions in the memory 930 to execute a cross-cluster network communication system, the network communication system includes: a first cluster, used to determine the target address of the original data packet as the second cluster, and The data packet is encapsulated to generate an encapsulated data packet; the first gateway component is set corresponding to the first cluster, and is used to receive the encapsulated data packet sent by the first cluster; the second gateway component is set corresponding to the second cluster, and is used to receive the second cluster An encapsulated data packet sent by a gateway component, and the encapsulated data packet is sent to a second cluster; the second cluster is used to receive the encapsulated data packet sent by the second gateway component, and decapsulate the encapsulated data packet to obtain original data Bag.
  • a cross-cluster network communication system includes: a first cluster, used to determine the target address of the original data packet as the second cluster, and The data packet is encapsulated to generate an encapsulated data packet; the first gateway component is set corresponding to
  • the above-mentioned logic instructions in the memory 930 may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as an independent product.
  • the technical solution of the embodiments of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
  • the present disclosure also provides a computer program product.
  • the computer program product includes a computer program stored on a non-transitory computer-readable storage medium.
  • the computer program includes program instructions.
  • the computer can execute A cross-cluster network communication system provided above, the network communication system includes: a first cluster, used to determine the target address of the original data packet as the second cluster, and encapsulate the original data packet to generate an encapsulated data packet;
  • the first gateway component is set corresponding to the first cluster, and is used to receive the encapsulated data packet sent by the first cluster;
  • the second gateway component is set corresponding to the second cluster, and is used to receive the encapsulated data packet sent by the first gateway component, and Send the encapsulated data packet to the second cluster;
  • the second cluster is used to receive the encapsulated data packet sent by the second gateway component, and decapsulate the encapsulated data packet to obtain the original data packet.
  • the present disclosure also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it is implemented to implement the above-mentioned cross-cluster network communication system provided by each,
  • the network communication system includes: a first cluster, which is used to determine the target address of the original data packet as the second cluster, and encapsulates the original data packet to generate an encapsulated data packet;
  • the first gateway component is set corresponding to the first cluster, and uses For receiving the encapsulated data packet sent by the first cluster;
  • the second gateway component is set corresponding to the second cluster, and is used to receive the encapsulated data packet sent by the first gateway component and send the encapsulated data packet to the second cluster;
  • the second cluster for receiving the encapsulated data packet sent by the second gateway component, and decapsulating the encapsulated data packet to obtain the original data packet.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place , or can also be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative efforts.
  • each implementation can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware.
  • the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic discs, optical discs, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.

Abstract

The present disclosure provides a cross-cluster network communication system and method. The network communication system comprises: a first cluster used for determining a target address of an original data packet as a second cluster, and encapsulating the original data packet to generate an encapsulated data packet; a first gateway component provided corresponding to the first cluster and used for receiving the encapsulated data packet sent by the first cluster; a second gateway component provided corresponding to the second cluster and used for receiving the encapsulated data packet sent by the first gateway component and sending the encapsulated data packet to the second cluster; and the second cluster used for receiving the encapsulated data packet sent by the second gateway component and de-encapsulating the encapsulated data packet to obtain the original data packet. Communication among different clusters is realized.

Description

一种跨集群的网络通信系统和方法A cross-cluster network communication system and method
相关申请的交叉引用Cross References to Related Applications
本公开要求于2022年3月2日在中国知识产权局提交的申请号为No.2022102001198,标题为“一种跨集群的网络通信系统和方法”的中国专利申请的优先权,通过引用将该中国专利申请公开的全部内容并入本文。This disclosure claims priority to Chinese Patent Application No. 2022102001198, entitled "A Cross-Cluster Network Communication System and Method," filed with the China Intellectual Property Office on March 2, 2022, which is incorporated by reference The entire content of the Chinese patent application disclosure is incorporated herein.
技术领域technical field
本公开涉及云平台技术领域,尤其涉及一种跨集群的网络通信系统和方法。The present disclosure relates to the technical field of cloud platforms, and in particular to a cross-cluster network communication system and method.
背景技术Background technique
云原生提供了强大的容器编排能力,开放了网络接口,支持自定义灵活的容器网络。在云原生网络方案中,每个容器组拥有独立的网际协议地址,容器组运行在扁平的网络中,容器之间是可以直连的网络。一种容器组网络接口协议定义了容器网络的接口规范,可以通过自定义插件的方式配置容器网络,但是,现有的容器组网络接口协议只能实现单集群内容器组之间的通信,没有考虑多集群容器组互通的问题。Cloud Native provides powerful container orchestration capabilities, opens up network interfaces, and supports customized and flexible container networks. In the cloud-native network solution, each container group has an independent IP address, and the container group runs on a flat network, and the containers can be directly connected to each other. A container group network interface protocol defines the interface specification of the container network. The container network can be configured through a custom plug-in. However, the existing container group network interface protocol can only realize the communication between container groups in a single cluster. Consider the intercommunication of multi-cluster container groups.
发明内容Contents of the invention
本公开提供一种跨集群的网络通信系统和方法,实现了不同集群之间的通信。The present disclosure provides a cross-cluster network communication system and method, which realize communication between different clusters.
根据本公开的第一方面,提供了一种跨集群的网络通信系统,该网络通信系统包括:According to a first aspect of the present disclosure, a cross-cluster network communication system is provided, and the network communication system includes:
第一集群,用于将原始数据包的目标地址确定为第二集群,并对原始数据包进行封装,生成封装数据包;The first cluster is configured to determine the target address of the original data packet as the second cluster, and encapsulate the original data packet to generate an encapsulated data packet;
第一网关组件,与第一集群对应设置,用于接收第一集群发送的 封装数据包;The first gateway component is set corresponding to the first cluster, and is used to receive the encapsulated data packet sent by the first cluster;
第二网关组件,与第二集群对应设置,用于接收第一网关组件发送的封装数据包,并将封装数据包发送至第二集群;The second gateway component is set corresponding to the second cluster, and is used to receive the encapsulated data packet sent by the first gateway component, and send the encapsulated data packet to the second cluster;
第二集群,用于接收第二网关组件发送的封装数据包,并对封装数据包进行解封装得到原始数据包。The second cluster is configured to receive the encapsulated data packet sent by the second gateway component, and decapsulate the encapsulated data packet to obtain the original data packet.
根据本公开提供的跨集群的网络通信系统,该网络通信系统还包括:According to the cross-cluster network communication system provided by the present disclosure, the network communication system further includes:
设置于第一集群中的第一目标节点,用于对原始数据包进行封装,生成封装数据包,并将封装数据包经由发送端口发送至第一网关组件;The first target node set in the first cluster is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port;
设置于第二集群中的第二目标节点,用于通过接收端口接收第二网关组件发送的封装数据包,并对封装数据包进行解封装得到原始数据包;The second target node set in the second cluster is used to receive the encapsulated data packet sent by the second gateway component through the receiving port, and decapsulate the encapsulated data packet to obtain the original data packet;
其中,原始数据包的源地址为第一目标节点,原始数据包的目标地址为第二目标节点。Wherein, the source address of the original data packet is the first destination node, and the destination address of the original data packet is the second destination node.
根据本公开提供的跨集群的网络通信系统,其中:According to the cross-cluster network communication system provided by the present disclosure, wherein:
第一集群中设置有第一目标节点,第二集群中设置有第二目标节点,第一目标节点包括第一目标容器组;A first target node is set in the first cluster, a second target node is set in the second cluster, and the first target node includes a first target container group;
原始数据包的源地址为第一目标容器组,原始数据包的目标地址为第二目标节点;The source address of the original data packet is the first target container group, and the target address of the original data packet is the second target node;
第一目标容器组,用于对原始数据包进行封装,生成封装数据包,并将封装数据包经由第一目标节点的发送端口发送至第一网关组件;The first target container group is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port of the first target node;
第二目标节点,用于通过接收端口接收第二网关组件发送的封装数据包,并对封装数据包进行解封装得到原始数据包。The second target node is configured to receive the encapsulated data packet sent by the second gateway component through the receiving port, and decapsulate the encapsulated data packet to obtain the original data packet.
根据本公开提供的跨集群的网络通信系统,其中:According to the cross-cluster network communication system provided by the present disclosure, wherein:
第一集群中设置有第一目标节点,第二集群中设置有第二目标节点,第二目标节点包括第二目标容器组;A first target node is set in the first cluster, a second target node is set in the second cluster, and the second target node includes a second target container group;
原始数据包的源地址为第一目标节点,原始数据包的目标地址为第二目标容器组;The source address of the original data packet is the first target node, and the target address of the original data packet is the second target container group;
第一目标节点,用于对原始数据包进行封装,生成封装数据包,并将封装数据包经由发送端口发送至第一网关组件;The first target node is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port;
第二目标容器组,用于接收第二目标节点根据目标地址发送的原始数据包,其中,第二目标节点发送的原始数据包为第二目标节点通过接收端口接收第二网关组件发送的封装数据包,对封装数据包进行解封装得到。The second target container group is used to receive the original data packet sent by the second target node according to the target address, wherein the original data packet sent by the second target node is the encapsulation data sent by the second gateway component received by the second target node through the receiving port packet, which is obtained by decapsulating the encapsulated data packet.
根据本公开提供的跨集群的网络通信系统,其中:According to the cross-cluster network communication system provided by the present disclosure, wherein:
第一集群中设置有第一目标节点,第二集群中设置有第二目标节点,第一目标节点包括第一目标容器组,第二目标节点包括第二目标容器组;A first target node is set in the first cluster, a second target node is set in the second cluster, the first target node includes a first target container group, and the second target node includes a second target container group;
原始数据包的源地址为第一目标容器组,原始数据包的目标地址为第二目标容器组;The source address of the original data packet is the first target container group, and the target address of the original data packet is the second target container group;
第一目标容器组,用于对原始数据包进行封装,生成封装数据包,并将封装数据包经由第一目标节点的发送端口发送至第一网关组件;The first target container group is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port of the first target node;
第二目标容器组,用于接收第二目标节点根据目标地址发送的原始数据包,其中,第二目标节点发送的原始数据包为第二目标节点通过接收端口接收第二网关组件发送的封装数据包,对封装数据包进行解封装得到。The second target container group is used to receive the original data packet sent by the second target node according to the target address, wherein the original data packet sent by the second target node is the encapsulation data sent by the second gateway component received by the second target node through the receiving port packet, which is obtained by decapsulating the encapsulated data packet.
根据本公开提供的跨集群的网络通信系统,该网络通信系统还包括:According to the cross-cluster network communication system provided by the present disclosure, the network communication system further includes:
第一网关路由,设置于第一集群和第一网关组件之间,用于将封装数据包发送至第一集群对应的第一网关组件中;The first gateway route is set between the first cluster and the first gateway component, and is used to send the encapsulated data packet to the first gateway component corresponding to the first cluster;
第二网关路由,设置于第一网关组件与第二网关组件之间,用于将第一网关组件中的封装数据包发送至第二集群对应的第二网关组 件中;以及The second gateway route is set between the first gateway component and the second gateway component, and is used to send the encapsulated data packet in the first gateway component to the second gateway component corresponding to the second cluster; and
第三网关路由,设置于第二网关组件和第二集群之间,用于将第二网关组件中的封装数据包发送至第二集群。The third gateway route is set between the second gateway component and the second cluster, and is used to send the encapsulated data packet in the second gateway component to the second cluster.
根据本公开的第二方面,提供了一种跨集群的网络通信方法,用于如上述任一项所述的网络通信系统,该方法包括:According to a second aspect of the present disclosure, there is provided a cross-cluster network communication method for the network communication system described in any one of the above, the method comprising:
通过第一集群将原始数据包的目标地址确定为第二集群;Determining the destination address of the original data packet as the second cluster by the first cluster;
通过第一集群对所述原始数据包进行封装,生成封装数据包;Encapsulate the original data packet through the first cluster to generate an encapsulated data packet;
通过第一集群将封装数据包发送至第一集群对应的第一网关组件中;sending the encapsulated data packet to the first gateway component corresponding to the first cluster through the first cluster;
通过第一网关组件将封装数据包发送至第二集群对应的第二网关组件中,以使第二网关组件将封装数据包发送至第二集群,并通过第二集群对封装数据包进行解封装,得到原始数据包。Send the encapsulated data packet to the second gateway component corresponding to the second cluster through the first gateway component, so that the second gateway component sends the encapsulated data packet to the second cluster, and decapsulates the encapsulated data packet through the second cluster , to get the original packet.
根据本公开提供的跨集群的网络通信方法,第一集群包括第一目标节点,第二集群包括第二目标节点;原始数据包的源地址为第一目标节点,原始数据包的目标地址为第二目标节点;According to the cross-cluster network communication method provided by the present disclosure, the first cluster includes the first target node, and the second cluster includes the second target node; the source address of the original data packet is the first target node, and the target address of the original data packet is the second target node. Two target nodes;
该方法还包括:The method also includes:
通过第一目标节点对原始数据包进行封装,生成封装数据包,并将封装数据包经由第一目标节点的发送端口发送至第一网关组件;encapsulating the original data packet by the first target node, generating the encapsulated data packet, and sending the encapsulated data packet to the first gateway component via the sending port of the first target node;
通过第二目标节点的接收端口接收第二网关组件发送的封装数据包,并对封装数据包进行解封装得到原始数据包。The encapsulated data packet sent by the second gateway component is received through the receiving port of the second target node, and the encapsulated data packet is decapsulated to obtain the original data packet.
根据本公开提供的跨集群的网络通信方法,第一集群包括第一目标节点,第一目标节点包括第一目标容器组,第二集群包括第二目标节点;原始数据包的源地址为第一目标容器组,原始数据包的目标地址为第二目标节点;According to the cross-cluster network communication method provided by the present disclosure, the first cluster includes the first target node, the first target node includes the first target container group, and the second cluster includes the second target node; the source address of the original data packet is the first The target container group, the target address of the original data packet is the second target node;
该方法还包括:The method also includes:
通过第一目标容器组对原始数据包进行封装,生成封装数据包, 并将封装数据包经由所述第一目标节点的发送端口发送至第一网关组件;Encapsulating the original data packet through the first target container group, generating the encapsulated data packet, and sending the encapsulated data packet to the first gateway component via the sending port of the first target node;
通过第二目标节点的接收端口接收所述第二网关组件发送的所述封装数据包,并对所述封装数据包进行解封装得到原始数据包。The encapsulated data packet sent by the second gateway component is received through the receiving port of the second target node, and the encapsulated data packet is decapsulated to obtain an original data packet.
根据本公开提供的跨集群的网络通信方法,所述第一集群中包括第一目标节点,所述第二集群包括第二目标节点,所述第二目标节点包括第二目标容器组;所述原始数据包的源地址为第一目标节点,所述原始数据包的目标地址为第二目标容器组;According to the cross-cluster network communication method provided in the present disclosure, the first cluster includes a first target node, the second cluster includes a second target node, and the second target node includes a second target container group; The source address of the original data packet is the first target node, and the target address of the original data packet is the second target container group;
所述方法还包括:The method also includes:
通过所述第一目标节点对所述原始数据包进行封装,生成所述封装数据包,并将所述封装数据包经由发送端口发送至所述第一网关组件;encapsulating the original data packet by the first target node, generating the encapsulated data packet, and sending the encapsulated data packet to the first gateway component through a sending port;
通过所述第二目标容器组接收第二目标节点根据所述目标地址发送的原始数据包,其中,所述第二目标节点发送的原始数据包为所述第二目标节点通过接收端口接收所述第二网关组件发送的所述封装数据包,对所述封装数据包进行解封装得到。The original data packet sent by the second target node according to the target address is received through the second target container group, wherein the original data packet sent by the second target node is that the second target node receives the The encapsulated data packet sent by the second gateway component is obtained by decapsulating the encapsulated data packet.
根据本公开提供的跨集群的网络通信方法,所述第一集群中包括第一目标节点,所述第一目标节点包括第一目标容器组,所述第二集群包括第二目标节点,所述第二目标节点包括第二目标容器组;所述原始数据包的源地址为第一目标容器组,所述原始数据包的目标地址为第二目标容器组;According to the cross-cluster network communication method provided in the present disclosure, the first cluster includes a first target node, the first target node includes a first target container group, the second cluster includes a second target node, and The second target node includes a second target container group; the source address of the original data packet is the first target container group, and the target address of the original data packet is the second target container group;
所述方法还包括:The method also includes:
通过所述第一目标容器组对所述原始数据包进行封装,生成所述封装数据包,并将所述封装数据包经由所述第一目标节点的发送端口发送至所述第一网关组件;Encapsulate the original data packet through the first target container group, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port of the first target node;
通过所述第二目标容器组接收第二目标节点根据所述目标地址 发送的原始数据包,其中,所述第二目标节点发送的原始数据包为所述第二目标节点通过接收端口接收所述第二网关组件发送的所述封装数据包,对所述封装数据包进行解封装得到。The original data packet sent by the second target node according to the target address is received through the second target container group, wherein the original data packet sent by the second target node is that the second target node receives the The encapsulated data packet sent by the second gateway component is obtained by decapsulating the encapsulated data packet.
根据本公开的第三方面,提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上述任一项所述跨集群的网络通信方法。According to a third aspect of the present disclosure, there is provided an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the program, any of the above-mentioned The cross-cluster network communication method described in the item.
根据本公开的第四方面,提供了一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一项所述跨集群的网络通信方法。According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the cross-cluster network communication method as described in any one of the above is implemented. .
根据本公开的第五方法,提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述任一项所述跨集群的网络通信方法。According to a fifth method of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the cross-cluster network communication method as described in any one of the above is implemented.
本公开提供一种跨集群的网络通信系统和方法,通过第一集群将原始数据包的目标地址确定为第二集群,第一集群对应的第一网关组件不能直接识别出原始数据包,因此,对原始数据包进行封装,能够让第一网关组件接收封装后的原始数据;通过第一网关组件再次将封装数据包发送至第二集群对应的第二网关组件中,最后第二网关组件将封装数据包发送给第二集群,第二集群对封装数据包进行解封装,得到原始数据包,借助第一集群对应的第一网关组件和第二集群对应的第二网关组件,实现了不同集群之间的通信。The present disclosure provides a cross-cluster network communication system and method. The target address of the original data packet is determined as the second cluster through the first cluster, and the first gateway component corresponding to the first cluster cannot directly identify the original data packet. Therefore, Encapsulating the original data packet enables the first gateway component to receive the encapsulated original data; through the first gateway component, the encapsulated data packet is sent again to the second gateway component corresponding to the second cluster, and finally the second gateway component will encapsulate The data packet is sent to the second cluster, and the second cluster decapsulates the encapsulated data packet to obtain the original data packet. With the help of the first gateway component corresponding to the first cluster and the second gateway component corresponding to the second cluster, the communication between different clusters is realized. communication between.
附图说明Description of drawings
为了更清楚地说明本公开或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the present disclosure or the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are the present invention For some disclosed embodiments, those skilled in the art can also obtain other drawings based on these drawings without any creative work.
图1是根据本公开实施例的跨集群的网络通信系统的结构示意图之一;FIG. 1 is one of the schematic structural diagrams of a cross-cluster network communication system according to an embodiment of the present disclosure;
图2是根据本公开实施例的跨集群的网络通信系统的结构示意图之二;FIG. 2 is the second schematic structural diagram of a cross-cluster network communication system according to an embodiment of the present disclosure;
图3是根据本公开实施例的跨集群的网络通信系统的结构示意图之三;Fig. 3 is a third structural schematic diagram of a cross-cluster network communication system according to an embodiment of the present disclosure;
图4是根据本公开实施例的跨集群的网络通信系统的结构示意图之四;FIG. 4 is a fourth schematic structural diagram of a cross-cluster network communication system according to an embodiment of the present disclosure;
图5是根据本公开实施例的跨集群的网络通信系统的结构示意图之五;FIG. 5 is a fifth schematic structural diagram of a cross-cluster network communication system according to an embodiment of the present disclosure;
图6是根据本公开实施例的Cni程序和Agent程序的原理示意图;6 is a schematic diagram of the principles of the Cni program and the Agent program according to an embodiment of the disclosure;
图7是根据本公开实施例的Cluster1与Cluster2之间的Pod通信的框图;7 is a block diagram of Pod communication between Cluster1 and Cluster2 according to an embodiment of the present disclosure;
图8是根据本公开实施例的一种跨集群的网络通信方法的流程示意图;FIG. 8 is a schematic flowchart of a cross-cluster network communication method according to an embodiment of the present disclosure;
图9是根据本公开实施例的电子设备的结构示意图。Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开实施例一部分实施例,而不是全部的实施例。基于本公开实施例中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开实施例保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments It is a part of the embodiments of the present disclosure, but not all of them. Based on the embodiments in the embodiments of the present disclosure, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the embodiments of the present disclosure.
云原生是一种软件开发技术,它充分利用了云计算,使用软件技术栈将应用程序部署为微服务。现有技术中,云原生应用程序构建在Docker容器中运行的一组微服务,在Kubernetes中编排,并使用 DevOps和GitOps工作流进行管理和部署。使用Docker容器的有点是能够将执行所需的所有软件及环境配置打包到一个可执行包中。容器在虚拟化环境中运行,从而将包含的应用程序与其环境隔离。Cloud native is a software development technique that takes full advantage of cloud computing, deploying applications as microservices using a software technology stack. In existing technologies, cloud-native applications are built as a set of microservices running in Docker containers, orchestrated in Kubernetes, and managed and deployed using DevOps and GitOps workflows. The advantage of using Docker containers is the ability to package all the software and environment configuration required for execution into a single executable package. Containers run in a virtualized environment, isolating the contained application from its environment.
Kubernetes缩写为K8s,是Google团队发起并维护的一个容器集群管理系统,底层基于Docker、Rkt等容器技术,提供强大的应用管理和资源管理调度能力。K8s具有完备的集群管理能力,包括多层次的安全防护和准入机制、多租户应用支撑能力、透明的服务注册和服务发现机制、内建智能负载均衡器、强大的故障发现和自我修复功能、服务滚动升级和在线扩容能力、可扩展的资源自动调度机制,以及多粒度的资源配置额管理能力。同时,K8s提供了完善的管理工具,这些工具覆盖了包括开发、测试部署、运维监控在内的各个环节。因此,K8s是全新的、基于容器技术的分布式架构解决方案,并且,是一站式的、完备的分布式系统开发和支撑平台。Kubernetes, abbreviated as K8s, is a container cluster management system initiated and maintained by the Google team. The underlying layer is based on container technologies such as Docker and Rkt, providing powerful application management and resource management and scheduling capabilities. K8s has complete cluster management capabilities, including multi-level security protection and access mechanisms, multi-tenant application support capabilities, transparent service registration and service discovery mechanisms, built-in intelligent load balancers, powerful fault discovery and self-healing functions, Service rolling upgrade and online expansion capabilities, scalable resource automatic scheduling mechanism, and multi-granularity resource allocation quota management capabilities. At the same time, K8s provides comprehensive management tools that cover all aspects including development, test deployment, and operation and maintenance monitoring. Therefore, K8s is a brand-new distributed architecture solution based on container technology, and it is a one-stop, complete distributed system development and support platform.
现有技术中,单集群内Pod之间的通信分为两种,一种是Underlay网络,所有Pod之间是三层网络或二层网络直通的,比如Calico的Bgp网络;另一种是Overlay网络,Pod与Pod之间通信需要有封装/解封装流程,比如Calico的IPIP网络,Flannel的Vxlan网络。In the existing technology, there are two types of communication between Pods in a single cluster, one is the Underlay network, and all Pods are directly connected by a three-layer network or a two-layer network, such as Calico's Bgp network; the other is Overlay In the network, communication between Pods requires an encapsulation/decapsulation process, such as Calico's IPIP network and Flannel's Vxlan network.
对于Underlay网络,所有Node、Pod都在三层或二层网络平面,可以直接通过交换机的路由配置来实现跨集群通信;对于Overlay网络,PodIP是私网地址,Node之间的交换机不会有Pod网段的路由,Pod之间通信需要封装对应的Overlay报文头,根据外层的报文头查找路由到达目的宿主机,解封装后再发往目的Pod。For the Underlay network, all Nodes and Pods are on the Layer 3 or Layer 2 network plane, and cross-cluster communication can be realized directly through the routing configuration of the switch; for the Overlay network, PodIP is a private network address, and the switches between Nodes will not have Pods For the routing of the network segment, the communication between Pods needs to encapsulate the corresponding Overlay header, find the route to the destination host according to the outer header, and then send it to the destination Pod after decapsulation.
然而这种通信的方式适用于单集群内,对于不同的集群,Pod都是各自的私网地址,需要一种方案来打通跨集群的私有网络,因此,本公开的实施例提供一种跨集群的网络通信系统,对于Pod之间的网络通信方式选用Overlay网络,具体的,Overlay网络是在现有的物 理网络之上构建虚拟网络,上层应用只与虚拟网络相关,其大体框架是对基础网络不进行大规模修改的条件下,实现应用在网络上的承载,并能与其它网络业务分离,并且以基于IP的基础网络技术为主。However, this communication method is suitable for a single cluster. For different clusters, Pods have their own private network addresses. A solution is needed to open up cross-cluster private networks. Therefore, embodiments of the present disclosure provide a cross-cluster For the network communication system between Pods, the Overlay network is selected. Specifically, the Overlay network is to build a virtual network on top of the existing physical network. The upper-layer application is only related to the virtual network. Under the condition of no large-scale modification, the bearing of the application on the network can be realized, and it can be separated from other network services, and the basic network technology based on IP is the main one.
本公开的实施例提供一种跨集群的网络通信系统,网络通信系统包括多个集群,且每个集群对应设置有网关组件。Embodiments of the present disclosure provide a cross-cluster network communication system. The network communication system includes multiple clusters, and each cluster is correspondingly provided with a gateway component.
集群(Cluster)是计算、存储和网络资源的集合,K8s利用这些资源运行各种基于容器的应用。集群的每个组成点称为节点(Node),由节点组合形成群集。Node的职责是运行容器应用,Node负责监控并汇报容器的状态,同时根据Cluster的要求管理容器的生命周期。Node运行在Linux的操作系统上,可以是物理机或者是虚拟机。Cluster (Cluster) is a collection of computing, storage and network resources, K8s uses these resources to run various container-based applications. Each component point of the cluster is called a node (Node), and the combination of nodes forms a cluster. The responsibility of Node is to run the container application. Node is responsible for monitoring and reporting the status of the container, and managing the life cycle of the container according to the requirements of the Cluster. Node runs on the Linux operating system, which can be a physical machine or a virtual machine.
网关设备指的是Gateway,缩写为(GW),Gateway是SpringCloud技术栈下的网关服务框架,在基于SpringCloud的微服务环境中,外部请求会到达Gateway,Gateway对请求做转发、过滤、鉴权、熔断等前置操作。The gateway device refers to Gateway, abbreviated as (GW). Gateway is the gateway service framework under the SpringCloud technology stack. In the SpringCloud-based microservice environment, external requests will reach the Gateway, and the Gateway forwards, filters, authenticates, and Fusing and other pre-operations.
运行在Kubernetes环境的Gateway,如果使用了Spring-Cloud-Kubernetes框架就能得到Kubernetes的Service列表,因此,Gateway可以承担网关的角色,将外部请求转发至Kubernetes内的Service上。The Gateway running in the Kubernetes environment can get the Kubernetes Service list if the Spring-Cloud-Kubernetes framework is used. Therefore, the Gateway can assume the role of a gateway and forward external requests to the Services in Kubernetes.
参照图1所示,为本公开实施例提供的跨集群的网络通信系统的结构示意图之一,包括:Referring to FIG. 1 , it is one of the schematic structural diagrams of a cross-cluster network communication system provided by an embodiment of the present disclosure, including:
第一集群11,用于将原始数据包的目标地址确定为第二集群,并对原始数据包进行封装,生成封装数据包。The first cluster 11 is configured to determine the target address of the original data packet as the second cluster, and encapsulate the original data packet to generate an encapsulated data packet.
具体地,第一集群用Cluster1表示,第二集群用Cluster2表示,原始数据包指的是Cluster1中的数据包。Specifically, the first cluster is represented by Cluster1, the second cluster is represented by Cluster2, and the original data packet refers to the data packet in Cluster1.
封装指的是隐藏原始数据包的属性和实现细节,仅对外公开接口,控制在程序中属性的读和修改的访问级别,在本公开的实施例中,封 装指的是在原始数据包的外面再加一层Overlay网络的报文头。对应的,报文头可以理解为一些信息段,报文就是网络发送的单位,传输过程中会不断的封装成分组、包、帧来传输,封装的方式就是添加一些信息段,添加的信息段就是报文头。Encapsulation refers to hiding the attributes and implementation details of the original data packet, only exposing the interface to the outside world, and controlling the access level of reading and modifying attributes in the program. In the embodiments of the present disclosure, encapsulation refers to the outside of the original data packet Add a packet header of the Overlay network. Correspondingly, the message header can be understood as some information segments. The message is the unit sent by the network. During the transmission process, it will be continuously encapsulated into groups, packets, and frames for transmission. The way of encapsulation is to add some information segments. The added information segments It is the header.
对应的,采用IP隧道技术对原始数据包进行封装,IP隧道技术是路由器把一种网络层协议封装到另一个协议中以跨过网络传送到另一个路由器的处理过程。Correspondingly, IP tunneling technology is used to encapsulate the original data packet. IP tunneling technology is a process in which a router encapsulates one network layer protocol into another protocol for transmission across the network to another router.
IP隧道技术是一种数据包封装技术,它是将原始IP包(其报头包含原始发送者和最终目的地)封装在另一个数据包(称为封装的IP包)的数据净荷中进行传输。IP tunneling technology is a data packet encapsulation technology, which encapsulates the original IP packet (whose header contains the original sender and final destination) in the data payload of another data packet (called encapsulated IP packet) for transmission .
通过IP隧道技术对原始数据包进行封装,封装后的数据包称为封装数据包。The original data packet is encapsulated through the IP tunneling technology, and the encapsulated data packet is called an encapsulated data packet.
第一网关组件12,与第一集群对应设置,用于接收第一集群发送的封装数据包。The first gateway component 12 is set corresponding to the first cluster, and is used for receiving the encapsulated data packet sent by the first cluster.
具体地,第一网关组件指的是第一集群对应设置的Gateway1,将封装数据包发送至第一集群设置的Gateway1中。Specifically, the first gateway component refers to the Gateway1 correspondingly set in the first cluster, and sends the encapsulated data packet to the Gateway1 set in the first cluster.
对应地,第一集群可以设置一个或多个网关组件,当集群规模较大的时候,支持水平扩展增加网关组件,可以实现负载均衡。Correspondingly, one or more gateway components can be set in the first cluster, and when the scale of the cluster is large, it supports horizontal expansion to add gateway components to achieve load balancing.
第二网关组件13,与第二集群对应设置,用于接收第一网关组件发送的封装数据包,并将封装数据包发送至第二集群。The second gateway component 13 is set corresponding to the second cluster, and is used for receiving the encapsulated data packet sent by the first gateway component, and sending the encapsulated data packet to the second cluster.
具体地,第二网关组件指的是第二集群设置的Gateway2,同样地,第二集群也可以设置一个或多个网关组件。Specifically, the second gateway component refers to Gateway2 set in the second cluster, and similarly, one or more gateway components may also be set in the second cluster.
对应地,第一集群的Gateway1将封装数据包发送至第二集群的Gateway2中,然后第二集群的Gateway2再将封装数据包发送至第二集群。Correspondingly, Gateway1 of the first cluster sends the encapsulated data packet to Gateway2 of the second cluster, and then Gateway2 of the second cluster sends the encapsulated data packet to the second cluster.
第二集群14,用于接收第二网关组件发送的封装数据包,并对 封装数据包进行解封装得到原始数据包。The second cluster 14 is configured to receive the encapsulated data packet sent by the second gateway component, and decapsulate the encapsulated data packet to obtain the original data packet.
具体地,解封装就是封装的逆过程,将添加的Overlay网络的报文头去掉,得到原始的数据。Specifically, decapsulation is the inverse process of encapsulation, and the header of the added Overlay network is removed to obtain the original data.
对应地,通过Cluster2中的Node2对封装数据包进行解封装,得到原始数据包,即得到Cluster1中的数据包。Correspondingly, the encapsulated data packet is decapsulated by Node2 in Cluster2 to obtain the original data packet, that is, the data packet in Cluster1 is obtained.
本公开提供一种跨集群的网络通信系统,通过第一集群将原始数据包的目标地址确定为第二集群,第一集群对应的第一网关组件不能直接识别出原始数据包,因此,对原始数据包进行封装,能够让第一网关组件接收封装后的原始数据;通过第一网关组件再次将封装数据包发送至第二集群对应的第二网关组件中,最后第二网关组件将封装数据包发送给第二集群,第二集群对封装数据包进行解封装,得到原始数据包,借助第一集群对应的第一网关组件和第二集群对应的第二网关组件,实现了不同集群之间的通信。The present disclosure provides a cross-cluster network communication system. The target address of the original data packet is determined as the second cluster through the first cluster. The first gateway component corresponding to the first cluster cannot directly identify the original data packet. Therefore, the original Encapsulation of the data packet enables the first gateway component to receive the encapsulated original data; the encapsulated data packet is sent to the second gateway component corresponding to the second cluster through the first gateway component again, and finally the second gateway component will encapsulate the data packet sent to the second cluster, the second cluster decapsulates the encapsulated data packet to obtain the original data packet, and realizes the communication between different clusters by means of the first gateway component corresponding to the first cluster and the second gateway component corresponding to the second cluster communication.
参照图2所示,为本公开实施例提供的跨集群的网络通信系统的结构示意图之二,包括:Referring to FIG. 2 , the second schematic structural diagram of a cross-cluster network communication system provided by an embodiment of the present disclosure includes:
设置于第一集群中的第一目标节点21,用于对原始数据包进行封装,生成封装数据包,并将封装数据包经由发送端口发送至第一网关组件22;The first target node 21 set in the first cluster is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component 22 through the sending port;
设置于第二集群中的第二目标节点24,用于通过接收端口接收第二网关组件23发送的封装数据包,并对封装数据包进行解封装得到原始数据包;The second target node 24 arranged in the second cluster is used to receive the encapsulated data packet sent by the second gateway component 23 through the receiving port, and decapsulate the encapsulated data packet to obtain the original data packet;
其中,原始数据包的源地址为第一目标节点,原始数据包的目标地址为第二目标节点。Wherein, the source address of the original data packet is the first destination node, and the destination address of the original data packet is the second destination node.
具体地,在集群中包括多个节点,节点用Node表示,第一目标节点用Node1表示,第二目标节点Node2表示。Specifically, the cluster includes multiple nodes, and the nodes are represented by Node, the first target node is represented by Node1, and the second target node is represented by Node2.
对应地,Node1对原始数据包进行封装,生成封装数据包,并将 封装数据包经由发送端口发送至Gateway1,Node2通过接收端口接收Gateway2发送的封装数据包,并对封装数据包进行解封装得到原始数据包。Correspondingly, Node1 encapsulates the original data packet, generates an encapsulated data packet, and sends the encapsulated data packet to Gateway1 through the sending port, and Node2 receives the encapsulated data packet sent by Gateway2 through the receiving port, and decapsulates the encapsulated data packet to obtain the original data pack.
本公开实施例提供的跨集群的网络通信系统,实现了不同集群中的节点和节点之间的Overlay网络通信。The cross-cluster network communication system provided by the embodiments of the present disclosure implements Overlay network communication between nodes in different clusters.
参照图3所示,为本公开实施例提供的跨集群的网络通信系统的结构示意图之三,包括:Referring to FIG. 3 , the third schematic structural diagram of a cross-cluster network communication system provided by an embodiment of the present disclosure includes:
第一集群中设置有第一目标节点,第二集群中设置有第二目标节点,第一目标节点包括第一目标容器组;A first target node is set in the first cluster, a second target node is set in the second cluster, and the first target node includes a first target container group;
原始数据包的源地址为第一目标容器组,原始数据包的目标地址为第二目标节点;The source address of the original data packet is the first target container group, and the target address of the original data packet is the second target node;
第一目标容器组31,用于对原始数据包进行封装,生成封装数据包,并将封装数据包经由第一目标节点的发送端口发送至第一网关组件32;The first target container group 31 is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component 32 via the sending port of the first target node;
第二目标节点34,用于通过接收端口接收第二网关组件33发送的封装数据包,并对封装数据包进行解封装得到原始数据包。The second target node 34 is configured to receive the encapsulated data packet sent by the second gateway component 33 through the receiving port, and decapsulate the encapsulated data packet to obtain the original data packet.
具体地,容器组指的是Pod,Pod在K8s中是基本的管理单元,而不是容器(Container),Pod是K8s在容器上的一层封装,由一组运行在同一主机的一个或多个容器组成。Specifically, a container group refers to a Pod, which is a basic management unit in K8s, rather than a container (Container). A Pod is a layer of encapsulation of K8s on a container. Container composition.
Pod可以支持多容器在一个Pod中共享网络地址和文件系统,可以通过进程间通信和文件共享等简单高效的方式组合完成服务,当一个Pod包含多个容器时,这些容器总是运行于同一个工作节点上(Node),一个Pod绝对不会跨越多个工作节点。Pod can support multiple containers to share network addresses and file systems in a Pod, and services can be combined and completed in simple and efficient ways such as inter-process communication and file sharing. When a Pod contains multiple containers, these containers always run on the same On the working node (Node), a Pod will never span multiple working nodes.
对应地,第一目标容器组指的是Node1中的Pod1,Pod1对原始数据进行封装,生成封装数据包,Pod1将封装数据包发送至Cluster1对应的Gateway1中。Correspondingly, the first target container group refers to Pod1 in Node1. Pod1 encapsulates the original data to generate an encapsulated data packet, and Pod1 sends the encapsulated data packet to Gateway1 corresponding to Cluster1.
参照图4所示,为本公开实施例提供的跨集群的网络通信系统的结构示意图之四,包括:Referring to FIG. 4 , the fourth schematic structural diagram of a cross-cluster network communication system provided by an embodiment of the present disclosure includes:
第一集群中设置有第一目标节点,第二集群中设置有第二目标节点,第二目标节点包括第二目标容器组;A first target node is set in the first cluster, a second target node is set in the second cluster, and the second target node includes a second target container group;
原始数据包的源地址为第一目标节点,原始数据包的目标地址为第二目标容器组;The source address of the original data packet is the first target node, and the target address of the original data packet is the second target container group;
第一目标节点41,用于对原始数据包进行封装,生成封装数据包,并将封装数据包经由发送端口发送至第一网关组件42;The first target node 41 is configured to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component 42 through the sending port;
第二目标容器组44,用于接收第二目标节点根据目标地址发送的原始数据包,其中,第二目标节点发送的原始数据包为第二目标节点通过接收端口接收第二网关组件43发送的封装数据包,对封装数据包进行解封装得到。The second target container group 44 is used to receive the original data packet sent by the second target node according to the target address, wherein the original data packet sent by the second target node is received by the second target node through the receiving port and sent by the second gateway component 43 The encapsulated data packet is obtained by decapsulating the encapsulated data packet.
具体地,第二目标容器组指的是Node2中的Pod2。将Gateway1中的封装数据包发送至第二集群对应的Gateway2中,Gateway2再将封装数据包发送至第二集群中Node2的Pod2上。Pod2对封装数据包进行解封装,得到原始数据包。Specifically, the second target container group refers to Pod2 in Node2. Send the encapsulated data packet in Gateway1 to Gateway2 corresponding to the second cluster, and Gateway2 sends the encapsulated data packet to Pod2 of Node2 in the second cluster. Pod2 decapsulates the encapsulated data packet to obtain the original data packet.
本公开实施例提供的跨集群的网络通信系统,实现了不同集群中容器组和节点之间的Overlay网络通信。The cross-cluster network communication system provided by the embodiments of the present disclosure realizes Overlay network communication between container groups and nodes in different clusters.
参照图5所示,为本公开实施例提供的跨集群的网络通信系统的结构示意图之五,包括:Referring to FIG. 5 , the fifth structural diagram of a cross-cluster network communication system provided by an embodiment of the present disclosure includes:
第一集群中设置有第一目标节点,第二集群中设置有第二目标节点,第一目标节点包括第一目标容器组,第二目标节点包括第二目标容器组;A first target node is set in the first cluster, a second target node is set in the second cluster, the first target node includes a first target container group, and the second target node includes a second target container group;
原始数据包的源地址为第一目标容器组,原始数据包的目标地址为第二目标容器组;The source address of the original data packet is the first target container group, and the target address of the original data packet is the second target container group;
第一目标容器组51,用于对原始数据包进行封装,生成封装数 据包,并将封装数据包经由第一目标节点的发送端口发送至第一网关组件52;The first target container group 51 is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component 52 via the sending port of the first target node;
第二目标容器组54,用于接收第二目标节点根据目标地址发送的原始数据包,其中,第二目标节点发送的原始数据包为第二目标节点通过接收端口接收第二网关组件53发送的封装数据包,对封装数据包进行解封装得到。The second target container group 54 is used to receive the original data packet sent by the second target node according to the target address, wherein the original data packet sent by the second target node is received by the second target node through the receiving port and sent by the second gateway component 53 The encapsulated data packet is obtained by decapsulating the encapsulated data packet.
具体地,在第一集群Cluster1中设置第一目标节点Node1,在Node1中设置Pod1,第二集群Cluster2中设置第二目标节点Node2,在Node2中设置Pod2。Specifically, a first target node Node1 is set in the first cluster Cluster1, Pod1 is set in Node1, a second target node Node2 is set in the second cluster Cluster2, and Pod2 is set in Node2.
本公开实施例提供的跨集群的网络通信系统,实现了不同集群中容器组和容器组之间的Overlay网络通信。The cross-cluster network communication system provided by the embodiments of the present disclosure implements Overlay network communication between container groups in different clusters.
基于上述任一实施例,该系统还包括:Based on any of the above embodiments, the system also includes:
第一网关路由,设置于第一集群和第一网关组件之间,用于将封装数据包发送至第一集群对应的第一网关组件中;The first gateway route is set between the first cluster and the first gateway component, and is used to send the encapsulated data packet to the first gateway component corresponding to the first cluster;
第二网关路由,设置于第一网关组件与第二网关组件之间,用于将第一网关组件中的封装数据包发送至第二集群对应的第二网关组件中;The second gateway route is set between the first gateway component and the second gateway component, and is used to send the encapsulated data packet in the first gateway component to the second gateway component corresponding to the second cluster;
第三网关路由,设置于第二网关组件和第二集群之间,用于将第二网关组件中的封装数据包发送至第二集群。The third gateway route is set between the second gateway component and the second cluster, and is used to send the encapsulated data packet in the second gateway component to the second cluster.
可以理解的是,路由是指路由器从一个接口上收到数据包,根据数据包的目的地址进行定向并转发到另一个接口的过程。该步骤中,是将封装数据包从发送节点上发送至第一网关组件中。It can be understood that routing refers to the process in which a router receives a data packet from one interface, directs it according to the destination address of the data packet, and forwards it to another interface. In this step, the encapsulated data packet is sent from the sending node to the first gateway component.
具体地,第一网关路由可以理解为指向Gateway1的路由1,路由1是由Route-Controller产生。通过第一集群中的发送节点确定指向Gateway1的路由,基于Gateway1的路由将封装数据包发送至第一网关组件中,即Gateway1中。Specifically, the first gateway route may be understood as route 1 pointing to Gateway1, and route 1 is generated by the Route-Controller. A route pointing to Gateway1 is determined by the sending node in the first cluster, and the encapsulated data packet is sent to the first gateway component, ie, Gateway1, based on the route of Gateway1.
第二网关路由为指向Gateway2的路由2,路由2是由Route-Controller产生。将Gateway1中的封装数据包基于路由2发送至第二集群对应的Gateway2中。The second gateway route is route 2 pointing to Gateway2, and route 2 is generated by Route-Controller. Send the encapsulated data packet in Gateway1 to Gateway2 corresponding to the second cluster based on route 2.
第三路由为指向第二集群(可以理解为指向第二集群中的接收节点Node2)的路由3,路由3是由Node-Controller产生。Gateway2将封装数据包基于路由3发送到第二集群中的Node2上。可以理解的是,通过Node2可以确定指向第二目标容器组的第四路由,基于第四路由将封装数据包发送至Node2的第二目标容器组,第四路由为指向Node2的路由4,路由4是由Node-Controller产生。基于路由4将封装数据包发送至Node2的Pod2上。The third route is route 3 pointing to the second cluster (which can be understood as pointing to the receiving node Node2 in the second cluster), and the route 3 is generated by the Node-Controller. Gateway2 sends the encapsulated data packet to Node2 in the second cluster based on route 3. It can be understood that the fourth route pointing to the second target container group can be determined through Node2, and the encapsulated data packet is sent to the second target container group of Node2 based on the fourth route. The fourth route is route 4 pointing to Node2, and route 4 It is generated by Node-Controller. Send the encapsulated data packet to Pod2 of Node2 based on route 4.
可以理解的是,第一网关路由、第二网关路由和第三网关路由的设置之前需要先进行配置路由相关信息,具体的过程为下述步骤1~3:It can be understood that before setting the first gateway route, the second gateway route and the third gateway route, it is necessary to configure route-related information. The specific process is the following steps 1-3:
步骤1,创建CRD(Custom Resource Definition)表示Overlay网络的路由信息。Step 1. Create a CRD (Custom Resource Definition) to represent the routing information of the Overlay network.
其中,在创建的CRD结构体中,用TunnelType表示Overlay隧道的类型,在本公开的实施例中使用的是IP隧道技术,Route是具体的路由信息,Destination是路由的目的IP地址(目的IP地址为目的集群的IP地址,在本公开实施例中为第二集群),Remote是路由的下一跳列表(在本公开实施例中下一跳包括第一网关组件和第二网关组件),如果是多个目的IP,形成等价路由(ECMP,Equal Cost Multi-path)。Wherein, in the CRD structure that is created, use TunnelType to represent the type of Overlay tunnel, what use in the embodiment of the present disclosure is IP tunneling technology, Route is concrete route information, and Destination is the purpose IP address of route (purpose IP address is the IP address of the destination cluster, which is the second cluster in the embodiment of the disclosure), Remote is the next hop list of the route (the next hop includes the first gateway component and the second gateway component in the embodiment of the disclosure), if It is multiple destination IPs, forming an equal-cost route (ECMP, Equal Cost Multi-path).
等价路由(ECMP)可以理解为在存在多条不同链路到达同一目的地址的网络环境中,如果使用传统的路由技术,发往该目的地址的数据包只能利用其中的一条链路,其它链路处于备份状态或无效状态,并且在动态路由环境下相互的切换需要一定时间,而等值多路径路由协议可以在该网络环境下同时使用多条链路,不仅增加了传输带宽, 并且可以无时延无丢包地备份失效链路的数据传输。ECMP最大的特点是实现了等值情况下,多路径负载均衡。Equal-cost routing (ECMP) can be understood as in a network environment where there are multiple different links to the same destination address, if traditional routing technology is used, the data packet sent to the destination address can only use one of the links, and the other Links are in a backup state or invalid state, and it takes a certain amount of time to switch between each other in a dynamic routing environment, and the equivalent multipath routing protocol can use multiple links at the same time in this network environment, which not only increases the transmission bandwidth, but also can Back up the data transmission of the failed link without delay or packet loss. The biggest feature of ECMP is that it realizes multi-path load balancing under the condition of equal value.
步骤2,用Cni程序配置容器网络,用Agent程序配置容器Overlay网络路由。Step 2, use the Cni program to configure the container network, and use the Agent program to configure the container Overlay network route.
具体地,Cni程序使用K8s标准Cni接口实现,用来给Pod分配IP(IPAM功能),用于配置指向Pod的路由。Specifically, the Cni program is implemented using the K8s standard Cni interface, which is used to assign an IP (IPAM function) to the Pod, and is used to configure the route pointing to the Pod.
Agent程序作用是通过与Apiserver交互,获取Pod、Node、RouteCRD信息,配置容器Overlay网络路由。The role of the Agent program is to interact with the Apiserver to obtain Pod, Node, and RouteCRD information, and configure container Overlay network routing.
Apiserver是集群的核心,负责集群各功能模块之间的通信,集群内各个功能模块通过Apiserver将信息存入etcd,当需要获取和操作这些数据时,通过API Server提供的REST接口(List/Watch方法)来实现,从而实现各模块之间的信息交互。Apiserver is the core of the cluster and is responsible for the communication between the functional modules of the cluster. Each functional module in the cluster stores information into etcd through Apiserver. ) to achieve information exchange between modules.
步骤3,Agent程序通过Config配置文件进行初始化,启动对应的控制器(Controller),List/Watch Apiserver并下发Overlay路由。Step 3, the Agent program is initialized through the Config configuration file, starts the corresponding controller (Controller), List/Watch Apiserver and sends the Overlay route.
其中,Controller包括:Pod-Controller,Node-Controller,Route-Controller。Among them, Controller includes: Pod-Controller, Node-Controller, Route-Controller.
具体地,Agent程序通过Config配置文件进行初始化,配置的结构为:Kubeconfig是与Apiserver通信的认证文件地址,TlIPRoute/TlNodeRoute/TlRoute分别表示开启Pod-Controller、Node-Controller、Route-Controller的开关,TlRouteLabel是Route-controller监控的RouteCRD的label选择器。Specifically, the Agent program is initialized through the Config configuration file. The configuration structure is: Kubeconfig is the address of the authentication file communicating with the Apiserver, TlIPRoute/TlNodeRoute/TlRoute respectively indicate the switch to enable the Pod-Controller, Node-Controller, and Route-Controller, and TlRouteLabel It is the label selector of RouteCRD monitored by Route-controller.
具体地,参照图6所示,为本公开实施例提供的Cni程序和Agent程序的原理示意图。Specifically, refer to FIG. 6 , which is a schematic diagram of the principles of the Cni program and the Agent program provided by the embodiment of the present disclosure.
1.Pod-Controller1. Pod-Controller
作用是List/Watch Pod信息,下发指向Pod的Overlay路由,用于Pod跨Node互通,例如,ip route add{PodIP}via{NodeIP}dev tunl0  onlink,目的IP是Pod的IP,下一跳是Pod所在的NodeIP,出接口是tunl0口。The function is to List/Watch Pod information, issue the Overlay route pointing to the Pod, and use it for Pod cross-Node communication, for example, ip route add{PodIP}via{NodeIP}dev tunl0 onlink, the destination IP is the IP of the Pod, and the next hop is The NodeIP where the Pod is located, and the outbound interface is tunl0.
2.Node-Controller2. Node-Controller
作用是List/Watch Node信息,在table 16中下发指向Node的Overlay路由,用于Pod和Node互通,例如,ip route add{NodeIP}via{NodeIP}dev tunl0 onlink table 16,目的IP和下一跳都是Node的IP,出接口是tunl0口。其中,table 16中存储着关于Node的Overlay路由信息。The role is to List/Watch Node information. In table 16, the Overlay route pointing to Node is issued for the intercommunication between Pod and Node. For example, ip route add{NodeIP}via{NodeIP}dev tunl0 onlink table 16, destination IP and next The jumps are the IP of the Node, and the outgoing interface is the tunl0 port. Among them, table 16 stores Overlay routing information about Node.
3.Route-Controller3. Route-Controller
作用是List/Watch RouteCRD信息,下发指向目的网段(其他集群的网段)的Overlay路由,主要用于集群间路由打通,例如ip route add{Destination}onlink nexthop via{GW1}dev tunl0 weight 2 onlink nexthop via{GW2}dev tunl0 weight 2 onlink,目的Destination是一个网段或IP,下一跳是网关的IP(多个下一跳形成ECMP),出接口是tunl0口。The function is to List/Watch RouteCRD information, and issue the Overlay route pointing to the destination network segment (the network segment of other clusters), which is mainly used for inter-cluster routing, such as ip route add{Destination}onlink nexthop via{GW1}dev tunl0 weight 2 onlink nexthop via{GW2}dev tunl0 weight 2 onlink, the destination is a network segment or IP, the next hop is the IP of the gateway (multiple next hops form ECMP), and the outbound interface is tunl0.
进一步地,以实现不同集群中的Pod之间的通信为例,对本公开的实施做进一步补充说明,参照图7所示,为本公开实施例提供的Cluster1与Cluster2之间的Pod通信的框图,具体的Cluster1与Cluster2之间的Pod通信的具体过程为步骤11~14。Further, taking the communication between Pods in different clusters as an example, the implementation of the present disclosure will be further explained. Referring to FIG. 7 , which is a block diagram of Pod communication between Cluster1 and Cluster2 provided by the embodiment of the present disclosure, The specific process of Pod communication between Cluster1 and Cluster2 is steps 11-14.
在第一集群中,第一集群用Cluster1表示,节点用Node1表示,容器组用Pod1表示;在第二集群中,第二集群用Cluster2表示,节点用Node2表示,容器组用Pod2表示;GW1表示第一集群对应设置的网关,GW2表示第二集群对应设置的网关。默认在进行通信之间已经配置好相关路由信息,直接用路由1、路由2、路由3和路由4进行表示。In the first cluster, the first cluster is represented by Cluster1, the node is represented by Node1, and the container group is represented by Pod1; in the second cluster, the second cluster is represented by Cluster2, the node is represented by Node2, and the container group is represented by Pod2; GW1 represents The first cluster corresponds to the configured gateway, and GW2 indicates the second cluster corresponds to the configured gateway. By default, relevant routing information has been configured during communication, which are directly represented by route 1, route 2, route 3 and route 4.
步骤11,获取Pod1的原始数据包,根据Pod2 IP确定路由1, 对原始数据包进行封装,生成封装数据包,从Node1的网卡发出。 Step 11, obtain the original data packet of Pod1, determine the route 1 according to the IP of Pod2, encapsulate the original data packet, generate an encapsulated data packet, and send it from the network card of Node1.
具体的,原始数据包从Pod1出来,根据目的IP(Pod2 IP)查找路由,先在table 16查找,没有合适路由,再查table main,确定有出接口tunl0的路由1(指向GW1的路由),采用IP隧道技术对原始数据进行封装,生成封装数据包,(在封装数据包中原始IP是Node1的IP,目的IP是GW1的IP)之后从Node1的网卡(eth)发出。Specifically, the original data packet comes out of Pod1, and the route is searched according to the destination IP (Pod2 IP). First search in table 16, if there is no suitable route, then check the table main, and confirm that there is route 1 of the outbound interface tun10 (the route pointing to GW1), The original data is encapsulated by IP tunneling technology to generate an encapsulated data packet, (in the encapsulated data packet, the original IP is the IP of Node1, and the destination IP is the IP of GW1) and then sent from the network card (eth) of Node1.
其中,table 16中存储着关于Node的Overlay路由信息,table main中存储着关于Pod和网关组件的相关路由信息。Among them, table 16 stores Overlay routing information about Node, and table main stores related routing information about Pod and gateway components.
步骤12,GW1收到封装数据包后,进行解封装,根据下一跳的IP查找路由确定路由2,再次将数据包进行封装之后,从GW1的网卡发出。Step 12: After receiving the encapsulated data packet, GW1 decapsulates it, searches for the route according to the IP of the next hop to determine route 2, encapsulates the data packet again, and sends it out from the network card of GW1.
具体的,GW1收到封装数据包后,解封装IPIP头,查找路由,有出接口tunl0的路由2,下一跳是Cluster2的网关组件GW2,再次封装IPIP头(在封装数据包中原始IP是Cluster1的GW1的IP,目的IP是Cluster2的GW2的IP),之后从GW1的网卡(eth)发出。Specifically, after GW1 receives the encapsulated data packet, it decapsulates the IPIP header, searches for the route, finds that there is route 2 with an outbound interface tun10, and the next hop is the gateway component GW2 of Cluster2, and then encapsulates the IPIP header again (the original IP in the encapsulated data packet is The IP of GW1 of Cluster1, the destination IP is the IP of GW2 of Cluster2), and then sent from the network card (eth) of GW1.
步骤13,Cluster2的GW2收到封装数据包后,进行解封装,根据Pod2 IP确定路由3,再次对原始数据包进行封装,之后从GW2的网卡发出。Step 13: After receiving the encapsulated data packet, GW2 of Cluster2 decapsulates it, determines route 3 according to Pod2 IP, encapsulates the original data packet again, and sends it out from the network card of GW2.
具体的,Cluster2的GW2收到封装数据包后,解封装IPIP头,根据目的IP(Pod2 IP)查找路由,确定有出接口tunl0的路由3(指向Pod2 IP的路由),再次封装IPIP头(在封装数据包中原始IP是GW2的IP,目的IP是Cluster2中GW2的IP),之后从GW2的网卡(eth)发出。Specifically, after receiving the encapsulated data packet, GW2 of Cluster2 decapsulates the IPIP header, searches for the route according to the destination IP (Pod2 IP), determines that there is a route 3 (pointing to the Pod2 IP) of the outbound interface tun10, and encapsulates the IPIP header again (in The original IP in the encapsulated data packet is the IP of GW2, and the destination IP is the IP of GW2 in Cluster2), and then sent from the network card (eth) of GW2.
步骤14,Node2收到封装数据包后,进行解封装,得到原始数据包,确定有指向Node2中Pod2的路由4,将原始数据包直接转发到Pod2的上。 Step 14, after receiving the encapsulated data packet, Node2 decapsulates it to obtain the original data packet, determines that there is a route 4 pointing to Pod2 in Node2, and forwards the original data packet directly to Pod2.
具体的,Node2收到封装数据包后,解封装IPIP头,根据内层的目的IP(Pod2)查找路由,查找table main表,确定有指向veth的路由4,直接转发到Pod2的veth上。Specifically, after Node2 receives the encapsulated data packet, it decapsulates the IPIP header, looks up the route according to the inner destination IP (Pod2), looks up the table main table, determines that there is a route 4 pointing to veth, and forwards it directly to the veth of Pod2.
本公开实施例提供的跨集群的网络通信系统,实现了不同集群中的容器组之间的通信。The cross-cluster network communication system provided by the embodiments of the present disclosure realizes communication between container groups in different clusters.
下面对本公开实施例提供的跨集群的网络通信方法进行描述,用于上述任一项所述的网络通信系统,具体包括:The following describes the cross-cluster network communication method provided by the embodiments of the present disclosure, which is used in the network communication system described in any one of the above, specifically including:
具体参照图8所示,为本公开实施例提供的一种跨集群的网络通信方法的流程示意图,该方法包括:Specifically referring to FIG. 8 , which is a schematic flowchart of a cross-cluster network communication method provided by an embodiment of the present disclosure, the method includes:
810,通过第一集群将原始数据包的目标地址确定为第二集群。810. Determine the destination address of the original data packet as the second cluster by using the first cluster.
820,通过第一集群对原始数据包进行封装,生成封装数据包。820. Encapsulate the original data packet through the first cluster to generate an encapsulated data packet.
830,通过第一集群将封装数据包发送至第一集群对应的第一网关组件中。830. Send the encapsulated data packet to the first gateway component corresponding to the first cluster through the first cluster.
840,通过第一网关组件将封装数据包发送至第二集群对应的第二网关组件中,以使第二网关组件将封装数据包发送至第二集群,并通过第二集群对封装数据包进行解封装,得到原始数据包。840. Send the encapsulated data packet to the second gateway component corresponding to the second cluster through the first gateway component, so that the second gateway component sends the encapsulated data packet to the second cluster, and the encapsulated data packet is processed by the second cluster Decapsulate to get the original data packet.
本公开提供一种跨集群的网络通信方法,通过第一集群将原始数据包的目标地址确定为第二集群,第一集群对应的第一网关组件不能直接识别出原始数据包,因此,对原始数据包进行封装,能够让第一网关组件接收封装后的原始数据;通过第一网关组件再次将封装数据包发送至第二集群对应的第二网关组件中,最后第二网关组件将封装数据包发送给第二集群,第二集群对封装数据包进行解封装,得到原始数据包,借助第一集群对应的第一网关组件和第二集群对应的第二网关组件,实现了不同集群之间的通信。The present disclosure provides a cross-cluster network communication method. The target address of the original data packet is determined as the second cluster through the first cluster. The first gateway component corresponding to the first cluster cannot directly identify the original data packet. Therefore, the original Encapsulation of the data packet enables the first gateway component to receive the encapsulated original data; the encapsulated data packet is sent to the second gateway component corresponding to the second cluster through the first gateway component again, and finally the second gateway component will encapsulate the data packet sent to the second cluster, the second cluster decapsulates the encapsulated data packet to obtain the original data packet, and realizes the communication between different clusters by means of the first gateway component corresponding to the first cluster and the second gateway component corresponding to the second cluster communication.
基于上述任一实施例,第一集群包括第一目标节点,第二集群包括第二目标节点;原始数据包的源地址为第一目标节点,原始数据包 的目标地址为第二目标节点;Based on any of the above embodiments, the first cluster includes a first target node, and the second cluster includes a second target node; the source address of the original data packet is the first target node, and the target address of the original data packet is the second target node;
该方法还包括:The method also includes:
通过第一目标节点对原始数据包进行封装,生成封装数据包,并将封装数据包经由第一目标节点的发送端口发送至第一网关组件;encapsulating the original data packet by the first target node, generating the encapsulated data packet, and sending the encapsulated data packet to the first gateway component via the sending port of the first target node;
通过第二目标节点的接收端口接收第二网关组件发送的封装数据包,并对封装数据包进行解封装得到原始数据包。The encapsulated data packet sent by the second gateway component is received through the receiving port of the second target node, and the encapsulated data packet is decapsulated to obtain the original data packet.
基于上述任一实施例,第一集群中包括第一目标节点,第一目标节点包括第一目标容器组,第二集群包括第二目标节点;原始数据包的源地址为第一目标容器组,原始数据包的目标地址为第二目标节点;Based on any of the above embodiments, the first cluster includes a first target node, the first target node includes a first target container group, and the second cluster includes a second target node; the source address of the original data packet is the first target container group, The destination address of the original data packet is the second destination node;
该方法还包括:The method also includes:
通过第一目标容器组对原始数据包进行封装,生成封装数据包,并将封装数据包经由第一目标节点的发送端口发送至第一网关组件;Encapsulate the original data packet through the first target container group, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port of the first target node;
通过第二目标节点的接收端口接收第二网关组件发送的封装数据包,并对封装数据包进行解封装得到原始数据包。The encapsulated data packet sent by the second gateway component is received through the receiving port of the second target node, and the encapsulated data packet is decapsulated to obtain the original data packet.
基于上述任一实施例,第一集群中包括第一目标节点,第二集群包括第二目标节点,第二目标节点包括第二目标容器组;原始数据包的源地址为第一目标节点,原始数据包的目标地址为第二目标容器组;Based on any of the above embodiments, the first cluster includes the first target node, the second cluster includes the second target node, and the second target node includes the second target container group; the source address of the original data packet is the first target node, and the original The destination address of the data packet is the second destination container group;
该方法还包括:The method also includes:
通过第一目标节点对原始数据包进行封装,生成封装数据包,并将封装数据包经由发送端口发送至第一网关组件;encapsulating the original data packet through the first target node, generating the encapsulated data packet, and sending the encapsulated data packet to the first gateway component through the sending port;
通过第二目标容器组接收第二目标节点根据目标地址发送的原始数据包,其中,第二目标节点发送的原始数据包为第二目标节点通过接收端口接收第二网关组件发送的封装数据包,对封装数据包进行解封装得到。The original data packet sent by the second target node according to the target address is received through the second target container group, wherein the original data packet sent by the second target node is an encapsulated data packet sent by the second gateway component received by the second target node through the receiving port, Obtained by decapsulating the encapsulated data packet.
基于上述任一实施例,第一集群中包括第一目标节点,第一目标节点包括第一目标容器组,第二集群包括第二目标节点,第二目标节 点包括第二目标容器组;原始数据包的源地址为第一目标容器组,原始数据包的目标地址为第二目标容器组;Based on any of the above embodiments, the first cluster includes a first target node, the first target node includes a first target container group, the second cluster includes a second target node, and the second target node includes a second target container group; the original data The source address of the packet is the first target container group, and the target address of the original data packet is the second target container group;
该方法还包括:The method also includes:
通过第一目标容器组对原始数据包进行封装,生成封装数据包,并将封装数据包经由第一目标节点的发送端口发送至第一网关组件;Encapsulate the original data packet through the first target container group, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port of the first target node;
通过第二目标容器组接收第二目标节点根据目标地址发送的原始数据包,其中,第二目标节点发送的原始数据包为第二目标节点通过接收端口接收第二网关组件发送的封装数据包,对封装数据包进行解封装得到。The original data packet sent by the second target node according to the target address is received through the second target container group, wherein the original data packet sent by the second target node is an encapsulated data packet sent by the second gateway component received by the second target node through the receiving port, Obtained by decapsulating the encapsulated data packet.
图9示例了一种电子设备的实体结构示意图,如图9所示,该电子设备可以包括:处理器(processor)910、通信接口(Communications Interface)920、存储器(memory)930和通信总线940,其中,处理器910,通信接口920,存储器930通过通信总线940完成相互间的通信。处理器910可以调用存储器930中的逻辑指令,以执行一种跨集群的网络通信系统,网络通信系统包括:第一集群,用于将原始数据包的目标地址确定为第二集群,并对原始数据包进行封装,生成封装数据包;第一网关组件,与第一集群对应设置,用于接收第一集群发送的封装数据包;第二网关组件,与第二集群对应设置,用于接收第一网关组件发送的封装数据包,并将所述封装数据包发送至第二集群;第二集群,用于接收第二网关组件发送的封装数据包,并对封装数据包进行解封装得到原始数据包。FIG. 9 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG. 9, the electronic device may include: a processor (processor) 910, a communication interface (Communications Interface) 920, a memory (memory) 930 and a communication bus 940, Wherein, the processor 910 , the communication interface 920 , and the memory 930 communicate with each other through the communication bus 940 . The processor 910 can call the logic instructions in the memory 930 to execute a cross-cluster network communication system, the network communication system includes: a first cluster, used to determine the target address of the original data packet as the second cluster, and The data packet is encapsulated to generate an encapsulated data packet; the first gateway component is set corresponding to the first cluster, and is used to receive the encapsulated data packet sent by the first cluster; the second gateway component is set corresponding to the second cluster, and is used to receive the second cluster An encapsulated data packet sent by a gateway component, and the encapsulated data packet is sent to a second cluster; the second cluster is used to receive the encapsulated data packet sent by the second gateway component, and decapsulate the encapsulated data packet to obtain original data Bag.
此外,上述的存储器930中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在计算机可读取存储介质中。基于这样的理解,本公开实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干 指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above-mentioned logic instructions in the memory 930 may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the embodiments of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium. Several instructions are included to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
另一方面,本公开还提供一种计算机程序产品,计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,计算机程序包括程序指令,当程序指令被计算机执行时,计算机能够执行上述所提供的一种跨集群的网络通信系统,网络通信系统包括:第一集群,用于将原始数据包的目标地址确定为第二集群,并对原始数据包进行封装,生成封装数据包;第一网关组件,与第一集群对应设置,用于接收第一集群发送的封装数据包;第二网关组件,与第二集群对应设置,用于接收第一网关组件发送的封装数据包,并将封装数据包发送至第二集群;第二集群,用于接收第二网关组件发送的封装数据包,并对封装数据包进行解封装得到原始数据包。On the other hand, the present disclosure also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by the computer, the computer can execute A cross-cluster network communication system provided above, the network communication system includes: a first cluster, used to determine the target address of the original data packet as the second cluster, and encapsulate the original data packet to generate an encapsulated data packet; The first gateway component is set corresponding to the first cluster, and is used to receive the encapsulated data packet sent by the first cluster; the second gateway component is set corresponding to the second cluster, and is used to receive the encapsulated data packet sent by the first gateway component, and Send the encapsulated data packet to the second cluster; the second cluster is used to receive the encapsulated data packet sent by the second gateway component, and decapsulate the encapsulated data packet to obtain the original data packet.
又一方面,本公开还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各提供的一种跨集群的网络通信系统,网络通信系统包括:第一集群,用于将原始数据包的目标地址确定为第二集群,并对原始数据包进行封装,生成封装数据包;第一网关组件,与第一集群对应设置,用于接收第一集群发送的封装数据包;第二网关组件,与第二集群对应设置,用于接收第一网关组件发送的封装数据包,并将封装数据包发送至第二集群;第二集群,用于接收第二网关组件发送的封装数据包,并对封装数据包进行解封装得到原始数据包。In yet another aspect, the present disclosure also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it is implemented to implement the above-mentioned cross-cluster network communication system provided by each, The network communication system includes: a first cluster, which is used to determine the target address of the original data packet as the second cluster, and encapsulates the original data packet to generate an encapsulated data packet; the first gateway component is set corresponding to the first cluster, and uses For receiving the encapsulated data packet sent by the first cluster; the second gateway component is set corresponding to the second cluster, and is used to receive the encapsulated data packet sent by the first gateway component and send the encapsulated data packet to the second cluster; the second cluster , for receiving the encapsulated data packet sent by the second gateway component, and decapsulating the encapsulated data packet to obtain the original data packet.
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件 可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place , or can also be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative efforts.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the implementations, those skilled in the art can clearly understand that each implementation can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic discs, optical discs, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.
最后应说明的是:以上实施例仅用以说明本公开的技术方案,而非对其限制;尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present disclosure.

Claims (14)

  1. 一种跨集群的网络通信系统,包括:A cross-cluster network communication system, including:
    第一集群,用于对所述原始数据包进行封装,生成封装数据包;The first cluster is configured to encapsulate the original data packet to generate an encapsulated data packet;
    第一网关组件,与所述第一集群对应设置,用于接收所述第一集群发送的所述封装数据包;A first gateway component, set corresponding to the first cluster, for receiving the encapsulated data packet sent by the first cluster;
    第二网关组件,与第二集群对应设置,用于接收所述第一网关组件发送的所述封装数据包,并将所述封装数据包发送至所述第二集群;以及A second gateway component, set corresponding to the second cluster, for receiving the encapsulated data packet sent by the first gateway component, and sending the encapsulated data packet to the second cluster; and
    第二集群,用于接收所述第二网关组件发送的所述封装数据包,并对所述封装数据包进行解封装得到原始数据包。The second cluster is configured to receive the encapsulated data packet sent by the second gateway component, and decapsulate the encapsulated data packet to obtain an original data packet.
  2. 根据权利要求1所述的跨集群的网络通信系统,还包括:The cross-cluster network communication system according to claim 1, further comprising:
    设置于第一集群中的第一目标节点,用于对所述原始数据包进行封装,生成所述封装数据包,并将所述封装数据包经由发送端口发送至所述第一网关组件;以及The first target node set in the first cluster is used to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through a sending port; and
    设置于第二集群中的第二目标节点,用于通过接收端口接收所述第二网关组件发送的所述封装数据包,并对所述封装数据包进行解封装得到原始数据包;The second target node set in the second cluster is used to receive the encapsulated data packet sent by the second gateway component through a receiving port, and decapsulate the encapsulated data packet to obtain an original data packet;
    其中,所述原始数据包的源地址为第一目标节点,所述原始数据包的目标地址为所述第二目标节点。Wherein, the source address of the original data packet is the first destination node, and the destination address of the original data packet is the second destination node.
  3. 根据权利要求1所述的跨集群的网络通信系统,其中:The cross-cluster network communication system according to claim 1, wherein:
    所述第一集群中设置有第一目标节点,所述第二集群中设置有第二目标节点,所述第一目标节点包括第一目标容器组;A first target node is set in the first cluster, a second target node is set in the second cluster, and the first target node includes a first target container group;
    所述原始数据包的源地址为第一目标容器组,所述原始数据包的目标地址为所述第二目标节点;The source address of the original data packet is the first target container group, and the target address of the original data packet is the second target node;
    所述第一目标容器组,用于对所述原始数据包进行封装,生成所述封装数据包,并将所述封装数据包经由所述第一目标节点的发送端 口发送至所述第一网关组件;The first target container group is configured to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway via the sending port of the first target node components;
    所述第二目标节点,用于通过接收端口接收所述第二网关组件发送的所述封装数据包,并对所述封装数据包进行解封装得到原始数据包。The second target node is configured to receive the encapsulated data packet sent by the second gateway component through a receiving port, and decapsulate the encapsulated data packet to obtain an original data packet.
  4. 根据权利要求1所述的跨集群的网络通信系统,其中:The cross-cluster network communication system according to claim 1, wherein:
    所述第一集群中设置有第一目标节点,所述第二集群中设置有第二目标节点,所述第二目标节点包括第二目标容器组;A first target node is set in the first cluster, a second target node is set in the second cluster, and the second target node includes a second target container group;
    所述原始数据包的源地址为第一目标节点,所述原始数据包的目标地址为第二目标容器组;The source address of the original data packet is the first target node, and the target address of the original data packet is the second target container group;
    所述第一目标节点,用于对所述原始数据包进行封装,生成所述封装数据包,并将所述封装数据包经由发送端口发送至所述第一网关组件;The first target node is configured to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through a sending port;
    所述第二目标容器组,用于接收第二目标节点根据所述目标地址发送的原始数据包,其中,所述第二目标节点发送的原始数据包为所述第二目标节点通过接收端口接收所述第二网关组件发送的所述封装数据包,对所述封装数据包进行解封装得到。The second target container group is configured to receive the original data packet sent by the second target node according to the target address, wherein the original data packet sent by the second target node is received by the second target node through a receiving port The encapsulated data packet sent by the second gateway component is obtained by decapsulating the encapsulated data packet.
  5. 根据权利要求1所述的跨集群的网络通信系统,其中:The cross-cluster network communication system according to claim 1, wherein:
    所述第一集群中设置有第一目标节点,所述第二集群中设置有第二目标节点,所述第一目标节点包括第一目标容器组,第二目标节点包括第二目标容器组;A first target node is set in the first cluster, a second target node is set in the second cluster, the first target node includes a first target container group, and the second target node includes a second target container group;
    所述原始数据包的源地址为第一目标容器组,所述原始数据包的目标地址为第二目标容器组;The source address of the original data packet is the first target container group, and the target address of the original data packet is the second target container group;
    所述第一目标容器组,用于对所述原始数据包进行封装,生成所述封装数据包,并将所述封装数据包经由所述第一目标节点的发送端口发送至所述第一网关组件;The first target container group is configured to encapsulate the original data packet, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway via the sending port of the first target node components;
    所述第二目标容器组,用于接收第二目标节点根据所述目标地址 发送的原始数据包,其中,所述第二目标节点发送的原始数据包为所述第二目标节点通过接收端口接收所述第二网关组件发送的所述封装数据包,对所述封装数据包进行解封装得到。The second target container group is configured to receive the original data packet sent by the second target node according to the target address, wherein the original data packet sent by the second target node is received by the second target node through a receiving port The encapsulated data packet sent by the second gateway component is obtained by decapsulating the encapsulated data packet.
  6. 根据权利要求1所述的跨集群的网络通信系统,还包括:The cross-cluster network communication system according to claim 1, further comprising:
    第一网关路由,设置于所述第一集群和所述第一网关组件之间,用于将所述封装数据包发送至所述第一集群对应的第一网关组件中;The first gateway route is set between the first cluster and the first gateway component, and is used to send the encapsulated data packet to the first gateway component corresponding to the first cluster;
    第二网关路由,设置于所述第一网关组件与所述第二网关组件之间,用于将所述第一网关组件中的封装数据包发送至所述第二集群对应的第二网关组件中;The second gateway route is set between the first gateway component and the second gateway component, and is used to send the encapsulated data packet in the first gateway component to the second gateway component corresponding to the second cluster middle;
    第三网关路由,设置于所述第二网关组件和所述第二集群之间,用于将所述第二网关组件中的封装数据包发送至所述第二集群。The third gateway route is set between the second gateway component and the second cluster, and is used to send the encapsulated data packet in the second gateway component to the second cluster.
  7. 一种跨集群的网络通信方法,包括:A cross-cluster network communication method, comprising:
    通过第一集群对原始数据包进行封装,生成封装数据包;Encapsulating the original data packet through the first cluster to generate an encapsulated data packet;
    通过所述第一集群将所述封装数据包发送至与所述第一集群对应的第一网关组件中;sending the encapsulated data packet to a first gateway component corresponding to the first cluster through the first cluster;
    通过所述第一网关组件将所述封装数据包发送至与第二集群对应的第二网关组件中,以使所述第二网关组件将所述封装数据包发送至所述第二集群;并且sending the encapsulated data packet to a second gateway component corresponding to a second cluster through the first gateway component, so that the second gateway component sends the encapsulated data packet to the second cluster; and
    通过所述第二集群对所述封装数据包进行解封装,得到所述原始数据包。The encapsulated data packet is decapsulated by the second cluster to obtain the original data packet.
  8. 根据权利要求7所述的跨集群的网络通信方法,其中,所述第一集群包括第一目标节点,所述第二集群包括第二目标节点;所述原始数据包的源地址为第一目标节点,所述原始数据包的目标地址为所述第二目标节点;The cross-cluster network communication method according to claim 7, wherein the first cluster includes a first target node, and the second cluster includes a second target node; the source address of the original data packet is the first target node node, the destination address of the original data packet is the second destination node;
    所述方法还包括:The method also includes:
    通过所述第一目标节点对所述原始数据包进行封装,生成所述封 装数据包,并将所述封装数据包经由所述第一目标节点的发送端口发送至所述第一网关组件;Encapsulating the original data packet by the first target node, generating the encapsulated data packet, and sending the encapsulated data packet to the first gateway component via the sending port of the first target node;
    通过所述第二目标节点的接收端口接收所述第二网关组件发送的所述封装数据包,并对所述封装数据包进行解封装得到原始数据包。The encapsulated data packet sent by the second gateway component is received through the receiving port of the second target node, and the encapsulated data packet is decapsulated to obtain an original data packet.
  9. 根据权利要求7所述的跨集群的网络通信方法,其中,所述第一集群中包括第一目标节点,所述第一目标节点包括第一目标容器组,所述第二集群包括第二目标节点;所述原始数据包的源地址为第一目标容器组,所述原始数据包的目标地址为所述第二目标节点;The cross-cluster network communication method according to claim 7, wherein the first cluster includes a first target node, the first target node includes a first target container group, and the second cluster includes a second target node; the source address of the original data packet is the first target container group, and the target address of the original data packet is the second target node;
    所述方法还包括:The method also includes:
    通过所述第一目标容器组对所述原始数据包进行封装,生成所述封装数据包,并将所述封装数据包经由所述第一目标节点的发送端口发送至所述第一网关组件;Encapsulate the original data packet through the first target container group, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port of the first target node;
    通过所述第二目标节点的接收端口接收所述第二网关组件发送的所述封装数据包,并对所述封装数据包进行解封装得到原始数据包。The encapsulated data packet sent by the second gateway component is received through the receiving port of the second target node, and the encapsulated data packet is decapsulated to obtain an original data packet.
  10. 根据权利要求7所述的跨集群的网络通信方法,其中,所述第一集群中包括第一目标节点,所述第二集群包括第二目标节点,所述第二目标节点包括第二目标容器组;所述原始数据包的源地址为第一目标节点,所述原始数据包的目标地址为第二目标容器组;The cross-cluster network communication method according to claim 7, wherein the first cluster includes a first target node, the second cluster includes a second target node, and the second target node includes a second target container group; the source address of the original data packet is the first target node, and the target address of the original data packet is the second target container group;
    所述方法还包括:The method also includes:
    通过所述第一目标节点对所述原始数据包进行封装,生成所述封装数据包,并将所述封装数据包经由发送端口发送至所述第一网关组件;encapsulating the original data packet by the first target node, generating the encapsulated data packet, and sending the encapsulated data packet to the first gateway component through a sending port;
    通过所述第二目标容器组接收第二目标节点根据所述目标地址发送的原始数据包,其中,所述第二目标节点发送的原始数据包为所述第二目标节点通过接收端口接收所述第二网关组件发送的所述封装数据包,对所述封装数据包进行解封装得到。The original data packet sent by the second target node according to the target address is received through the second target container group, wherein the original data packet sent by the second target node is that the second target node receives the The encapsulated data packet sent by the second gateway component is obtained by decapsulating the encapsulated data packet.
  11. 根据权利要求7所述的跨集群的网络通信方法,其中,所述第一集群中包括第一目标节点,所述第一目标节点包括第一目标容器组,所述第二集群包括第二目标节点,所述第二目标节点包括第二目标容器组;所述原始数据包的源地址为第一目标容器组,所述原始数据包的目标地址为第二目标容器组;The cross-cluster network communication method according to claim 7, wherein the first cluster includes a first target node, the first target node includes a first target container group, and the second cluster includes a second target node, the second target node includes a second target container group; the source address of the original data packet is the first target container group, and the target address of the original data packet is the second target container group;
    所述方法还包括:The method also includes:
    通过所述第一目标容器组对所述原始数据包进行封装,生成所述封装数据包,并将所述封装数据包经由所述第一目标节点的发送端口发送至所述第一网关组件;Encapsulate the original data packet through the first target container group, generate the encapsulated data packet, and send the encapsulated data packet to the first gateway component through the sending port of the first target node;
    通过所述第二目标容器组接收第二目标节点根据所述目标地址发送的原始数据包,其中,所述第二目标节点发送的原始数据包为所述第二目标节点通过接收端口接收所述第二网关组件发送的所述封装数据包,对所述封装数据包进行解封装得到。The original data packet sent by the second target node according to the target address is received through the second target container group, wherein the original data packet sent by the second target node is that the second target node receives the The encapsulated data packet sent by the second gateway component is obtained by decapsulating the encapsulated data packet.
  12. 一种电子设备,包括:An electronic device comprising:
    处理器;以及processor; and
    存储器,所述存储器存储了可在处理器上运行的计算机程序,其中,所述计算机程序在由所述处理器执行时,使得所述电子设备执行如权利要求7至11任一项所述跨集群的网络通信方法。A memory, the memory stores a computer program that can run on the processor, wherein, when the computer program is executed by the processor, the electronic device executes the cross-connected program described in any one of claims 7 to 11 The network communication method of the cluster.
  13. 一种非暂态计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时执行如权利要求7至11任一项所述跨集群的网络通信方法。A non-transitory computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the cross-cluster network communication method according to any one of claims 7 to 11 is executed.
  14. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序被处理器执行时执行如权利要求7至11任一项所述跨集群的网络通信方法。A computer program product, comprising a computer program, wherein, when the computer program is executed by a processor, the cross-cluster network communication method according to any one of claims 7 to 11 is executed.
PCT/CN2022/124573 2022-03-02 2022-10-11 Cross-cluster network communication system and method WO2023165137A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210200119.8A CN114640556A (en) 2022-03-02 2022-03-02 Cross-cluster network communication system and method
CN202210200119.8 2022-03-02

Publications (1)

Publication Number Publication Date
WO2023165137A1 true WO2023165137A1 (en) 2023-09-07

Family

ID=81947204

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/124573 WO2023165137A1 (en) 2022-03-02 2022-10-11 Cross-cluster network communication system and method

Country Status (2)

Country Link
CN (1) CN114640556A (en)
WO (1) WO2023165137A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114640556A (en) * 2022-03-02 2022-06-17 京东科技信息技术有限公司 Cross-cluster network communication system and method
CN115333993B (en) * 2022-10-11 2022-12-09 江苏博云科技股份有限公司 Method, equipment and storage medium for customizing container group routing in container environment
CN116243899B (en) * 2022-12-06 2023-09-15 浙江讯盟科技有限公司 User-defined arrangement container and method based on network environment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050034048A1 (en) * 2003-08-05 2005-02-10 Newisys, Inc. Reliable communication between multi-processor clusters of multi-cluster computer systems
CN1977500A (en) * 2004-03-26 2007-06-06 高通股份有限公司 Routing communications in a self-organizing network
US20100250646A1 (en) * 2009-03-25 2010-09-30 Microsoft Corporation Mechanism for geo distributing application data
CN106452952A (en) * 2016-09-29 2017-02-22 华为技术有限公司 Method for detecting communication state of cluster system and gateway cluster
CN107948086A (en) * 2016-10-12 2018-04-20 北京金山云网络技术有限公司 A kind of data packet sending method, device and mixed cloud network system
CN113726638A (en) * 2021-11-04 2021-11-30 北京比格大数据有限公司 Method, device and equipment for managing multi-cloud multi-core container and storage medium
CN114640556A (en) * 2022-03-02 2022-06-17 京东科技信息技术有限公司 Cross-cluster network communication system and method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130142201A1 (en) * 2011-12-02 2013-06-06 Microsoft Corporation Connecting on-premise networks with public clouds
CN104579973B (en) * 2014-12-24 2018-09-21 北京华为数字技术有限公司 Message forwarding method and device in a kind of Virtual Cluster
US10541924B2 (en) * 2017-12-01 2020-01-21 International Business Machines Corporation Load balancing in data hosting systems
CN109617995B (en) * 2018-12-29 2022-02-25 北京金山云网络技术有限公司 Management system and method for VPC (virtual private network) internal container of tenant cluster and electronic equipment
CN111934970B (en) * 2020-08-06 2022-11-08 北京字节跳动网络技术有限公司 Data transmission method, device and system
CN114040020A (en) * 2021-10-08 2022-02-11 杭州隆埠科技有限公司 Cross-cluster service calling method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050034048A1 (en) * 2003-08-05 2005-02-10 Newisys, Inc. Reliable communication between multi-processor clusters of multi-cluster computer systems
CN1977500A (en) * 2004-03-26 2007-06-06 高通股份有限公司 Routing communications in a self-organizing network
US20100250646A1 (en) * 2009-03-25 2010-09-30 Microsoft Corporation Mechanism for geo distributing application data
CN106452952A (en) * 2016-09-29 2017-02-22 华为技术有限公司 Method for detecting communication state of cluster system and gateway cluster
CN107948086A (en) * 2016-10-12 2018-04-20 北京金山云网络技术有限公司 A kind of data packet sending method, device and mixed cloud network system
CN113726638A (en) * 2021-11-04 2021-11-30 北京比格大数据有限公司 Method, device and equipment for managing multi-cloud multi-core container and storage medium
CN114640556A (en) * 2022-03-02 2022-06-17 京东科技信息技术有限公司 Cross-cluster network communication system and method

Also Published As

Publication number Publication date
CN114640556A (en) 2022-06-17

Similar Documents

Publication Publication Date Title
CN112470436B (en) Systems, methods, and computer-readable media for providing multi-cloud connectivity
CN107947961B (en) SDN-based Kubernetes network management system and method
CN111885075B (en) Container communication method, device, network equipment and storage medium
US10779339B2 (en) Wireless roaming using a distributed store
US9906407B1 (en) Methods and apparatus for scalable resilient networks
WO2023165137A1 (en) Cross-cluster network communication system and method
US10277423B2 (en) Distributed virtual gateway appliance
JP6434821B2 (en) Communication apparatus and communication method
US11398956B2 (en) Multi-Edge EtherChannel (MEEC) creation and management
JP2023527999A (en) Loop prevention of virtual L2 network
US20140029412A1 (en) Systems and methods for providing anycast mac addressing in an information handling system
KR20210095890A (en) Logic routers with segmented network elements
JP2024503321A (en) Internet Group Management Protocol (IGMP) for Layer 2 networks in virtualized cloud environments
CN111314196A (en) Data center network hybrid overlay communication method
WO2022078415A1 (en) Packet forwarding method and network device
CN103067287B (en) Forwarding and realizing under control separation architecture the method for virtual programmable router
US20220166715A1 (en) Communication system and communication method
CN114143258B (en) Service agent method based on Open vSwitch under Kubernetes environment
CN113225252B (en) Establishment method, processing method and related equipment for Bidirectional Forwarding Detection (BFD) session
JP2024503600A (en) Layer 2 networking span ports in virtualized cloud environments
WO2024067338A1 (en) Cloud networking system, secure access method, and device and storage medium
WO2019157476A1 (en) Binding osi layer 3 ip connections to osi layer 2 for mesh networks
CN111130978B (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
US11570094B1 (en) Scaling border gateway protocol services
CN112887185B (en) Communication method and device of overlay network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22929566

Country of ref document: EP

Kind code of ref document: A1