Network communication establishment method, system and computer device

By introducing a controller cluster into the cloud computing system and utilizing the controllers in the controller cluster to determine and reflect routing information, direct communication between virtual machines in different network segments is achieved, solving the problem of low communication efficiency and improving communication efficiency.

CN120528866BActive Publication Date: 2025-10-21JIANGSU DAWN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511013572.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-10-21
Estimated Expiration
2045-07-22

AI Technical Summary

Technical Problem

In cloud computing systems, communication between virtual machines in different network segments incurs high performance overhead. Existing technologies require data transmission through gateway nodes, resulting in low communication efficiency.

Method used

A controller cluster is introduced in the cloud computing system. Direct communication between virtual machines in different network segments is established through any controller in the controller cluster. First, the computing node where the second virtual machine to be connected is located is determined, and routing information is reflected according to the connection method to complete the communication establishment.

Benefits of technology

It enables direct communication between virtual machines in different network segments, reduces performance overhead during communication, improves communication efficiency, and ensures system reliability in the event of controller failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120528866B_ABST
    Figure CN120528866B_ABST
Patent Text Reader

Abstract

The application relates to a network communication establishment method, system and computer device. The method comprises the following steps: any controller in a controller cluster of a cloud computing system responds to a routing request of a first virtual machine, and determines at least one second virtual machine to be connected; the first virtual machine represents a virtual machine connected to the controller; routing information of the first virtual machine is reflected to the computing nodes of the second virtual machines according to the connection mode of the computing nodes of the second virtual machines and the controller, so as to complete the communication establishment between the first virtual machine and the second virtual machines. The method can reduce the performance overhead when the virtual machines in different network segments communicate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a method, system, and computer device for establishing network communication. Background Art

[0002] In cloud computing systems, software-defined networking is usually used for network deployment in order to improve network flexibility and scalability.

[0003] In related technologies, communication between two virtual machines in different network segments must be carried out through a gateway node for data transmission. For example, virtual machine A and virtual machine B are in different network segments. When virtual machine A transmits data to virtual machine B, the data must first reach the gateway node for routing policy judgment and address conversion, and then be forwarded to virtual machine B by the gateway node, resulting in a large performance overhead when virtual machines in different network segments communicate. Summary of the Invention

[0004] Based on this, it is necessary to provide a network communication establishment method, system and computer device to address the above technical problems, which can reduce the performance overhead when virtual machines in different network segments communicate with each other.

[0005] In a first aspect, the present application provides a method for establishing network communication, which is applied to any controller in a controller cluster of a cloud computing system, comprising:

[0006] In response to a routing request of a first virtual machine, determining a computing node where at least one second virtual machine to be connected is located; the first virtual machine represents a virtual machine connected to a controller;

[0007] According to the connection mode between the computing nodes where the second virtual machines are located and the controller, the routing information of the first virtual machine is reflected to the computing nodes where the second virtual machines are located, so as to complete the communication establishment between the first virtual machine and the second virtual machines.

[0008] In the network communication establishment method provided in the embodiment of the present application, any controller in the controller cluster of the cloud computing system responds to the routing request of the first virtual machine, first determines the computing node where at least one second virtual machine to be connected is located, and then, based on the connection method between the computing node where each second virtual machine is located and the controller, reflects the routing information of the first virtual machine to the computing node where each second virtual machine is located, so as to complete the communication establishment between the first virtual machine and each second virtual machine, wherein the first virtual machine represents the virtual machine connected to the controller. In this method, by setting up a controller cluster in the cloud computing system, direct communication between virtual machines in different network segments is established through any controller in the controller cluster. First, when the controller receives the routing request of the first virtual machine, it first determines the computing node where the second virtual machine is located, and then, based on the routing reflection function of the controller, reflects the routing information of the first virtual machine to the computing node where the second virtual machine is located, so as to complete the communication establishment between the first virtual machine and the second virtual machine, so that the first virtual machine and the second virtual machine can communicate directly. In this way, the controller realizes the shortest path for communication interaction between virtual machines in different network segments, thereby reducing the performance overhead when virtual machines in different network segments communicate with each other.

[0009] In one embodiment, determining the computing node where the at least one second virtual machine to which a connection is to be established is located includes:

[0010] Obtaining configuration information of a network in the cloud computing system and network information of a network where the first virtual machine is located;

[0011] According to the network configuration information, multiple candidate computing nodes matching the network information are obtained;

[0012] The other computing nodes among the candidate computing nodes except the computing node where the first virtual machine is located are determined as computing nodes where at least one second virtual machine to be connected is located.

[0013] In the network communication establishment method provided in the embodiment of the present application, the configuration information of the network in the cloud computing system and the network information of the network where the first virtual machine is located are first obtained, and then, based on the network configuration information, multiple candidate computing nodes that match the network information are obtained, and then the other computing nodes in each candidate computing node except the computing node where the first virtual machine is located are determined as the computing nodes where at least one second virtual machine to be connected is located. In this method, by obtaining the configuration information of the network environment in the cloud computing system and the network information of the network where the first virtual machine is located, all computing nodes with the same network information as the first virtual machine are obtained from the network configuration information, and these computing nodes include the computing node where the first virtual machine is located. In this way, the other computing nodes among these computing nodes except the computing node where the first virtual machine is located are the computing nodes where the second virtual machine is located, which is equivalent to obtaining the computing node in the same network as the first virtual machine as the computing node where the second virtual machine is located based on the network configuration information of the cloud computing system and the network information of the first virtual machine, providing a basis for establishing communication between the first virtual machine and the second virtual machine.

[0014] In one embodiment, reflecting routing information of the first virtual machine to the computing nodes where the second virtual machines are located based on a connection between the computing nodes where the second virtual machines are located and the controller includes:

[0015] For any computing node where the second virtual machine is located, if the computing node where the second virtual machine is located is directly connected to the controller, the routing information is directly reflected to the computing node where the second virtual machine is located;

[0016] If the computing node of the second virtual machine is connected to the controller through the second controller, the routing information is forwarded to the second controller so that the second controller reflects the routing information to the computing node where the second virtual machine is located; the controller and the second controller are connected in a fully connected mode.

[0017] In the network communication establishment method provided in the embodiment of the present application, for any computing node where the second virtual machine is located, if the computing node where the second virtual machine is located is directly connected to the controller, the routing information is directly reflected to the computing node where the second virtual machine is located; if the computing node of the second virtual machine is connected to the controller through the second controller, the routing information is forwarded to the second controller so that the second controller reflects the routing information to the computing node where the second virtual machine is located; the controller and the second controller are connected in a fully connected mode. In this method, the connection method between the computing node where the second virtual machine is located and the above-mentioned controller is divided into two categories. When the connection method is a direct connection, the above-mentioned controller can directly reflect the routing information to the computing node where the second virtual machine is located. When the connection method is an indirect connection through the second controller, the above-mentioned controller needs to first forward the routing information of the first virtual machine to the second controller, and then the second controller reflects the routing information to the computing node where the second virtual machine is located. This is equivalent to providing different routing reflection methods based on the different connection methods between the computing node where the second virtual machine is located and the above-mentioned controller, so as to accurately synchronize the routing information of the first virtual machine to the computing node where the second virtual machine is located, thereby accurately and efficiently completing the communication establishment between the first virtual machine and the second virtual machine.

[0018] In a second aspect, an embodiment of the present application further provides a method for establishing network communication, which is applied to a computing node where a first virtual machine is located in a cloud computing system, the method comprising:

[0019] Obtain routing information of the first virtual machine;

[0020] Based on the routing information, a routing request is sent to the controller to instruct the controller to determine the computing node where at least one second virtual machine to be connected is located, and based on the connection method between the computing node where each second virtual machine is located and the controller, the routing information of the first virtual machine is reflected to the computing node where each second virtual machine is located, thereby completing the communication establishment between the first virtual machine and each second virtual machine; the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system.

[0021] In the network communication establishment method provided in the embodiment of the present application, the computing node where the first virtual machine in the cloud computing system is located first obtains the routing information of the first virtual machine, and then sends a routing request to the controller based on the routing information to instruct the controller to determine the computing node where at least one second virtual machine to be connected is located, and reflects the routing information of the first virtual machine to the computing node where each second virtual machine is located, based on the connection mode between the computing node where each second virtual machine is located and the controller, to complete the communication establishment between the first virtual machine and each second virtual machine, wherein the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system. In this method, the computing node where the first virtual machine is located sends a routing request to the controller in the controller cluster in the cloud computing system connected to the first virtual machine based on the routing information of the first virtual machine, so that the controller establishes direct communication between virtual machines in different network segments, the controller first determines the computing node where the second virtual machine is located, and then, based on the routing reflection function of the controller, reflects the routing information of the first virtual machine to the computing node where the second virtual machine is located, to complete the communication establishment between the first virtual machine and the second virtual machine, so that the first virtual machine and the second virtual machine can communicate directly, so that the controller realizes the shortest path for communication interaction between virtual machines in different network segments, thereby reducing the performance overhead when virtual machines in different network segments communicate with each other.

[0022] In one embodiment, the computing node where the first virtual machine is located includes a first virtual router and a first virtual router agent; obtaining routing information of the first virtual machine includes:

[0023] When the first virtual machine is started, the first virtual router generates a forwarding table entry and notifies the first virtual router agent via a network link communication mechanism;

[0024] The first virtual router agent processes the forwarding table entry to obtain routing information.

[0025] In the network communication establishment method provided in an embodiment of the present application, the computing node where the first virtual machine is located includes a first virtual router and a first virtual router agent. When the first virtual machine is started, the first virtual router generates a forwarding table entry and notifies the first virtual router agent through a network link communication mechanism. The first virtual router agent then processes the forwarding table entry to obtain routing information. In this method, the computing node where the first virtual machine is located is provided with a first virtual router and a first virtual router agent for generating routing information for the first virtual machine. When it is detected that the first virtual machine is started, the first virtual router first generates a forwarding table entry and sends the forwarding table entry to the first virtual router agent, so that the first virtual router agent translates the forwarding table entry into routing information, providing a data basis for the controller to establish network communication between the first virtual machine and the second virtual machine.

[0026] In one embodiment, the controller is connected to the computing node where the first virtual machine is located via an instant messaging protocol; the method further includes:

[0027] When the first virtual router agent obtains the routing information, it sends the routing information to the controller through the instant messaging protocol.

[0028] In the network communication establishment method provided in an embodiment of the present application, a controller is connected to a computing node where a first virtual machine is located via an instant messaging protocol. Upon obtaining routing information, a first virtual router agent sends the routing information to the controller via the instant messaging protocol. In this method, after obtaining the routing information of the first virtual machine, the first virtual router agent sends the routing information of the first virtual machine to the controller, causing the controller to reflect the routing information and complete the communication establishment between the first virtual machine and the second virtual machine, thereby reducing the performance overhead of the communication between the first virtual machine and the second virtual machine.

[0029] In a third aspect, an embodiment of the present application further provides a method for establishing network communication, which is applied to a computing node where a second virtual machine is located in a cloud computing system, the method comprising:

[0030] receiving routing information of the first virtual machine reflected by a controller; the controller being a controller in a controller cluster of the cloud computing system connected to the first virtual machine; the routing information being reflected by the controller to the computing node where the second virtual machine is located, after determining the computing node where at least one second virtual machine to be connected is located, based on a connection method between the computing node where each second virtual machine is located and the controller, upon receiving a routing request from the first virtual machine;

[0031] According to the routing information, communication between the first virtual machine and the second virtual machine is established.

[0032] In the network communication establishment method provided in an embodiment of the present application, the computing node where the second virtual machine in the cloud computing system is located receives the routing information of the first virtual machine reflected by the controller, and completes the communication establishment between the first virtual machine and the second virtual machine based on the routing information, wherein the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system, and the routing information is reflected to the computing node where the second virtual machine is located after the controller determines the computing node where at least one second virtual machine to be connected is located when receiving the routing request of the first virtual machine, according to the connection mode between the computing node where each second virtual machine is located and the controller. In this method, the controller connected to the first virtual machine determines the computing node where the second virtual machine is located when receiving the routing request of the first virtual machine, and then, based on the routing reflection function of the controller, reflects the routing information of the first virtual machine to the computing node where the second virtual machine is located, and the computing node where the second virtual machine is located processes the received routing information to complete the communication establishment between the first virtual machine and the second virtual machine, so that the first virtual machine and the second virtual machine can communicate directly. In this way, the controller realizes the shortest path for communication interaction between virtual machines in different network segments, thereby reducing the performance overhead when virtual machines in different network segments communicate with each other.

[0033] In one embodiment, the computing node where the second virtual machine is located includes a second virtual router and a second virtual router agent; establishing communication between the first virtual machine and the second virtual machine based on the routing information includes:

[0034] The second virtual router agent sends the routing information of the first virtual machine reflected by the controller to the second virtual router;

[0035] The second virtual router translates the routing information into a forwarding table entry to implement a communication connection between the first virtual machine and the second virtual machine.

[0036] In the network communication establishment method provided in the embodiment of the present application, the computing node where the second virtual machine is located includes a second virtual router and a second virtual router agent. When the second virtual router agent receives the routing information of the first virtual machine reflected by the controller, the routing information is sent to the second virtual router, and then the second virtual router translates the routing information into a forwarding table entry to realize the communication connection between the first virtual machine and the second virtual machine. In this method, the computing node where the second virtual machine is located includes a second virtual router and a second virtual router agent, which are used to process the routing information of the first virtual machine and complete the communication establishment between the first virtual machine and the second virtual machine, wherein, after receiving the routing information of the first virtual machine, the second virtual router agent sends the routing information to the second virtual router, so that the second virtual router translates the routing information into a forwarding table entry, successfully establishing the communication connection between the first virtual machine and the second virtual machine, thereby enabling the first virtual machine and the second virtual machine to communicate directly, reducing the performance overhead when the first virtual machine and the second virtual machine communicate.

[0037] In a fourth aspect, an embodiment of the present application further provides a network communication establishment system, the network communication establishment system comprising a controller, a computing node where a first virtual machine is located, and a computing node where a second virtual machine is located; the first virtual machine is a virtual machine connected to the controller; the controller is any controller in a controller cluster of a cloud computing system;

[0038] A controller, configured to implement the steps of the method according to any one of the embodiments of the first aspect above;

[0039] The computing node where the first virtual machine is located is used to implement the steps of the method in any one of the embodiments of the second aspect above;

[0040] The computing node where the second virtual machine is located is used to implement the steps of the method in any one of the embodiments of the third aspect above.

[0041] In a fifth aspect, an embodiment of the present application further provides a network communication establishment device, comprising:

[0042] a node determination module, configured to respond to a routing request of a first virtual machine and determine a computing node where at least one second virtual machine to be connected is located; the first virtual machine represents a virtual machine connected to a controller;

[0043] The routing reflection module is used to reflect the routing information of the first virtual machine to the computing nodes where the second virtual machines are located according to the connection mode between the computing nodes where the second virtual machines are located and the controller, so as to complete the communication establishment between the first virtual machine and the second virtual machines.

[0044] In a sixth aspect, an embodiment of the present application further provides a network communication establishment device, comprising:

[0045] A routing information acquisition module, configured to acquire routing information of the first virtual machine;

[0046] A routing request sending module is used to send a routing request to the controller based on the routing information to instruct the controller to determine the computing node where at least one second virtual machine to be connected is located, and reflect the routing information of the first virtual machine to the computing node where each second virtual machine is located based on the connection method between the computing node where each second virtual machine is located and the controller, so as to complete the communication establishment between the first virtual machine and each second virtual machine; the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system.

[0047] In a seventh aspect, an embodiment of the present application further provides a network communication establishment device, comprising:

[0048] a routing information receiving module, configured to receive routing information of a first virtual machine reflected by a controller; the controller being a controller in a controller cluster of a cloud computing system connected to the first virtual machine; the routing information being reflected by the controller to the computing node where the second virtual machine is located, after determining the computing node where at least one second virtual machine to be connected is located upon receiving a routing request from the first virtual machine, and based on a connection method between the computing node where each second virtual machine is located and the controller;

[0049] The communication establishment module is used to complete the establishment of communication between the first virtual machine and the second virtual machine according to the routing information.

[0050] In an eighth aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any one of the embodiments of the first aspect, the second aspect or the third aspect are implemented.

[0051] In a ninth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any one of the embodiments of the first, second or third aspects above.

[0052] In a tenth aspect, the present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method in any one of the embodiments of the first aspect, the second aspect, or the third aspect.

[0053] The network communication establishment method, system and computer device provided by the embodiments of the present application are as follows: any controller in the controller cluster of the cloud computing system responds to the routing request of the first virtual machine, first determines the computing node where at least one second virtual machine to be connected is located, and then, based on the connection method between the computing node where each second virtual machine is located and the controller, reflects the routing information of the first virtual machine to the computing node where each second virtual machine is located, so as to complete the communication establishment between the first virtual machine and each second virtual machine, wherein the first virtual machine represents the virtual machine connected to the controller. In this method, by setting up a controller cluster in the cloud computing system, direct communication between virtual machines in different network segments is established through any controller in the controller cluster. First, when receiving the routing request of the first virtual machine, the controller first determines the computing node where the second virtual machine is located, and then, based on the routing reflection function of the controller, reflects the routing information of the first virtual machine to the computing node where the second virtual machine is located, so as to complete the communication establishment between the first virtual machine and the second virtual machine, so that the first virtual machine and the second virtual machine can communicate directly. In this way, the controller realizes the shortest path for communication interaction between virtual machines in different network segments, thereby reducing the performance overhead when virtual machines in different network segments communicate with each other. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0055] Figure 1 A diagram illustrating an application environment of a method for establishing network communication in one embodiment;

[0056] Figure 2 A schematic diagram of a flow chart of a method for establishing network communication in one embodiment;

[0057] Figure 3 A schematic diagram of a process for determining a computing node where a second virtual machine is located in one embodiment;

[0058] Figure 4 A schematic flow chart of a method for establishing network communication in another embodiment;

[0059] Figure 5 A schematic diagram of a process for obtaining routing information of a first virtual machine in one embodiment;

[0060] Figure 6 A schematic flow chart of a method for establishing network communication in another embodiment;

[0061] Figure 7 A schematic diagram of a process for establishing communication between a first virtual machine and a second virtual machine in one embodiment;

[0062] Figure 8 A schematic diagram of establishing network communication in one embodiment;

[0063] Figure 9 A schematic diagram of the structure of a network communication establishment device in one embodiment;

[0064] Figure 10 A schematic structural diagram of a network communication establishment device in another embodiment;

[0065] Figure 11 A schematic structural diagram of a network communication establishment device in another embodiment;

[0066] Figure 12 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0068] The following first describes the technical background of the embodiments of the present application.

[0069] Software-defined networking (SDN) is an emerging network architecture whose core concept is to separate the control and data layers of a network, manage the entire network through a centralized controller, and configure and manage the network through a software-based approach. This architecture allows network administrators to dynamically adjust network behavior through programming, thereby improving network flexibility and scalability.

[0070] In a cloud computing environment, when implementing a Layer 2 network within the same Virtual Private Cloud (VPC), the scale of the virtual network managed directly determines the scale of the virtualized environment. For example, using OpenStack native implementations, a Neutron network manages approximately 300 compute nodes. The bottleneck lies in the RabbitMQ middleware used in Neutron networks. In large-scale deployments, RabbitMQ message backlogs and loss can occur. Software-defined networking systems must consider how to achieve the shortest path when forwarding virtual machine packets. For example, using OpenStack native implementations, communication between two virtual machines on different network segments within a tenant must pass through a gateway node, which incurs performance overhead and becomes a forwarding bottleneck for the entire virtual network.

[0071] Based on this, an embodiment of the present application provides a method for establishing network communication, which establishes direct communication between virtual machines in different network segments through any controller in the controller cluster by setting up a controller cluster in a cloud computing system. First, when the controller receives a routing request from the first virtual machine, it will first determine the computing node where the second virtual machine is located. Then, based on the routing reflection function of the controller, the routing information of the first virtual machine is reflected to the computing node where the second virtual machine is located to complete the establishment of communication between the first virtual machine and the second virtual machine, so that the first virtual machine and the second virtual machine can communicate directly. In this way, the controller realizes the shortest path for communication interaction between virtual machines in different network segments, thereby reducing the performance overhead when virtual machines in different network segments communicate. Of course, the technical solution provided in the embodiment of the present application is not limited to solving the above-mentioned problems, but also has other technical effects. Please refer to the following embodiment for details.

[0072] It should be noted that the beneficial effects or technical problems solved by the embodiments of the present application are not limited to this one, but may also include other implicit or related problems. For details, please refer to the description of the following embodiments.

[0073] The following describes the application environment of the network communication establishment method provided in the embodiment of the present application, which can be applied to Figure 1In the application environment shown. Among them, the controllers 104 in the controller cluster communicate with the computing nodes 102 through the network, and each controller 104 can communicate with each other. Optionally, the controllers are connected in a full-connection mode, for example, in an Internal Border Gateway Protocol FULL-mesh (iBGP FULL-mesh) mode. Each controller 104 is connected to the corresponding computing node by an instant messaging protocol, for example, through an Extensible Messaging and Presence Protocol (XMPP). It should be noted that the number of controllers in the controller cluster can be expanded. Figure 1 Other controllers are not shown.

[0074] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0075] In an exemplary embodiment, Figure 2 As shown, a network communication establishment method is provided, which is applied to Figure 1 Taking any one of the controllers 104 as an example, the method includes the following steps 201 to 202.

[0076] S201 , responding to a routing request of a first virtual machine, determining a computing node where at least one second virtual machine to be connected is located; the first virtual machine represents a virtual machine connected to a controller.

[0077] The routing request of the first virtual machine is a communication establishment request initiated by the first virtual machine to the controller to establish network communication with the second virtual machine. For example, the first virtual machine can send the routing request to the controller based on the routing information of the first virtual machine. If the first virtual machine is a virtual machine connected to the controller, the routing request can be directly initiated to the controller.

[0078] When receiving the routing request of the first virtual machine, the controller first determines the computing node where the at least one second virtual machine to be connected is located. In this embodiment of the present application, the number of the second virtual machines can be one or more.

[0079] In one implementation, the controller can obtain the compute node where the second virtual machine resides by calling an application programming interface (API) provided by the cloud computing management platform. For example, by calling the corresponding API and passing in the identifier (ID) or other unique identification information of the second virtual machine, the controller can obtain detailed information about the second virtual machine, including data related to the compute node where the second virtual machine resides, such as the node name and Internet Protocol (IP) address.

[0080] In another implementation, the controller may communicate with an SDN controller in the cloud computing system to obtain network topology and network connection information for the virtual machine. The SDN controller can provide a mapping between the IP address of the virtual machine and the computing node on which it resides, thereby enabling the controller to determine the location of the second virtual machine.

[0081] S202 : Based on the connection mode between the computing nodes where the second virtual machines are located and the controller, the routing information of the first virtual machine is reflected to the computing nodes where the second virtual machines are located, so as to establish communication between the first virtual machine and the second virtual machines.

[0082] After determining the computing node where the second virtual machine to be connected is located, the above-mentioned controller reflects the routing information of the first virtual machine to the computing nodes where the second virtual machines are located through the routing reflection function of the controller, so that the computing nodes where the second virtual machines are located process the routing information of the first virtual machine and complete the establishment of communication between the first virtual machine and the second virtual machine.

[0083] When reflecting the routing information of the first virtual machine to the computing nodes where the second virtual machines are located, the above-mentioned controller will use different methods to reflect the routing information of the first virtual machine to the computing nodes where the second virtual machines are located based on the different connection methods between the computing nodes where the second virtual machines are located and the controller.

[0084] In one scenario, the connection between the compute node where the second virtual machine resides and the controller is a direct connection. For example, if the compute node where the second virtual machine resides is directly connected to the controller, the controller can directly reflect the routing information of the first virtual machine to the compute node where the second virtual machine resides, so that the compute node where the second virtual machine resides processes the received routing information, thereby establishing communication between the first virtual machine and the second virtual machine.

[0085] In another scenario, the connection between the computing node where the second virtual machine is located and the controller is an indirect connection. For example, if the computing node where the second virtual machine is located is indirectly connected to the controller, the controller needs to process the routing information of the first virtual machine and then reflect the routing information of the first virtual machine to the computing node where the second virtual machine is located, so that the computing node where the second virtual machine is located processes the received routing information and establishes communication between the first virtual machine and the second virtual machine. For example, the controller processes the routing information of the first virtual machine by one or more of encryption processing, calculation processing, analysis processing, conversion processing, and forwarding processing.

[0086] In an embodiment of the present application, in order to solve the problem of high performance overhead when virtual machines in different network segments communicate with each other, a controller cluster is first introduced into the cloud computing system. The horizontal expansion capability of the controller is used to improve the cloud network's unified management capability of computing nodes. The routing reflection function of each controller is used to complete routing reflection between computing nodes to establish network communication between virtual machines in different network segments. This allows virtual machines in different network segments to communicate and interact directly without going through gateway nodes, thus achieving the shortest path for interaction between virtual machines in different network segments, thereby reducing the performance overhead when virtual machines in different network segments communicate with each other. In addition, it should be noted that when the above-mentioned controller fails, the system can automatically select another controller to take over the work of the above-mentioned controller, thereby completing the communication establishment between the first virtual machine and the second virtual machine, ensuring the reliability and performance of the system.

[0087] In the network communication establishment method provided in the embodiment of the present application, any controller in the controller cluster of the cloud computing system responds to the routing request of the first virtual machine, first determines the computing node where at least one second virtual machine to be connected is located, and then, based on the connection method between the computing node where each second virtual machine is located and the controller, reflects the routing information of the first virtual machine to the computing node where each second virtual machine is located, so as to complete the communication establishment between the first virtual machine and each second virtual machine, wherein the first virtual machine represents the virtual machine connected to the controller. In this method, by setting up a controller cluster in the cloud computing system, direct communication between virtual machines in different network segments is established through any controller in the controller cluster. First, when the controller receives the routing request of the first virtual machine, it first determines the computing node where the second virtual machine is located, and then, based on the routing reflection function of the controller, reflects the routing information of the first virtual machine to the computing node where the second virtual machine is located, so as to complete the communication establishment between the first virtual machine and the second virtual machine, so that the first virtual machine and the second virtual machine can communicate directly. In this way, the controller realizes the shortest path for communication interaction between virtual machines in different network segments, thereby reducing the performance overhead when virtual machines in different network segments communicate with each other.

[0088] Based on the above embodiment, an embodiment is provided to illustrate the process of determining the computing node where the second virtual machine is located.

[0089] In an exemplary embodiment, Figure 3 As shown, determining the computing node where at least one second virtual machine to be connected is located includes:

[0090] S301: Obtain configuration information of a network in a cloud computing system and network information of a network where a first virtual machine is located.

[0091] In cloud computing systems that use software-defined networking, different users can customize their own networks under the same controller. This creates multiple networks within the cloud computing system, allowing users to freely select compute nodes within each network. This allows any virtual machine to establish network communication with any virtual machine on any compute node within the same network. This means that any compute node within the same network as a first virtual machine can serve as a compute node for a second virtual machine.

[0092] Based on this, in the embodiment of the present application, a computing node in the same network as the first virtual machine is obtained as the computing node where the second virtual machine is located. First, the controller needs to obtain the network information of the network where the first virtual machine is located, and obtain the configuration information of the network environment in the cloud computing system. Then, based on the configuration information of the network environment and the network information of the first virtual machine, the computing node in the same network as the first virtual machine is determined. The network information of the first virtual machine includes but is not limited to the network name, network identification ID, network IP address, etc. of the first virtual machine.

[0093] S302: Acquire multiple candidate computing nodes that match the network information according to the network configuration information.

[0094] After obtaining the configuration information of the network in the cloud computing system and the network information of the network where the first virtual machine is located, the above-mentioned controller obtains multiple candidate computing nodes that are the same as the network information of the network where the first virtual machine is located from the network configuration information. These candidate computing nodes are all computing nodes in the network where the first virtual machine is located, including the computing node where the first virtual machine is located.

[0095] S303: Determine computing nodes other than the computing node where the first virtual machine is located in each candidate computing node as computing nodes where at least one second virtual machine to be connected is located.

[0096] These candidate computing nodes include the computing node where the first virtual machine is located. Based on this, the computing node where the first virtual machine is located is removed from these candidate computing nodes. The remaining computing nodes are the computing nodes in the same network as the first virtual machine, that is, the computing nodes where at least one second virtual machine to which a connection is to be established is located.

[0097] In the network communication establishment method provided in the embodiment of the present application, the configuration information of the network in the cloud computing system and the network information of the network where the first virtual machine is located are first obtained, and then, based on the network configuration information, multiple candidate computing nodes that match the network information are obtained, and then the other computing nodes in each candidate computing node except the computing node where the first virtual machine is located are determined as the computing nodes where at least one second virtual machine to be connected is located. In this method, by obtaining the configuration information of the network environment in the cloud computing system and the network information of the network where the first virtual machine is located, all computing nodes with the same network information as the first virtual machine are obtained from the network configuration information, and these computing nodes include the computing node where the first virtual machine is located. In this way, the other computing nodes among these computing nodes except the computing node where the first virtual machine is located are the computing nodes where the second virtual machine is located, which is equivalent to obtaining the computing node in the same network as the first virtual machine as the computing node where the second virtual machine is located based on the network configuration information of the cloud computing system and the network information of the first virtual machine, providing a basis for establishing communication between the first virtual machine and the second virtual machine.

[0098] Based on the above embodiment, an embodiment is provided to illustrate the process of reflecting the routing information of the first virtual machine.

[0099] In an exemplary embodiment, reflecting routing information of a first virtual machine to computing nodes where each second virtual machine is located, based on a connection mode between the computing nodes where each second virtual machine is located and a controller, includes:

[0100] For any computing node where the second virtual machine is located, if the computing node where the second virtual machine is located is directly connected to the controller, the routing information is directly reflected to the computing node where the second virtual machine is located; if the computing node of the second virtual machine is connected to the controller through the second controller, the routing information is forwarded to the second controller so that the second controller reflects the routing information to the computing node where the second virtual machine is located; the controller and the second controller are connected in a fully connected mode.

[0101] In the embodiment of the present application, the connection mode between the computing node where the second virtual machine is located and the above-mentioned controller is divided into two categories. One category is that the computing node where the second virtual machine is located is directly connected to the above-mentioned controller. Figure 1 For example, the first virtual machine is Figure 1The virtual machine on any computing node connected to the first controller in the network is connected to the first controller. In this case, the controller is the first controller. If the computing node where the second virtual machine is located is also any computing node connected to the first controller, then the computing node where the second virtual machine is located is directly connected to the first controller. The other type is that the computing node where the second virtual machine is located is connected to the above controller through the second controller. Figure 1 For example, the first virtual machine is Figure 1 If the compute node where the second virtual machine is located is any compute node connected to the second controller, then the second controller is the second controller. Then the compute node where the second virtual machine is located is connected to the first controller through the second controller.

[0102] When the computing node where the second virtual machine resides is directly connected to the controller, the controller can directly reflect the routing information to the computing node where the second virtual machine resides. In this embodiment of the present application, each controller and computing node are connected via an instant messaging protocol, such as XMPP. In this case, the controller can reflect the routing information of the first virtual machine to the computing node where the second virtual machine resides via XMPP.

[0103] When the compute node where the second virtual machine resides is connected to the controller via a second controller, the controller may first forward the routing information of the first virtual machine to the second controller, which then reflects the routing information of the first virtual machine to the node where the second virtual machine resides. If the controller and the second controller are connected in a fully meshed mode, for example, using iBGP FULL-mesh, the controller may reflect the routing information of the first virtual machine to the second controller via iBGP. If the second controller and the compute node where the second virtual machine resides are still connected via the XMPP protocol, the second controller also reflects the routing information of the first virtual machine to the compute node where the second virtual machine resides via the XMPP protocol.

[0104] In the network communication establishment method provided in the embodiment of the present application, for any computing node where the second virtual machine is located, if the computing node where the second virtual machine is located is directly connected to the controller, the routing information is directly reflected to the computing node where the second virtual machine is located; if the computing node of the second virtual machine is connected to the controller through the second controller, the routing information is forwarded to the second controller so that the second controller reflects the routing information to the computing node where the second virtual machine is located; the controller and the second controller are connected in a fully connected mode. In this method, the connection method between the computing node where the second virtual machine is located and the above-mentioned controller is divided into two categories. When the connection method is a direct connection, the above-mentioned controller can directly reflect the routing information to the computing node where the second virtual machine is located. When the connection method is an indirect connection through the second controller, the above-mentioned controller needs to first forward the routing information of the first virtual machine to the second controller, and then the second controller reflects the routing information to the computing node where the second virtual machine is located. This is equivalent to providing different routing reflection methods based on the different connection methods between the computing node where the second virtual machine is located and the above-mentioned controller, so as to accurately synchronize the routing information of the first virtual machine to the computing node where the second virtual machine is located, thereby accurately and efficiently completing the communication establishment between the first virtual machine and the second virtual machine.

[0105] The above is a description of the relevant embodiments for the controller as the execution subject. Based on this, the present embodiment also provides an embodiment corresponding to the above process with the computing node where the first virtual machine is located as the execution subject. Below, the relevant embodiments of the network communication establishment method with the computing node where the first virtual machine is located as the execution subject are described.

[0106] In an exemplary embodiment, Figure 4 As shown, a method for establishing network communication is provided, which is applied to a computing node where a first virtual machine in a cloud computing system is located. The method includes:

[0107] S401: Obtain routing information of a first virtual machine.

[0108] In one embodiment, the routing information of the first virtual machine can be obtained through a virtualization management platform in a cloud computing system. Typically, the virtualization management platform in a cloud computing system centrally manages the network configuration of the virtual machines. The administrator configures network parameters for the first virtual machine on the management platform, including routing-related information such as the IP address and subnet mask. The computing node where the first virtual machine resides can obtain the routing information of the first virtual machine by calling an API interface provided by the virtualization management platform.

[0109] In another embodiment, the routing information of the first virtual machine can be obtained through an SDN controller. In a software-defined network architecture, the SDN controller is responsible for managing and controlling traffic and routing in the network. The routing information of the first virtual machine is centrally managed and distributed by the SDN controller. The computing node where the first virtual machine resides, as a node in the SDN network, communicates with the SDN controller and can receive the routing information of the first virtual machine issued by the SDN controller.

[0110] S402, based on the routing information, sends a routing request to the controller to instruct the controller to determine the computing node where at least one second virtual machine to be connected is located, and based on the connection method between the computing node where each second virtual machine is located and the controller, reflects the routing information of the first virtual machine to the computing node where each second virtual machine is located, thereby completing the communication establishment between the first virtual machine and each second virtual machine; the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system.

[0111] After receiving the routing information of the first virtual machine, the computing node where the first virtual machine resides sends a routing request to a controller based on the routing information, so that the controller completes communication establishment between the first virtual machine and the second virtual machine after receiving the routing request. The controller is a controller in a controller cluster of the cloud computing system connected to the first virtual machine.

[0112] When the controller receives a routing request from a first virtual machine, it first determines the computing node of at least one second virtual machine to which a connection is to be established. Based on the connection method between the computing node of each second virtual machine and the controller, the controller then reflects the routing information of the first virtual machine to the computing node of each second virtual machine, thereby establishing communication between the first virtual machine and each second virtual machine. The communication establishment process performed by the controller can be referred to in the aforementioned embodiment and will not be further described here.

[0113] In the network communication establishment method provided in the embodiment of the present application, the computing node where the first virtual machine in the cloud computing system is located first obtains the routing information of the first virtual machine, and then sends a routing request to the controller based on the routing information to instruct the controller to determine the computing node where at least one second virtual machine to be connected is located, and reflects the routing information of the first virtual machine to the computing node where each second virtual machine is located, based on the connection mode between the computing node where each second virtual machine is located and the controller, to complete the communication establishment between the first virtual machine and each second virtual machine, wherein the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system. In this method, the computing node where the first virtual machine is located sends a routing request to the controller in the controller cluster in the cloud computing system connected to the first virtual machine based on the routing information of the first virtual machine, so that the controller establishes direct communication between virtual machines in different network segments, the controller first determines the computing node where the second virtual machine is located, and then, based on the routing reflection function of the controller, reflects the routing information of the first virtual machine to the computing node where the second virtual machine is located, to complete the communication establishment between the first virtual machine and the second virtual machine, so that the first virtual machine and the second virtual machine can communicate directly, so that the controller realizes the shortest path for communication interaction between virtual machines in different network segments, thereby reducing the performance overhead when virtual machines in different network segments communicate with each other.

[0114] Based on the above embodiment, the process of obtaining the routing information of the first virtual machine is described in an embodiment.

[0115] In an exemplary embodiment, Figure 5 As shown, the computing node where the first virtual machine is located includes a first virtual router and a first virtual router agent; obtaining routing information of the first virtual machine includes:

[0116] S501: When a first virtual machine is started, a first virtual router generates a forwarding entry and notifies the first virtual router agent through a network link communication mechanism.

[0117] In the embodiment of the present application, the computing node where the first virtual machine is located includes, in addition to the first virtual machine, a first virtual router and a first virtual router agent.

[0118] When the computing node where the first virtual machine is located obtains the routing information of the first virtual machine, it may obtain the information through the first virtual router and the first virtual router agent deployed in the computing node where the first virtual machine is located.

[0119] Upon detecting that the first virtual machine has started, the first virtual router in the compute node where the first virtual machine resides generates a forwarding table entry and notifies the first virtual router agent via a network link socket (Netlink). The first virtual router may generate the forwarding table entry based on network-related information about the first virtual machine in the network configuration information. The network-related information about the first virtual machine includes, for example, the first virtual machine's IP address and subnet mask.

[0120] S502: The first virtual router agent processes the forwarding table entry to obtain routing information.

[0121] Upon receiving a forwarding table entry from the first virtual router, the first virtual router agent translates the forwarding table entry into routing information, thereby obtaining routing information for the first virtual machine. Translating the forwarding table entry into routing information primarily involves extracting key information from the forwarding table entry and organizing it according to the format and specifications of routing information. For example, information such as the destination network information, next-hop address, and interface number may be extracted from the forwarding table entry.

[0122] In the network communication establishment method provided in an embodiment of the present application, the computing node where the first virtual machine is located includes a first virtual router and a first virtual router agent. When the first virtual machine is started, the first virtual router generates a forwarding table entry and notifies the first virtual router agent through a network link communication mechanism. The first virtual router agent then processes the forwarding table entry to obtain routing information. In this method, the computing node where the first virtual machine is located is provided with a first virtual router and a first virtual router agent for generating routing information for the first virtual machine. When it is detected that the first virtual machine is started, the first virtual router first generates a forwarding table entry and sends the forwarding table entry to the first virtual router agent, so that the first virtual router agent translates the forwarding table entry into routing information, providing a data basis for the controller to establish network communication between the first virtual machine and the second virtual machine.

[0123] Based on the above embodiment, an embodiment is provided to illustrate the process of the first virtual router processing routing information.

[0124] In an exemplary embodiment, the controller is connected to the computing node where the first virtual machine is located via an instant messaging protocol; the method further includes:

[0125] When the first virtual router agent obtains the routing information, it sends the routing information to the controller through the instant messaging protocol.

[0126] In an embodiment of the present application, each controller is connected to the corresponding computing node via an instant messaging protocol, and the above-mentioned controller and the computing node where the first virtual machine is located are also connected via an instant messaging protocol, for example, via the XMPP protocol.

[0127] When the first virtual router translates the forwarding table entry into routing information and obtains the routing information of the first virtual machine, it sends the routing information of the first virtual machine to the controller. The first virtual router sends the routing information of the first virtual machine via the instant messaging protocol.

[0128] In the network communication establishment method provided in an embodiment of the present application, a controller is connected to a computing node where a first virtual machine is located via an instant messaging protocol. Upon obtaining routing information, a first virtual router agent sends the routing information to the controller via the instant messaging protocol. In this method, after obtaining the routing information of the first virtual machine, the first virtual router agent sends the routing information of the first virtual machine to the controller, causing the controller to reflect the routing information and complete the communication establishment between the first virtual machine and the second virtual machine, thereby reducing the performance overhead of the communication between the first virtual machine and the second virtual machine.

[0129] The above describes an embodiment of the method for establishing network communication using the computing node where the first virtual machine resides as the execution entity. This embodiment of the present application also provides an embodiment corresponding to the above process using the computing node where the second virtual machine resides as the execution entity. Below, we describe an embodiment of the method for establishing network communication using the computing node where the second virtual machine resides as the execution entity.

[0130] In an exemplary embodiment, Figure 6 As shown, a method for establishing network communication is provided, which is applied to a computing node where a second virtual machine is located in a cloud computing system, and the method includes:

[0131] S601, receiving routing information of the first virtual machine reflected by the controller; the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system; the routing information is reflected to the computing node where the second virtual machine is located after the controller receives the routing request of the first virtual machine and determines the computing node where at least one second virtual machine to be connected is located, according to the connection method between the computing node where each second virtual machine is located and the controller.

[0132] The controller is a controller connected to a first virtual machine in a controller cluster of a cloud computing system. Upon receiving a routing request from the first virtual machine, the controller determines the computing node where at least one second virtual machine is located, with which a connection is to be established. Based on the connection method between the computing node where the second virtual machine resides and the controller, the controller reflects the routing information of the first virtual machine to the computing node where the second virtual machine resides. In this way, the computing node where the second virtual machine resides receives the routing information of the first virtual machine reflected by the controller. The manner in which the controller determines the computing node where the second virtual machine resides and reflects the routing information of the first virtual machine can be found in the aforementioned embodiments and will not be further described here.

[0133] S602: Establish communication between the first virtual machine and each second virtual machine according to the routing information.

[0134] After the computing node where the second virtual machine is located receives the routing information of the first virtual machine, it implements network communication between the first virtual machine and the second virtual machine based on the routing information of the first virtual machine.

[0135] The computing node where the second virtual machine is located may process the received routing information of the first virtual machine, thereby establishing communication between the first virtual machine and the second virtual machine.

[0136] For example, after receiving the routing information from the first virtual machine, the second virtual machine can verify the accuracy of the routing information and verify network reachability. For example, the second virtual machine can check whether the destination network address, subnet mask, next hop address, etc. in the routing information are accurate to ensure that the information is complete and complies with network configuration rules. Furthermore, based on the received routing information, the second virtual machine can send a network reachability test request to check whether the first virtual machine's network is reachable.

[0137] In the network communication establishment method provided in an embodiment of the present application, the computing node where the second virtual machine in the cloud computing system is located receives the routing information of the first virtual machine reflected by the controller, and completes the communication establishment between the first virtual machine and the second virtual machine based on the routing information, wherein the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system, and the routing information is reflected to the computing node where the second virtual machine is located after the controller determines the computing node where at least one second virtual machine to be connected is located when receiving the routing request of the first virtual machine, according to the connection mode between the computing node where each second virtual machine is located and the controller. In this method, the controller connected to the first virtual machine determines the computing node where the second virtual machine is located when receiving the routing request of the first virtual machine, and then, based on the routing reflection function of the controller, reflects the routing information of the first virtual machine to the computing node where the second virtual machine is located, and the computing node where the second virtual machine is located processes the received routing information to complete the communication establishment between the first virtual machine and the second virtual machine, so that the first virtual machine and the second virtual machine can communicate directly. In this way, the controller realizes the shortest path for communication interaction between virtual machines in different network segments, thereby reducing the performance overhead when virtual machines in different network segments communicate with each other.

[0138] Based on the above embodiment, an embodiment is provided to illustrate the process of establishing communication between the first virtual machine and the second virtual machine.

[0139] In an exemplary embodiment, Figure 7 As shown, the computing node where the second virtual machine is located includes a second virtual router and a second virtual router agent; according to the routing information, completing the communication establishment between the first virtual machine and the second virtual machine includes:

[0140] S701: Upon receiving routing information of a first virtual machine reflected by a controller, the second virtual router agent sends the routing information to the second virtual router.

[0141] In an embodiment of the present application, the computing node where the second virtual machine is located also includes a virtual router and a virtual router agent, which are respectively the second virtual router and the second virtual router agent, and are used to process the routing information of the first virtual machine, thereby establishing network communication between the first virtual machine and the second virtual machine.

[0142] When the controller reflects the routing information of the first virtual machine to the compute node where the second virtual machine resides, the second virtual router agent in the compute node where the second virtual machine resides directly receives the information. After receiving the routing information of the first virtual machine, the second virtual router agent directly sends the routing information of the first virtual machine to the second virtual router. The second virtual router agent can send the routing information of the first virtual machine to the second virtual router via Netlink.

[0143] S702: The second virtual router translates the routing information into a forwarding table entry to implement a communication connection between the first virtual machine and the second virtual machine.

[0144] After receiving the routing information of the first virtual machine, the second virtual router translates the routing information into a forwarding table entry, thereby realizing a communication connection between the first virtual machine and the second virtual machine.

[0145] In the network communication establishment method provided in the embodiment of the present application, the computing node where the second virtual machine is located includes a second virtual router and a second virtual router agent. When the second virtual router agent receives the routing information of the first virtual machine reflected by the controller, the routing information is sent to the second virtual router, and then the second virtual router translates the routing information into a forwarding table entry to realize the communication connection between the first virtual machine and the second virtual machine. In this method, the computing node where the second virtual machine is located includes a second virtual router and a second virtual router agent, which are used to process the routing information of the first virtual machine and complete the communication establishment between the first virtual machine and the second virtual machine, wherein, after receiving the routing information of the first virtual machine, the second virtual router agent sends the routing information to the second virtual router, so that the second virtual router translates the routing information into a forwarding table entry, successfully establishing the communication connection between the first virtual machine and the second virtual machine, thereby enabling the first virtual machine and the second virtual machine to communicate directly, reducing the performance overhead when the first virtual machine and the second virtual machine communicate.

[0146] In addition, in an exemplary embodiment, the process of establishing network communication and transmitting data after the network communication is established in this application is described.

[0147] iBGP FULL-mesh connections are used between controller clusters, and XMPP connections are used between controllers and computing nodes. A single controller supports approximately 500 computing nodes. When the physical cluster is large, the number of controllers can be horizontally expanded to support larger computing nodes.

[0148] BGP Full Mesh mode ensures that every node has a BGP connection with every other node, providing a highly reliable routing mechanism. This helps quickly restore communication during network failures, as traffic can be routed through alternative paths even if some paths fail. While BGP Full Mesh mode can be challenging in large networks, it offers good scalability in small and medium-sized controller clusters. Controllers can be easily expanded by adding new nodes and connections. The scalability limitation of BGP Full Mesh mode is primarily reflected in the number of nodes. In BGP Full Mesh mode, every node must establish a BGP connection with every other node. Therefore, as the number of controller nodes increases, the number of connections each node needs to maintain increases exponentially. This can lead to the following issues: 1. Resource consumption: Each node consumes a considerable amount of CPU, memory, and network bandwidth to maintain BGP connections with other nodes. With a large number of nodes, this can lead to resource bottlenecks, impacting network performance and stability. 2. Slow convergence: BGP Full Mesh mode can result in slower convergence. When changes occur in the network (for example, a node failure or a routing update), all nodes need to recalculate routes and update their BGP connections, which can cause traffic disruption or increased latency in the network.

[0149] Based on the above considerations, BGP Full Mesh mode is generally suitable for network environments with fewer than 100 controller nodes. In summary, the theoretical scale of cloud network unified management capabilities is 50,000 computing nodes, greatly improving the cloud network's unified management capabilities.

[0150] In an embodiment of the present application, a controller reflects the routes of each compute node, achieving global control of the entire network's routing. Within each compute node, a virtual router translates routing information into forwarding table entries, ultimately achieving the shortest path for virtual machine access. The controller's work mainly consists of two parts: one is configuration delivery, and the other is route reflection. Configuration delivery mainly completes the configuration information of the entire network environment, such as network and subnet configuration information, while route reflection mainly completes route reflection between compute nodes.

[0151] like Figure 8 As shown in the figure, the data center's physical network with a spine / leaf structure, combined with the distributed gateway functionality of the switches, achieves the shortest physical network path. At the virtual network level, the controller centrally controls data routing across the entire virtual network, ensuring that VMs within the same tenant only have one hop to communicate, ultimately achieving the optimal path. The physical machine IP addresses are 10.0.36.2 and 10.0.36.3, while the VM addresses are in the cross-subnet segments 192.168.1.2 / 24 and 192.168.2.2 / 24.

[0152] The process of establishing network communication between the first virtual machine and the second virtual machine is as follows:

[0153] (1) The first virtual machine starts, the first virtual machine router generates a forwarding table entry, and notifies the first virtual router agent through Netlink.

[0154] (2) The first virtual router agent translates the forwarding table entries into routing information and sends it to the controller via the XMPP protocol.

[0155] (3) The controller reflects the routing information to the second virtual router agent of the computing node where the second virtual machine is located through the XMPP protocol.

[0156] (4) After receiving the routing information of the first virtual machine, the second virtual router agent sends the routing information to the second virtual router through Netlink.

[0157] (5) The second virtual router translates the routing information into a forwarding table entry to complete the communication establishment between the first virtual machine and the second virtual machine.

[0158] After the communication between the first virtual machine and the second virtual machine is established, the first virtual machine can directly transmit data to the second virtual machine.

[0159] During data forwarding by the first virtual router, it is performed according to the Layer 2 and Layer 3 forwarding entries of the Virtual Routing and Forwarding (VRF). For example, the following example shows a virtual machine sending a data packet:

[0160] (1) The first virtual router receives a message from the virtual machine interface.

[0161] (2) Search the flow table. If a flow already exists, execute the action corresponding to the flow.

[0162] (3) If the flow action is routing forwarding, search the VRF layer 2, layer 3 and next hop table entries.

[0163] (4) Encapsulate the message into a virtual eXtensible Local Area Network (vxlan) message according to the address of the target physical node and send it out.

[0164] In this embodiment, cross-subnet communication does not need to pass through the gateway node, the path is shortest, and the performance overhead of communication between virtual machines in different network segments is reduced; moreover, the controller has strong scalability, and the scale of unified managed computing nodes is large.

[0165] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0166] Based on the same inventive concept, the present application also provides a network communication establishment system. The implementation solution provided by this system is similar to the implementation solution described in the above method. Therefore, the specific limitations of the one or more network communication establishment systems provided below can be referred to the limitations of the network communication establishment method above and will not be repeated here.

[0167] In an exemplary embodiment, a network communication establishment system includes a controller, a computing node where a first virtual machine is located, and a computing node where a second virtual machine is located; the first virtual machine is a virtual machine connected to the controller; the controller is any controller in a controller cluster of a cloud computing system;

[0168] Among them, the controller is used to implement the steps of the method in any one of the above-mentioned embodiments with the controller as the execution body; the computing node where the first virtual machine is located is used to implement the steps of the method in any one of the above-mentioned embodiments with the computing node where the first virtual machine is located as the execution body; the computing node where the second virtual machine is located is used to implement the steps of the method in any one of the above-mentioned embodiments with the computing node where the second virtual machine is located as the execution body.

[0169] Based on the same inventive concept, embodiments of the present application also provide a network communication establishment device for implementing the aforementioned network communication establishment method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations in one or more embodiments of the network communication establishment device provided below can be found in the above-mentioned limitations on the network communication establishment method and will not be repeated here.

[0170] In an exemplary embodiment, Figure 9 As shown, a network communication establishment device is provided, including: a node determination module 10 and a route reflection module 20, wherein:

[0171] A node determination module 10 is configured to respond to a routing request of a first virtual machine and determine a computing node where at least one second virtual machine to be connected is located; the first virtual machine represents a virtual machine connected to a controller;

[0172] The route reflection module 20 is used to reflect the routing information of the first virtual machine to the computing nodes where the second virtual machines are located according to the connection mode between the computing nodes where the second virtual machines are located and the controller, so as to complete the communication establishment between the first virtual machine and the second virtual machines.

[0173] In one embodiment, the node determination module 10 is further configured to:

[0174] Obtain network configuration information of the cloud computing system and network information of the network where the first virtual machine is located; obtain multiple candidate computing nodes that match the network information based on the network configuration information; and determine other computing nodes among the candidate computing nodes except the computing node where the first virtual machine is located as computing nodes where at least one second virtual machine to be connected is located.

[0175] In one embodiment, the route reflection module 20 is further configured to:

[0176] For any computing node where the second virtual machine is located, if the computing node where the second virtual machine is located is directly connected to the controller, the routing information is directly reflected to the computing node where the second virtual machine is located; if the computing node of the second virtual machine is connected to the controller through the second controller, the routing information is forwarded to the second controller so that the second controller reflects the routing information to the computing node where the second virtual machine is located; the controller and the second controller are connected in a fully connected mode.

[0177] In an exemplary embodiment, Figure 10 As shown, a network communication establishment device is provided, including: a routing information acquisition module 30 and a routing request sending module 40, wherein:

[0178] The routing information acquisition module 30 is used to obtain the routing information of the first virtual machine;

[0179] The routing request sending module 40 is used to send a routing request to the controller based on the routing information to instruct the controller to determine the computing node where at least one second virtual machine to be connected is located, and reflect the routing information of the first virtual machine to the computing node where each second virtual machine is located based on the connection method between the computing node where each second virtual machine is located and the controller, so as to complete the communication establishment between the first virtual machine and each second virtual machine; the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system.

[0180] In one embodiment, the routing information acquisition module 30 is further configured to:

[0181] When the first virtual machine is started, the first virtual router generates a forwarding table entry and notifies the first virtual router agent through a network link communication mechanism; the first virtual router agent processes the forwarding table entry to obtain routing information.

[0182] In one embodiment, the network communication establishment device further includes:

[0183] The routing information sending module is used for the first virtual router agent to send the routing information to the controller through the instant messaging protocol when the routing information is obtained.

[0184] In an exemplary embodiment, Figure 11 As shown, a network communication establishment device is provided, comprising: a routing information receiving module 50 and a communication establishment module 60, wherein:

[0185] The routing information receiving module 50 is configured to receive routing information of the first virtual machine reflected by a controller; the controller being a controller in a controller cluster of the cloud computing system connected to the first virtual machine; the routing information is reflected by the controller to the computing node where the second virtual machine is located, after the controller receives a routing request from the first virtual machine and determines the computing node where at least one second virtual machine to be connected is located, based on the connection mode between the computing node where each second virtual machine is located and the controller;

[0186] The communication establishing module 60 is configured to establish communication between the first virtual machine and the second virtual machine according to the routing information.

[0187] In one embodiment, the communication establishing module 60 is further configured to:

[0188] When the second virtual router agent receives the routing information of the first virtual machine reflected by the controller, it sends the routing information to the second virtual router; the second virtual router translates the routing information into a forwarding table entry to implement a communication connection between the first virtual machine and the second virtual machine.

[0189] Each module in the above-mentioned network communication establishment device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0190] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 12As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store network communication establishment data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for establishing network communication is implemented.

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

[0192] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0193] In response to a routing request of a first virtual machine, determining a computing node where at least one second virtual machine to be connected is located; the first virtual machine represents a virtual machine connected to a controller;

[0194] According to the connection mode between the computing nodes where the second virtual machines are located and the controller, the routing information of the first virtual machine is reflected to the computing nodes where the second virtual machines are located, so as to complete the communication establishment between the first virtual machine and the second virtual machines.

[0195] The implementation principles and technical effects of each step implemented by the processor in the embodiment of the present application are similar to the principles of the above-mentioned network communication establishment method and will not be repeated here.

[0196] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0197] In response to a routing request of a first virtual machine, determining a computing node where at least one second virtual machine to be connected is located; the first virtual machine represents a virtual machine connected to a controller;

[0198] According to the connection mode between the computing nodes where the second virtual machines are located and the controller, the routing information of the first virtual machine is reflected to the computing nodes where the second virtual machines are located, so as to complete the communication establishment between the first virtual machine and the second virtual machines.

[0199] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned network communication establishment method and will not be repeated here.

[0200] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0201] In response to a routing request of a first virtual machine, determining a computing node where at least one second virtual machine to be connected is located; the first virtual machine represents a virtual machine connected to a controller;

[0202] According to the connection mode between the computing nodes where the second virtual machines are located and the controller, the routing information of the first virtual machine is reflected to the computing nodes where the second virtual machines are located, so as to complete the communication establishment between the first virtual machine and the second virtual machines.

[0203] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned network communication establishment method and will not be repeated here.

[0204] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0205] Obtain routing information of the first virtual machine;

[0206] Based on the routing information, a routing request is sent to the controller to instruct the controller to determine the computing node where at least one second virtual machine to be connected is located, and based on the connection method between the computing node where each second virtual machine is located and the controller, the routing information of the first virtual machine is reflected to the computing node where each second virtual machine is located, thereby completing the communication establishment between the first virtual machine and each second virtual machine; the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system.

[0207] The implementation principles and technical effects of each step implemented by the processor in the embodiment of the present application are similar to the principles of the above-mentioned network communication establishment method and will not be repeated here.

[0208] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0209] Obtain routing information of the first virtual machine;

[0210] Based on the routing information, a routing request is sent to the controller to instruct the controller to determine the computing node where at least one second virtual machine to be connected is located, and based on the connection method between the computing node where each second virtual machine is located and the controller, the routing information of the first virtual machine is reflected to the computing node where each second virtual machine is located, thereby completing the communication establishment between the first virtual machine and each second virtual machine; the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system.

[0211] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned network communication establishment method and will not be repeated here.

[0212] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0213] Obtain routing information of the first virtual machine;

[0214] Based on the routing information, a routing request is sent to the controller to instruct the controller to determine the computing node where at least one second virtual machine to be connected is located, and based on the connection method between the computing node where each second virtual machine is located and the controller, the routing information of the first virtual machine is reflected to the computing node where each second virtual machine is located, thereby completing the communication establishment between the first virtual machine and each second virtual machine; the controller is a controller connected to the first virtual machine in the controller cluster of the cloud computing system.

[0215] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned network communication establishment method and will not be repeated here.

[0216] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0217] receiving routing information of the first virtual machine reflected by a controller; the controller being a controller in a controller cluster of the cloud computing system connected to the first virtual machine; the routing information being reflected by the controller to the computing node where the second virtual machine is located, after determining the computing node where at least one second virtual machine to be connected is located, based on a connection method between the computing node where each second virtual machine is located and the controller, upon receiving a routing request from the first virtual machine;

[0218] According to the routing information, communication between the first virtual machine and the second virtual machine is established.

[0219] The implementation principles and technical effects of each step implemented by the processor in the embodiment of the present application are similar to the principles of the above-mentioned network communication establishment method and will not be repeated here.

[0220] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0221] receiving routing information of the first virtual machine reflected by a controller; the controller being a controller in a controller cluster of the cloud computing system connected to the first virtual machine; the routing information being reflected by the controller to the computing node where the second virtual machine is located, after determining the computing node where at least one second virtual machine to be connected is located, based on a connection method between the computing node where each second virtual machine is located and the controller, upon receiving a routing request from the first virtual machine;

[0222] According to the routing information, communication between the first virtual machine and the second virtual machine is established.

[0223] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned network communication establishment method and will not be repeated here.

[0224] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0225] receiving routing information of the first virtual machine reflected by a controller; the controller being a controller in a controller cluster of the cloud computing system connected to the first virtual machine; the routing information being reflected by the controller to the computing node where the second virtual machine is located, after determining the computing node where at least one second virtual machine to be connected is located, based on a connection method between the computing node where each second virtual machine is located and the controller, upon receiving a routing request from the first virtual machine;

[0226] According to the routing information, communication between the first virtual machine and the second virtual machine is established.

[0227] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned network communication establishment method and will not be repeated here.

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

[0229] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.

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

[0231] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for establishing network communication, characterized in that: Applied to any controller in a controller cluster of a cloud computing system, the method comprises: In response to a routing request of a first virtual machine, determining a computing node where at least one second virtual machine to be connected is located; the first virtual machine represents a virtual machine connected to the controller; For any computing node where a second virtual machine is located, if the computing node where the second virtual machine is located is directly connected to the controller, the routing information of the first virtual machine is directly reflected to the computing node where the second virtual machine is located; If the computing node of the second virtual machine is connected to the controller through a second controller, the routing information is forwarded to the second controller so that the second controller reflects the routing information to the computing node where the second virtual machine is located; the controller and the second controller are connected in a fully connected mode to complete the communication establishment between the first virtual machine and each of the second virtual machines.

2. The method according to claim 1, characterized in that The determining of the computing node where the at least one second virtual machine to be connected is located includes: Obtaining configuration information of a network in the cloud computing system and network information of a network where the first virtual machine is located; Acquire, based on the network configuration information, a plurality of candidate computing nodes that match the network information; Determine the other computing nodes among the candidate computing nodes except the computing node where the first virtual machine is located as the computing nodes where the at least one second virtual machine to be connected is located.

3. The method according to claim 1 or 2, characterized in that The routing request of the first virtual machine is a communication establishment request initiated by the first virtual machine to the controller in order to establish network communication with the second virtual machine.

4. A method for establishing network communication, characterized in that: Applied to a computing node where a first virtual machine is located in a cloud computing system, the method includes: Obtaining routing information of the first virtual machine; Sending a routing request to a controller based on the routing information to instruct the controller to determine a computing node where at least one second virtual machine to be connected is located, and for any computing node where the second virtual machine is located, directly reflecting the routing information of the first virtual machine to the computing node where the second virtual machine is located if the computing node where the second virtual machine is located is directly connected to the controller; When the computing node of the second virtual machine is connected to the controller through a second controller, the routing information is forwarded to the second controller so that the second controller reflects the routing information to the computing node where the second virtual machine is located; the controller and the second controller are connected in a fully connected mode to complete the communication establishment between the first virtual machine and each of the second virtual machines; the controller is a controller in the controller cluster of the cloud computing system that is connected to the first virtual machine.

5. The method according to claim 4, characterized in that The computing node where the first virtual machine is located includes a first virtual router and a first virtual router agent; The obtaining routing information of the first virtual machine includes: When the first virtual machine is started, the first virtual router generates a forwarding table entry and notifies the first virtual router agent via a network link communication mechanism; The first virtual router agent processes the forwarding table entry to obtain the routing information.

6. The method according to claim 5, characterized in that The controller is connected to the computing node where the first virtual machine is located via an instant messaging protocol; the method further includes: When the first virtual router agent obtains the routing information, it sends the routing information to the controller through the instant messaging protocol.

7. A method for establishing network communication, characterized in that: Applied to a computing node where a second virtual machine is located in a cloud computing system, the method includes: receiving routing information of a first virtual machine reflected by a controller; the controller being a controller in a controller cluster of the cloud computing system connected to the first virtual machine; the routing information being reflected by the controller, upon receiving a routing request from the first virtual machine, directly to the computing node where the second virtual machine is located, after determining the computing node where at least one second virtual machine to be connected is located, if the computing node where the second virtual machine is located is directly connected to the controller, or, if the computing node of the second virtual machine is connected to the controller via a second controller, to the computing node where the second virtual machine is located, via the second controller; According to the routing information, communication between the first virtual machine and the second virtual machine is established.

8. The method according to claim 7, characterized in that The computing node where the second virtual machine is located includes a second virtual router and a second virtual router agent; and establishing communication between the first virtual machine and the second virtual machine according to the routing information includes: The second virtual router agent, upon receiving the routing information of the first virtual machine reflected by the controller, sends the routing information to the second virtual router; The second virtual router translates the routing information into a forwarding table entry to implement a communication connection between the first virtual machine and the second virtual machine.

9. A network communication establishment system, characterized in that: The network communication establishment system includes a controller, a computing node where a first virtual machine is located, and a computing node where a second virtual machine is located; the first virtual machine is a virtual machine connected to the controller; and the controller is any controller in a controller cluster of a cloud computing system; The controller is configured to implement the steps of the method according to any one of claims 1 to 3; The computing node where the first virtual machine is located is used to implement the steps of any one of the methods of claims 4 to 6; The computing node where the second virtual machine is located is used to implement the steps of any one of the methods of claims 7 to 8.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Virtual network system

    CN106572014A

  • Connection establishing method under enterprise hybrid cloud computing environment

    CN107295008A