Gateway cluster and deployment method therefor, data forwarding method, device, storage medium, and program product

By distributing virtual gateway instances across physical machines and allowing their number to change dynamically, the problems of resource waste and insufficient elasticity in physical machine-based gateway clusters are solved, achieving more efficient resource utilization and disaster recovery capabilities.

WO2026017027A1PCT designated stage Publication Date: 2026-01-22CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/108559
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-15
Filing Date
2025-07-15
Publication Date
2026-01-22

AI Technical Summary

Technical Problem

Existing gateway clusters deployed in the form of physical machines suffer from resource waste and insufficient elasticity, especially under low traffic conditions.

Method used

Virtualization technology is used to deploy multiple virtual gateway instances on a single physical machine. Virtual gateway instances are prioritized to be deployed on physical machines with loads that meet the set requirements, and the number of virtual gateway instances can be dynamically changed to improve resource utilization and disaster recovery capabilities.

Benefits of technology

It improves the resource utilization and disaster recovery of the gateway cluster, enhances its resilience, and ensures that the gateway cluster remains available even when physical machines or switches fail.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025108559_22012026_PF_FP_ABST
    Figure CN2025108559_22012026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present invention relate to the technical field of cloud computing, and provide a gateway cluster and a deployment method therefor, a data forwarding method, a device, a storage medium, and a program product. In the embodiments of the present invention, a single physical machine is used as a resource pool, and virtualization technology is used to implement deployment of a plurality of virtual gateway instances on a single physical machine, thereby improving resource utilization. A plurality of virtual gateway instances of a same gateway cluster are dispersedly deployed on at least two physical machines. Specifically, the virtual gateway instances deployed on the physical machines are used as the load of the physical machines, and the virtual gateway instances are preferentially deployed on a physical machine having the lightest load or relatively-light load, thereby improving the disaster recovery performance of the gateway cluster. Additionally, the number of virtual gateway instances included in a gateway cluster can change dynamically, i.e., the virtual gateway instances are allowed to be scaled out or in on demand, thereby enhancing the elasticity of the gateway cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Gateway clusters and their deployment methods, data forwarding methods, devices, storage media and software products Technical Field

[0001] This disclosure relates to the field of cloud computing technology, and in particular to a gateway cluster and its deployment method, data forwarding method, device, storage medium and program product. Background Technology

[0002] In cloud networks, gateway devices act as a bridge between cloud servers and external networks such as enterprise data centers, enterprise office networks, or the Internet, primarily performing data transmission and routing functions. To achieve disaster recovery and backup, multiple gateway devices are typically deployed in cloud networks, forming a gateway cluster.

[0003] In current gateway cluster implementations, gateway devices are deployed as physical machines. A gateway cluster typically consists of at least four physical machines for disaster recovery and backup. This physical machine-based deployment offers high stability; if some physical machines fail, the remaining functional machines ensure the overall availability of the gateway cluster.

[0004] However, gateway clusters deployed in the form of physical machines are rigid, which leads to a serious waste of resources for gateway clusters with low traffic, and also results in insufficient elasticity. Summary of the Invention

[0005] This disclosure provides a gateway cluster and its deployment method, data forwarding method, device, storage medium and program product, which realize the deployment of the gateway cluster by distributing virtual gateway instances on physical machines, thereby improving the resource utilization, disaster recovery capability and elasticity of the gateway cluster.

[0006] This disclosure provides a gateway system, including: at least two physical machines and at least one gateway cluster. The gateway cluster includes multiple virtual gateway instances, the number of which can be dynamically changed, and the multiple virtual gateway instances are distributed across the at least two physical machines. The distributed deployment means that the virtual gateway instances are used as loads on the physical machines, and the virtual gateway instances are preferentially deployed on physical machines whose loads meet set requirements. Each virtual gateway instance includes a virtual network interface card (NIC), which is obtained by virtualizing the physical NIC on the physical machine where the virtual gateway instance resides, and the virtual network port of the virtual NIC has a mapping relationship with the physical network port of the physical NIC.

[0007] This disclosure also provides a gateway cluster, including: at least two physical machines and multiple virtual gateway instances. The number of virtual gateway instances can be dynamically changed, and the multiple virtual gateway instances are distributed across the at least two physical machines. The distributed deployment means that the virtual gateway instances are used as loads on the physical machines, and the virtual gateway instances are preferentially deployed on physical machines whose load meets set requirements. Each virtual gateway instance includes a virtual network interface card (NIC), which is obtained by virtualizing the physical NIC on the physical machine where the virtual gateway instance resides, and the virtual network port of the virtual NIC has a mapping relationship with the physical network port of the physical NIC.

[0008] This disclosure also provides a gateway cluster deployment method, comprising: obtaining deployment requirement information of the gateway cluster, the deployment requirement information describing the deployment of multiple virtual gateway instances included in the gateway cluster on at least two physical machines; generating target deployment description information corresponding to the virtual gateway instances with the goal of distributing the multiple virtual gateway instances across the at least two physical machines, the target deployment description information describing the deployment of the virtual gateway instances on target physical machines among the at least two physical machines; sending the target deployment description information to the target physical machines so that the target physical machines deploy the virtual gateway instances locally according to the image files corresponding to the virtual gateway instances; wherein, the virtual gateway instance includes a virtual network interface card (NIC), the virtual NIC being obtained by virtualizing the physical NIC on the target physical machine, and the virtual network port of the virtual NIC having a mapping relationship with the physical network port of the physical NIC; wherein, the distributed deployment refers to using the virtual gateway instances as load on the physical machines, and prioritizing the deployment of the virtual gateway instances on physical machines with loads meeting set requirements.

[0009] This disclosure also provides a gateway cluster deployment method, comprising: receiving target deployment description information, the target deployment description information being used to describe any virtual gateway instance in the gateway cluster to be deployed on a target physical machine; deploying the virtual gateway instance on the target physical machine according to the image file corresponding to the virtual gateway instance; wherein, the virtual gateway instance includes a virtual network interface card (NIC), the virtual NIC being obtained by virtualizing the physical NIC on the target physical machine, and the virtual network port of the virtual NIC having a mapping relationship with the physical network port of the physical NIC.

[0010] This disclosure also provides a data forwarding method applied to a physical machine in a gateway system, wherein at least one virtual gateway instance in a gateway cluster is deployed on the physical machine. The method includes: receiving a packet and a target network identifier corresponding to the packet on any physical network port of the physical machine, wherein the target network identifier is used to identify the target user network corresponding to the packet; determining a target gateway cluster from the at least one gateway cluster based on the target network identifier, wherein different gateway clusters serve different user networks and different user networks have different network identifiers; and forwarding the packet to a target virtual gateway instance in the target gateway cluster, so that the target virtual gateway instance can forward the packet to an upper-layer application in the cloud network to which the gateway system belongs; wherein the target virtual gateway instance refers to a virtual gateway instance whose virtual network port is mapped to the physical network port.

[0011] This disclosure also provides a data forwarding method applied to a virtual gateway instance deployed on a physical machine in a gateway system. The virtual gateway instance belongs to a target gateway cluster. The method includes: receiving packets sent by an upper-layer application in the cloud network to which the gateway system belongs, wherein different gateway clusters serve different user networks and different user networks have different network identifiers; adding a target network identifier to the packets, wherein the target network identifier is used to identify the target user network served by the target gateway cluster, wherein different gateway clusters serve different user networks and different user networks have different network identifiers; and sending the packets to a physical network interface card (NIC) on the physical machine corresponding to the virtual NIC through a virtual NIC included in the virtual gateway instance, so that the physical NIC sends the packets out.

[0012] This disclosure also provides an electronic device, including: a memory and a processor; the memory is used to store a computer program, and the processor is coupled to the memory and used to execute the computer program to implement the steps in the above-described method.

[0013] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, enables the processor to perform the steps in the methods described above.

[0014] This disclosure also provides a computer program product, which includes a computer program / instructions that, when executed by a processor, enable the processor to perform the steps described in the method embodiments above.

[0015] In this embodiment, a single physical machine is used as a resource pool, and virtualization technology is employed to deploy multiple virtual gateway instances on that single virtual machine, thereby improving resource utilization. Specifically, multiple virtual gateway instances within the same gateway cluster are distributed across at least two physical machines. The virtual gateway instances act as loads on the physical machines, with priority given to deploying them on physical machines with loads meeting set requirements (e.g., the lightest load), thus improving the disaster recovery capability of the gateway cluster. Furthermore, the number of virtual gateway instances in the gateway cluster can be dynamically adjusted, allowing for on-demand scaling up and down of the virtual gateway instances, enhancing the elasticity of the gateway cluster. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:

[0017] Figure 1 is a schematic diagram of the structure of a gateway system provided in an exemplary embodiment of this disclosure;

[0018] Figure 2 is a schematic diagram of the structure of a physical machine provided in an exemplary embodiment of this disclosure;

[0019] Figure 3 is an interconnection architecture diagram of a physical machine and a physical switch provided by an exemplary embodiment of this disclosure;

[0020] Figure 4 is a schematic diagram of a deployment method for a virtual gateway instance on a physical machine provided in another exemplary embodiment of this disclosure;

[0021] Figure 5 is a schematic diagram of the structure of a gateway system provided in yet another exemplary embodiment of this disclosure;

[0022] Figure 6 is a flowchart illustrating a gateway cluster deployment method provided in an exemplary embodiment of this disclosure;

[0023] Figures 7a-7d are schematic diagrams of the structure of yet another gateway system provided in yet another exemplary embodiment of the present disclosure;

[0024] Figure 8 is a schematic diagram of the structure of a gateway system provided in yet another exemplary embodiment of this disclosure;

[0025] Figure 9 is a flowchart illustrating a gateway cluster deployment method provided in an exemplary embodiment of this disclosure;

[0026] Figure 10 is an interactive flowchart of data forwarding provided by an exemplary embodiment of this disclosure;

[0027] Figure 11 is a schematic diagram of the structure of an electronic device provided in another exemplary embodiment of this disclosure. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0029] 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, and displayed data) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of such data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding access points are provided for users to choose to authorize or refuse. In addition, the various models involved in this disclosure (including but not limited to language models or large models) comply with relevant laws and standards.

[0030] Gateway clusters deployed on physical machines are inherently fixed, leading to significant resource waste for low-traffic gateway clusters and insufficient elasticity. This embodiment addresses this by using a single physical machine as a resource pool and leveraging virtualization technology to deploy multiple virtual gateway instances on a single virtual machine, improving resource utilization. Specifically, multiple virtual gateway instances of any gateway cluster are distributed across at least two physical machines. The virtual gateway instances deployed on physical machines serve as their load, with priority given to deploying virtual gateway instances on physical machines with loads meeting set requirements (e.g., the lightest load), thereby improving the gateway cluster's disaster recovery capabilities. Furthermore, the number of virtual gateway instances in any gateway cluster can be dynamically adjusted, allowing for on-demand scaling up and down of virtual gateway instances, enhancing the gateway cluster's elasticity.

[0031] The technical solutions provided by the embodiments of this disclosure are described in detail below with reference to the accompanying drawings.

[0032] Figure 1 is a schematic diagram of a gateway system provided in an exemplary embodiment of this disclosure. As shown in Figure 1, the system 100 includes at least two physical machines 101 and at least one gateway cluster. Each gateway cluster includes multiple virtual gateway instances, the number of which can be dynamically changed, and the multiple virtual gateway instances are distributed across the at least two physical machines. Distributed deployment means using the virtual gateway instances as loads on the physical machines, prioritizing the deployment of virtual gateway instances on physical machines with loads meeting set requirements. For example, when deploying virtual gateway instances, they can be prioritized on the physical machine with the lightest or least load. The lightest or least load is an example of load meeting set requirements, but it is not limited to this; the "load meeting set requirements" can be reasonably set according to application needs. Furthermore, when the number of virtual gateway instances is less than or equal to the number of physical machines, the virtual gateway instances are distributed across different physical machines. This ensures that virtual gateway instances are deployed on the lightest-loaded physical machines. When the number of virtual gateway instances exceeds the number of physical machines, virtual gateway instances are prioritized for deployment on the lightest-loaded or relatively lightest-loaded physical machines based on the load of the virtual gateway instances already deployed on each physical machine. The load of the virtual gateway instances already deployed on a physical machine can be reflected by the number of virtual gateway instances deployed on that physical machine and the amount of resources they consume. The lightest-loaded or relatively lightest-loaded physical machine can be the one with the fewest or fewest virtual gateway instances, or the one with the fewest or fewest resources consumed by the virtual gateway instances. "Fewest" can be understood as less than a set number or less than a set amount of resources.

[0033] Figure 1 shows 3 physical machines 101 and 3 gateway clusters (i.e., gateway clusters 1-3). Each gateway cluster includes 3 virtual gateway instances; for example, gateway cluster 1 includes virtual gateway instances 11-13, and these 3 virtual gateway instances are distributed across the 3 physical machines 101. Gateway clusters 2 and 3 are similar, each including 3 virtual gateway instances; for example, gateway cluster 2 includes virtual gateway instances 21-23, and gateway cluster 3 includes virtual gateway instances 31-33. The virtual gateway instances in each gateway cluster are distributed across the 3 physical machines 101. Figure 1 uses 3 physical machines, 3 gateway clusters, and 3 virtual gateway instances as an example, but it is not limited to this. Furthermore, the number of virtual gateway instances in different gateway clusters can be the same or different, and this is not limited.

[0034] In this embodiment, the gateway system 100 can act as a gateway layer in the cloud network, serving as the entry point for the cloud network. It is responsible for receiving external traffic and routing it to the corresponding upper-layer applications; alternatively, it can receive traffic from upper-layer applications and forward it. To meet the traffic forwarding needs of different applications, one or more gateway clusters can be deployed in the cloud network environment. Each gateway cluster is responsible for carrying traffic for a specific type of application. Different application traffic originates from different application systems, and these systems belong to different VLANs (Virtual Local Area Networks). Traffic from different VLANs carries different VLAN identifiers (VLAN IDs). For example, the cloud network includes different application systems interconnected via public networks and dedicated lines. Different application systems can use different gateway clusters for traffic carrying. For instance, traffic traveling via the public network can be carried by an EIP (Elastic IP Address) gateway cluster, and traffic traveling via a dedicated line can be carried by a dedicated line gateway cluster. Clients traveling via public networks and dedicated lines access the corresponding application systems in the cloud network through their respective gateway clusters.

[0035] In this embodiment, any gateway cluster includes multiple virtual gateway instances, and the number of virtual gateway instances in a gateway cluster can change dynamically, allowing for dynamic deployment on demand. That is, the number of virtual gateway instances in any gateway cluster can be increased (expanded) or decreased (shrunk) as needed. For any gateway cluster, by dynamically deploying multiple virtual gateway instances on demand, disaster recovery and backup are achieved at the virtual gateway instance level. In the event of a failure of some virtual gateway instances, other gateway instances can continue to provide gateway services. Furthermore, the virtual gateway instances in any gateway cluster are distributed across at least two physical machines to achieve disaster recovery and backup at the physical machine level. This ensures that when some physical machines fail, the remaining available physical machines guarantee the availability of the gateway cluster.

[0036] In this embodiment, the physical machine 101 can be an electronic device capable of providing various resources such as computing, storage, and networking, and possessing a certain computing power. For example, it can be various terminal devices such as laptops, desktop computers, and mobile phones, or server devices such as traditional servers, cloud servers, service clusters, or workstations; there is no limitation in this regard. The gateway system 100 includes at least two physical machines, which can come from the same physical machine cluster or different physical machine clusters; there is no limitation in this regard.

[0037] In this embodiment, the virtual gateway instance is a virtualized gateway with the same or similar functions as the physical gateway, primarily responsible for traffic transmission and reception, routing, and protocol conversion. Virtualization technology allows the deployment of virtual gateway instances on physical machines. This embodiment does not limit the virtualization technology used to deploy virtual gateway instances on physical machines. Virtualization technologies can be, but are not limited to, operating system-level virtualization (or containerization) and host-level virtualization (or virtual machine technology). Both containerization and virtual machine technologies allow virtualized gateway instances to run in completely isolated environments, preventing interference between different virtual gateway instances. A failure in one virtual gateway instance will not affect other virtual gateway instances, ensuring the availability of the virtual gateway instances.

[0038] Using a single physical machine as a resource pool, virtualization technologies (such as CPU virtualization and disk virtualization in containerization) are used to virtualize the computing and storage resources of the physical machine, resulting in multiple independent running environments. Virtual gateway instances can be deployed in each independent running environment. A single physical machine can deploy multiple virtual gateway instances, achieving isolation of computing and storage resources between different virtual gateway instances. Furthermore, to achieve network resource isolation between virtual gateway instances, Input / Output Virtualization technology is used to virtualize the physical network interface card (NIC) on the physical machine into multiple virtual NICs, which are then assigned to the virtual gateway instances. The virtual network interfaces of the virtual NICs are mapped to the physical network interfaces of the physical NICs.

[0039] In this embodiment, when using I / O virtualization technology to partition virtual network interfaces (VAs) on a physical network interface card (NIC), SR-IOV (Single-root I / O virtualization) technology can be used to divide the physical NIC into multiple virtual NICs. The network resources of each virtual NIC are isolated from each other, and the virtual NICs are transparently transmitted to the virtual gateway instance (i.e., the virtual NICs are assigned to the virtual gateway instance). In this embodiment, the PF (Physical Function) is the PCIe (Peripheral Component Interconnect Express) function provided by the physical NIC. The PF, as a full-featured PCIe interface, is responsible for managing and configuring VFs (Virtual Functions). Each PF can expand into multiple VFs, which are virtual NICs. A VF is a lightweight PCIe function that can be assigned to different virtual gateway instances. Therefore, in this embodiment, the physical NIC is referred to as the PF, and the virtual NIC is referred to as the VF.

[0040] In some embodiments of this disclosure, the terms PF and VF are used to refer to physical network interface cards (NICs) and virtual NICs. This terminology is for ease of description and does not imply that the embodiments of this disclosure can only utilize SR-IOV technology when partitioning physical NICs using virtualization technology. For example, MR-IOV (Multi-Root I / O Virtualization) can also be used.

[0041] In an optional embodiment, when using containerization technology to deploy the virtual gateway instance, the virtual gateway instance is implemented as a containerized gateway, which refers to a gateway application running in a container. A containerized gateway means packaging the gateway application into an image file and using container orchestration tools to deploy the image file to a specified physical machine. By containerizing the gateway application, more efficient deployment, management, and scaling can be achieved. It should be noted that when using containerization technology, it depends on a containerization management system. This disclosure does not limit the specific containerization management system; it can be, but is not limited to, containerization technologies such as K8s (short for Kubernetes) and Docker Swarm.

[0042] In this embodiment, a single physical machine is used as a resource pool, and virtualization technology is employed to deploy multiple virtual gateway instances on a single virtual machine, thereby improving resource utilization. Specifically, multiple virtual gateway instances of any gateway cluster are distributed across at least two physical machines. The virtual gateway instances deployed on physical machines serve as their load, and priority is given to deploying virtual gateway instances on physical machines with loads meeting set requirements (e.g., the lightest load), thus improving the disaster recovery capability of the gateway cluster. Furthermore, the number of virtual gateway instances in the gateway cluster can be dynamically changed, allowing for on-demand scaling up and down of virtual gateway instances, enhancing the elasticity of the gateway cluster.

[0043] The above embodiments describe how to deploy a gateway cluster in a gateway system to improve the resource utilization and disaster recovery of the gateway cluster. Further, in an optional embodiment, the cloud network also includes a switch layer, which includes at least one physical switch 102; this physical switch is interconnected with at least two physical machines in the gateway system via physical network ports. The interconnection method between the physical network ports of physical machines and the physical network ports of physical switches is not limited. For example, the interconnection between physical network ports on the same physical machine and physical network ports on the same physical switch. Alternatively, different physical network ports of the same physical machine can be distributed and interconnected with physical network ports on different physical switches. In this way, the number of physical network ports on the same physical machine affected when one physical switch fails is relatively small, thus reducing the blast radius of the physical switch and minimizing the impact range of the physical switch on the same physical machine. The physical switches in the switch layer are responsible for data forwarding between physical machines and between physical machines and external networks (such as the Internet). The switch layer may or may not belong to the gateway system; this is not restricted.

[0044] In this embodiment, at least one physical switch in the switch layer is interconnected with at least two physical machines in the gateway system via physical network ports. If any physical switch fails, data may not be able to be forwarded; therefore, it is necessary to ensure the availability and disaster recovery capabilities of the physical switches. To this end, this embodiment proposes an interconnection method between a physical switch in the switch layer and at least two physical machines, which will be described below.

[0045] In this embodiment, the physical machine adopts a NUMA (Non-Uniform Memory Access) architecture, but is not limited to this. NUMA architecture is a memory architecture designed for multi-processor physical machines, which divides the physical machine's CPU (Central Processing Unit) into at least one non-uniform memory access NUMA node (hereinafter referred to as a NUMA node). Each CPU has its own independent memory space; accessing its own local memory is the fastest, while accessing remote NUMA nodes is slower.

[0046] Therefore, in this embodiment, the physical network interface card (NIC) on the physical machine is bound to the CPU. Data sent from the physical NIC is directly processed in the local memory of the corresponding CPU, thereby reducing data processing across NUMA nodes and lowering latency. Each NUMA node includes at least one physical NIC, and each physical NIC has at least one physical network port. One physical network port can virtualize at least one virtual network port, thus one physical network port can map to multiple virtual network ports; preferably, one physical network port virtualizes one virtual network port, thus one physical network port corresponds to one virtual network port.

[0047] As shown in Figure 2, a physical machine 101 includes two NUAM nodes, NUMA0 and NUMA1. NUMA0 includes two physical network cards, PF0 and PF1, and NUMA1 includes two physical network cards, PF2 and PF3. The physical network cards are distinguished by appending a serial number X to "PF". For example, 0 in PF0 is an example of X. X is a natural number, and X ≥ 0. Each physical network card includes two physical network ports, which are distinguished by appending (Y) to the serial number X. For example, appending (1) to physical network card PF0, i.e., PF0(1), represents one physical network port of physical network card PF0. Physical network card PF0 includes two physical network ports, namely PF0(1) and PF0(2). The naming method of other physical network cards and their included physical network ports is similar to that of physical network card PF0, and will not be described again. Furthermore, any virtual gateway instance includes a virtual network card obtained by virtualizing the physical network cards on the NUMA nodes of its physical machine. Based on the physical machine 101 shown in Figure 2, the physical network card PF0 virtualizes a virtual network card VF0, and one physical network port virtualizes one virtual network port, but is not limited to this. Among them, PF0(1) corresponds to VF0(1); PF0(2) corresponds to VF0(2). The naming method of the virtual network card and its included virtual network port can refer to the naming method of the physical network card and its included physical network port, and will not be repeated here. Similarly, physical network cards PF1-PF3 can virtualize corresponding virtual network cards, and the virtual network cards include corresponding virtual network ports.

[0048] In this embodiment, the physical network ports on the same NUMA node are interconnected with the physical network ports on at least one physical switch. To improve the disaster recovery of the physical switches interconnected by the same NUMA node, optionally, the physical network ports of the same NUMA node are interconnected with the physical network ports of different physical switches. The following description uses Figure 3 as an example to illustrate this connection method.

[0049] As shown in Figure 3, any physical machine 101 includes two NUMA nodes, each NUMA node includes two physical network interface cards (NICs), each NIC includes two physical network ports, for a total of eight physical network ports. Taking interconnection with four physical switches 102 as an example, as shown in Figure 3, each physical machine 101 is connected to the physical switches 102 via a Full Mesh topology. Full Mesh represents a connection method where each physical machine 101 is directly connected to other physical switches 102. Even if one connection fails, transmission can continue through other paths, improving disaster recovery capabilities. As shown in Figure 3, the physical network ports in each NUMA node are interconnected with different physical switches 102, and each physical machine 101 has multiple paths to reach the physical switch 102, thereby reducing the risk of single points of failure and achieving high availability of the gateway system.

[0050] It should be noted that the number of NUMA nodes, the number of physical network cards included in a NUMA node, the number of network ports included in a physical network card, the number of physical switches, and the number of physical network cards included in a physical switch shown in Figure 3 are all examples and do not constitute a limitation on the embodiments of this disclosure.

[0051] In another example, there exists a situation where the number of physical switches in the switch layer is less than the number of physical ports on any NUMA node, and physical ports on the same NUMA node may be interconnected with physical ports on the same physical switch. In this case, to improve disaster recovery capabilities, when physical ports on the same NUMA node are interconnected with physical ports on at least one physical switch, the goal is to maximize the number of physical switches interconnected by the physical ports on the same NUMA node.

[0052] The deployment method for any virtual gateway instance on a physical machine varies depending on the total number of NUMA nodes. NUMA nodes serve as a resource on the physical machine to host the virtual gateway instance. The load on the physical machine can be reflected by the number of idle NUMA nodes; a higher number of idle NUMA nodes indicates a lighter load, and vice versa. If there are no idle NUMA nodes, the load can be reflected by the number of NUMA nodes reused by the virtual gateway instance; a higher number of reused NUMA nodes indicates a heavier load, and vice versa. In summary, considering the number of NUMA nodes, a distributed deployment strategy can be implemented by deploying a virtual gateway instance on one of K NUMA nodes, prioritizing the deployment on the lightest-loaded physical machine—that is, the one with the most idle NUMA nodes or the fewest reused NUMA nodes. Deploying a virtual gateway instance on K NUMA nodes can also be understood as follows: any virtual gateway instance includes virtual network interfaces obtained by virtualizing the physical network interfaces on the K NUMA nodes of its physical machine, where K=2. n The value of n is a natural number and satisfies 2 n≤N, where N is the total number of NUMA nodes in the physical machine. The deployment method of any virtual gateway instance is defined as: deploying a virtual gateway instance on K NUMA nodes, or a virtual gateway instance covering K NUMA nodes, or a virtual gateway instance containing virtual network interfaces (NICs) obtained by virtualizing the physical NICs in the K NUMA nodes. Different values ​​of K result in different deployment methods. The following describes the deployment methods of any virtual gateway instance using examples where the number of NUMA nodes N in the physical machine is 2 and 4, but the value of N is not limited to these.

[0053] Taking N=2 as an example, based on the above constraint K=2 n If n ≤ N, then n = 0 or 1. As shown in Figure 4, when n = 0, K = 1, and virtual gateway instance 11 or virtual network card instance 12 includes a virtual network card obtained by virtualizing the physical network card on one NUMA node on its physical machine. This deployment method is called single NUMA deployment. As shown in Figure 4, when n = 1, K = 2, and virtual gateway instance 21 includes a virtual network card obtained by virtualizing the physical network cards on two NUMA nodes on its physical machine. This deployment method is called full NUMA deployment. Different deployment methods have different applicable scenarios. For example, single NUMA deployment can be applied to scenarios with low traffic, as it has fewer network I / O resources; full NUMA deployment can be applied to scenarios with high traffic, as it has more network I / O resources. Among them, network I / O resources refer to the resources required for data transmission, including but not limited to: network bandwidth, network latency, and throughput.

[0054] Taking N=4 as an example, based on the above constraint K=2 n If ≤ N, and N = 4, then n = 0, 1, or 2; when n = 0, K = 1, any virtual gateway instance includes a virtual network interface card (NIC) obtained by virtualizing the physical NIC on one NUMA node of its physical machine, and this deployment method is called single NUMA deployment; when n = 1, K = 2, any virtual gateway instance includes a virtual NIC obtained by virtualizing the physical NIC on two NUMA nodes of its physical machine, and this deployment method is called dual NUMA deployment; when n = 2, K = 4, any virtual gateway instance includes a virtual NIC obtained by virtualizing the physical NIC on four NUMA nodes of its physical machine, and this deployment method is called full NUMA deployment.

[0055] In one optional embodiment, the value of n is the same in the same gateway cluster; the value of n is different or the same in different gateway clusters.

[0056] It should be noted that for single NUMA deployment, the deployment method refers to the case where K=1, and is not limited to the value of N; for full NUMA deployment, the meaning will be different when the value of N is different; when N=2, the deployment method with K=2 is called full NUMA deployment; when N=4, the deployment method with K=4 is called full NUMA deployment. Therefore, in this embodiment of the disclosure, the deployment method in which the values ​​of N and K are the same is called full NUMA deployment; where N=K>1.

[0057] The above embodiments introduced the interconnection method between physical switches and physical machines, as well as the method of deploying virtual gateway instances on physical machines. Referring to the interconnection method shown in Figure 3, this disclosure provides an implementation architecture for a virtual gateway instance. As shown in Figure 5, any physical machine 101 includes two NUMA nodes, each NUMA node includes two physical network cards, and each physical network card includes two physical network ports; any physical switch 102 includes eight physical network ports; physical machine 101 is connected to physical switch 102 via a Full Mesh connection. Specifically, virtual gateway instances of gateway cluster 1 (such as virtual gateway instances 11-18) are deployed on each physical machine 101 using a single NUAM deployment method; and virtual gateway instances of gateway cluster 2 (such as virtual gateway instances 21-24) are deployed using a full NUAM deployment method. Therefore, different gateway clusters can be deployed simultaneously on the same physical machine.

[0058] The disaster recovery capability of this gateway system is analyzed based on the structure shown in Figure 5. Table 1 - Switch Faults:

[0059] Table 1 illustrates the impact of a physical switch failure on the physical network ports bound to the virtual gateway instances deployed on the physical machines within the architecture shown in Figure 5. Taking a single physical switch failure as an example, the number of failed physical network ports is analyzed in both full NUMA and single NUMA deployments.

[0060] Referring to Figure 5, for a full NUMA deployment, any full NUMA virtual gateway instance is bound to a total of 8 physical network ports. Two of these ports are interconnected with the same physical switch, resulting in 2 physical network ports that could cause a full NUMA virtual gateway instance to fail. Therefore, the number of physical network ports causing a full NUMA virtual gateway instance to fail / the total number of physical network ports = 2 / 8. Figure 5 shows 4 physical machines, resulting in 8 physical network cards causing full NUMA virtual gateway instances to fail across all physical machines. Therefore, the number of physical network ports causing full NUMA virtual gateway instances to fail across all physical machines / the total number of physical network ports = 8 / 32.

[0061] For a single NUMA deployment, any single NUMA-deployed virtual gateway instance is bound to a total of 4 physical network ports. Each physical network port will interconnect with different physical switches. Therefore, the number of physical network ports that can cause a single NUMA-deployed virtual gateway instance to fail is 1. Thus, the number of physical network ports that can cause a single NUMA-deployed virtual gateway instance to fail / the total number of physical network ports = 1 / 4. Figure 5 shows a total of 4 physical machines. Therefore, the number of physical network cards that can cause single NUMA-deployed virtual gateway instances to fail across all physical machines is 4. Thus, the number of physical network ports that can cause single NUMA-deployed virtual gateway instances to fail across all physical machines / the total number of physical network ports = 8 / 32.

[0062] Based on the above analysis, it can be seen that if one physical switch fails, the total network resources affected are 1 / 4.

[0063] For cases where 2, 3, and 4 physical switches fail, the calculation method described above can be used as well, and will not be repeated here. Table 2 - Physical Machine Faults:

[0064] Table 2 shows the impact of physical machine failure on the failure of virtual gateway instances deployed on the physical machine in the architecture shown in Figure 5. Taking a physical machine failure of 1 as an example, the number of virtual gateway instances that fail is analyzed in this case, combining full NUMA deployment and single NUMA deployment.

[0065] As shown in Figure 5, for a full NUMA deployment, if any physical machine fails, the number of virtual gateway instances in any full NUMA deployment will be 1. There are 4 virtual gateway instances in Figure 5, so the number of virtual gateway instances in any full NUMA deployment / the total number of virtual gateway instances in all full NUMA deployments = 1 / 4.

[0066] For a single NUMA deployment, if any physical machine fails, the number of virtual gateway instances in any single NUMA deployment will be 2. Figure 5 shows a total of 8 single NUMA virtual gateway instances. Therefore, the number of single NUMA virtual gateway instances failing / the total number of single NUMA virtual gateway instances = 2 / 8. Based on the above analysis, if only one physical machine fails, the total impact on network resources is 1 / 4.

[0067] For cases where the number of physical machine failures is 2, 3, or 4, the calculation can be performed in the same way as described above, and will not be repeated here.

[0068] Combining the information in Tables 1 and 2 above, it can be seen that when using a full mesh approach to interconnect physical machines with physical switches, and considering both single-NUMA and full-NUMA deployments, the failure of n physical switches will affect n / 4 of the network resources, and the failure of n physical machines will affect n / 4 of the network resources. This reduces the risk of single points of failure for physical machines or switches, improving the disaster recovery capability of the gateway system. Furthermore, multiple virtual gateway instances can be dynamically deployed in any gateway cluster, enhancing the elasticity of the gateway cluster deployment.

[0069] The above embodiments described the implementation architecture of a gateway instance that includes a virtual gateway instance. The following embodiments will describe how to deploy a gateway cluster. In subsequent embodiments, some specific implementation details can be referred to the above embodiments and will not be repeated here.

[0070] Figure 6 is a flowchart illustrating a gateway cluster deployment method provided in an embodiment of this disclosure. The method is applied to a scheduling node. As shown in Figure 6, the method includes: S601: Obtaining deployment requirement information for the gateway cluster, the deployment requirement information describes the deployment of multiple virtual gateway instances contained in the gateway cluster on at least two physical machines; S602: With the goal of distributing multiple virtual gateway instances across at least two physical machines, generating target deployment description information corresponding to any virtual gateway instance, the target deployment description information describing the deployment of any virtual gateway instance on a target physical machine among the at least two physical machines; S603: Sending the target deployment description information to the target physical machine, so that the target physical machine deploys any virtual gateway instance locally based on the image file corresponding to the virtual gateway instance; wherein, any virtual gateway instance includes a virtual network interface card (NIC), the virtual NIC being obtained by virtualizing the physical NIC on the target physical machine, and the virtual network port of the virtual NIC having a mapping relationship with the physical network port of the physical NIC.

[0071] It should be noted that in this embodiment, the scheduling node is responsible for deploying virtual gateway instances in the gateway cluster onto suitable physical machines. The specific implementation of the scheduling node will differ depending on the virtualization technology used. For example, in one implementation, containerization is used for virtualization, and Kubernetes (K8s) is employed for container management. In this case, a scheduler is deployed on the Master node in the K8s system. The scheduling node in this embodiment can be implemented as a scheduler, or a functional module can be added to the Master node to implement the scheduling node in this embodiment; there are no restrictions on this approach.

[0072] In this embodiment, personnel who need to deploy a gateway cluster (such as cloud network administrators or application system administrators) can provide deployment requirement information to the scheduling node. The scheduling node provides an interactive interface for relevant personnel, such as a command window or a web (World Wide Web) page, to provide deployment requirement information when a gateway cluster needs to be deployed. The deployment requirement information includes parameters that describe the multiple virtual gateway instances included in deploying a gateway cluster on at least two physical machines. These parameters may include the number of physical machines, physical machine identifiers, the number of virtual gateway instances, and the deployment method of the virtual gateway instances. Any parameter that can describe multiple gateway instances in a gateway cluster deployed on multiple physical machines is applicable to this embodiment.

[0073] Furthermore, this embodiment does not limit the method of obtaining deployment requirement information. For example, it can be obtained from a description document, which can be edited and uploaded by the requester; or, a webpage can be provided to the requester so that the requester can set it as needed and then convert the setting information into an easily accessible format, such as JSON (JavaScript Object Notation) format, and provide it to the scheduling node; or, the scheduling node can receive commands sent by the requester to deploy virtual gateway instances according to the commands.

[0074] Furthermore, the scheduling node aims to distribute multiple virtual gateway instances across at least two physical machines, generating target deployment description information for any virtual gateway instance. This description information describes the deployment of any virtual gateway instance on a target physical machine. Distributed deployment means using the virtual gateway instance as a load on the physical machine, prioritizing deployment on the physical machine with the lowest load requirement (e.g., the lightest load). This ensures that some physical machines can be reused after distributing virtual gateway instances across different machines, improving disaster recovery. The target deployment description information is then sent to the target physical machine, enabling it to deploy any virtual gateway instance locally based on the corresponding image file. In this embodiment, the source of the image file is not limited. The image file can be pre-deployed on the target physical machine or deployed on the management node or database corresponding to the virtual gateway instance. When the image file is needed, the target physical machine retrieves it from the management node or database based on the identifier of the virtual gateway instance. Additionally, in this embodiment, the image files corresponding to different virtualization instances can be the same or each instance can have its own image file; this is not limited. Each virtual gateway instance includes a virtual network interface card (NIC), which is obtained by virtualizing the physical NIC on the target physical machine, and the virtual network port of the virtual NIC has a mapping relationship with the physical network port of the physical NIC.

[0075] In an optional embodiment, any physical machine in the gateway system includes at least one NUMA node. Based on this, the deployment requirement information may further include the target NUMA deployment method used by the gateway cluster. The target NUMA deployment method refers to the deployment method of deploying a virtual gateway instance on K NUMA nodes, where K = 2^n, n is a natural number satisfying 2^n ≤ N, N is the total number of NUMA nodes included in any physical machine, and K and N are positive integers. Optionally, when N = 2, n = 0, K = 1 or n = 1, K = 2; or when N = 4, n = 0, K = 1, or n = 1, K = 2, or n = 2, K = 4. The above method further includes: sending the target NUMA deployment method to the target physical machine, so that the target physical machine can deploy any virtual gateway instance locally according to the image file and the target NUMA deployment method. Optionally, the target NUMA deployment method can be sent to the physical machine as part of the target deployment description information; or it can be sent to the physical machine separately, without limitation.

[0076] The following example illustrates how to deploy multiple gateway instances across multiple physical machines.

[0077] As shown in Figure 7a, the gateway system includes four physical machines (physical machines 701-704). Each physical machine includes two NUMA nodes, namely NUMA0 and NUMA1 shown in Figure 7a. Any physical machine in Figure 7a is divided by a vertical line. The virtual gateway instance located to the left of the extension of the vertical line is the virtual gateway instance of NUMA0 deployed on that physical machine; the virtual gateway instance located to the right of the extension of the vertical line is the virtual gateway instance of NUMA1 deployed on that physical machine. The structure of the physical machines in Figures 7b-7d is similar to that in Figure 7a, and the implementation architecture of the gateway instances is similar, which will not be elaborated further. Further, the scheduling node 705 receives deployment requirement information 1, which describes the four virtual gateway instances of gateway cluster 1 to be deployed and the deployment of the virtual gateway instances according to the single NUMA deployment method. The scheduling node 705 aims to distribute the four virtual gateway instances of gateway cluster 1 across the four physical machines of the gateway system and generates target deployment description information corresponding to any virtual gateway instance. When generating the target deployment description information, virtual gateway instances are allocated to physical machines based on the principle of allocating the least available resources. Since there are currently no virtual gateway instances on any of the physical machines, the four virtual gateway instances can be evenly distributed among the four physical machines. Therefore, scheduling node 705 sends the target deployment description information to each physical machine. After receiving the target deployment description information, the physical machines in the gateway system deploy virtual gateway instances 11-14 according to the single NUMA deployment method, that is, each virtual gateway instance is deployed on one NUMA node of one physical machine. In this embodiment, the target deployment description information includes the target NUMA deployment method as an example, but it is not limited to this.

[0078] Furthermore, as shown in Figure 7b, the requester needs to expand the aforementioned gateway cluster 1 and uploads new deployment requirement information 2. This deployment requirement information 2 describes the need to expand two virtual gateway instances in gateway cluster 1 using a single NUMA deployment method. For the scheduling node 705, it can also receive expansion requests, which indicate the addition of virtual gateway instances on at least two physical machines; further optionally, it can also include the number of new virtual gateway instances; when the target NUMA deployment method is a single NUMA deployment method, with the goal of distributing the existing virtual gateway instances and the new virtual gateway instances across at least two physical machines, new deployment description information is generated; this new deployment description information describes deploying the new virtual gateway instances on the idle NUMA nodes of the physical machine with the most idle NUMA nodes among the at least two physical machines; then, the new deployment description information is sent to the physical machine with the most idle NUMA nodes, so that the physical machine with the most idle NUMA nodes can deploy the new virtual gateway instances locally based on the image file corresponding to the new virtual gateway instances. The goal of distributing existing and newly added virtual gateway instances across at least two physical machines means that when the total number of existing and newly added virtual gateway instances is less than or equal to the number of physical machines, each virtual gateway instance is distributed across different physical machines; when the total number of existing and newly added virtual gateway instances exceeds the number of physical machines, at least one virtual gateway instance is deployed on each physical machine. This ensures that while distributing virtual gateway instances across different physical machines, some physical machines can be reused. Under this goal, when selecting physical machines for new virtual gateway instances, the principle of allocating the most idle resources can be followed. That is, the physical machine with the most idle NUMA nodes can be selected from the at least two physical machines, and the new virtual gateway instance can be deployed on the idle NUMA nodes of the selected physical machine. Of course, if there are multiple physical machines with the most idle NUMA nodes, the required number of physical machines can be randomly selected.

[0079] Referring to the example shown in Figure 7b, the above expansion process will be explained. Scheduling node 705 aims to distribute the two virtual gateway instances of gateway cluster 1 across the four physical machines of the gateway system, generating new deployment description information for any virtual gateway instance. When generating the new deployment description information, the virtual gateway instance is allocated to the physical machine according to the principle of allocating the least available resource. Based on the above embodiment where virtual gateway instances are deployed on each physical machine and are evenly distributed across them, two physical machines are randomly selected from the four physical machines as target physical machines. Figure 7b uses physical machines 701 and 702 as examples. Scheduling node 705 sends the target deployment description information to these two physical machines respectively, so that virtual gateway instance 15 and virtual gateway instance 16 are deployed on these two physical machines respectively. Virtual gateway instance 15 is deployed on an idle NUMA node (i.e., NUMA1) on physical machine 701; virtual gateway instance 16 is deployed on an idle NUMA node (i.e., NUMA1) on physical machine 702.

[0080] Based on the above embodiment, as shown in Figure 7c, the requesting party needs to further expand the gateway cluster 1 and upload deployment requirement information 3. This deployment requirement information 3 describes the need to expand two virtual gateway instances in gateway cluster 1 using a single NUMA deployment method. The scheduling node 705 aims to distribute the two virtual gateway instances of gateway cluster 1 across the four physical machines of the gateway system, generating new deployment description information for any virtual gateway instance. When generating the new deployment description information, physical machines 703 and 704 are selected as target physical machines from the four physical machines based on the principle of allocating the least available resources. The scheduling node 705 sends the target deployment description information to physical machines 703 and 704 respectively, so that these two physical machines can deploy virtual gateway instance 17 and virtual gateway instance 18 respectively. Virtual gateway instance 17 is deployed on an idle NUMA node (i.e., NUMA1) on physical machine 703; virtual gateway instance 18 is deployed on an idle NUMA node (i.e., NUMA1) on physical machine 704.

[0081] Further, as shown in Figure 7d, the requester requires the deployment of Gateway Cluster 2 and uploads deployment requirement information 4. This deployment requirement information 4 describes the four virtual gateway instances to be deployed in Gateway Cluster 2 and their deployment in a full NUMA configuration. Scheduling node 705 aims to distribute the four virtual gateway instances of Gateway Cluster 2 across the four physical machines of the gateway system, generating target deployment description information for each virtual gateway instance. When generating the target deployment description information, the virtual gateway instances are allocated to the physical machines based on the principle of allocating the least available resources. The four virtual gateway instances are evenly distributed across the four physical machines. Then, scheduling node 705 sends the target deployment description information to each physical machine. After receiving the target deployment description information, the physical machines of the gateway system deploy virtual gateway instances 21 through 24 in a full NUMA configuration.

[0082] In some embodiments, physical machines in the gateway system are interconnected with physical switches in the switch layer via physical network ports. The physical switch layer is responsible for data forwarding between physical machines and between physical machines and external networks (such as the Internet). The switch layer includes at least one physical switch; the physical network ports of at least two physical machines in the gateway system are interconnected with the physical network ports of at least one physical switch. Optionally, the physical network ports of at least two physical machines in the gateway system are interconnected with different physical switches. In some embodiments, any physical machine includes at least one Non-Unified Memory Access (NUMA) node, any NUMA node includes at least one physical network interface card (NIC), and any NIC includes at least one physical network port. Furthermore, the physical network ports on the same NUMA node are interconnected with physical network ports on different physical switches.

[0083] Based on this, in one optional embodiment, during the deployment of the gateway cluster, interconnection topology information between at least two physical machines and at least one physical switch can also be obtained. This interconnection topology information describes the connection relationships between each physical machine in the gateway system and each physical switch in the switch layer. Appropriate target physical machines can be selected to deploy virtual gateway instances based on the interconnection topology information. Further optionally, based on the interconnection topology information, with the goal of distributing multiple virtual gateway instances across at least two physical machines and maximizing the number of physical switches interconnected by the physical network ports mapped to the same virtual gateway instance, target deployment description information corresponding to any virtual gateway instance is generated.

[0084] In one optional embodiment, during the process of generating target deployment description information corresponding to any virtual gateway instance based on the interconnection topology information, the initial deployment description information corresponding to any virtual gateway instance is generated with the goal of distributing multiple virtual gateway instances across at least two physical machines; further, based on the interconnection topology information, the initial deployment description information is adjusted with the goal of maximizing the number of physical switches interconnected by the physical network ports mapped to the same virtual gateway instance, in order to obtain the target deployment description information.

[0085] For ease of understanding, the following embodiments will describe how to generate target deployment description information for any virtual gateway instance based on interconnection topology information.

[0086] Figure 8 is a schematic diagram of a gateway system provided in another exemplary embodiment of this disclosure. In this gateway system, any physical machine (such as physical machines 801-804) includes two NUMA nodes, each NUMA node includes two physical network cards, and each physical network card includes two physical network ports; any physical switch (such as physical switches 811-814) includes eight physical network ports; the physical machines are interconnected with the physical switches. Except for physical machine 801, all other physical machines are interconnected with the physical switches using a Full Mesh method. In physical machine 801, the NUM1 node has two physical network ports that are connected to physical switch 811.

[0087] In this embodiment, virtual gateway instances 13-18 of gateway cluster 1 are deployed on physical machines 802-804 respectively. Now, scheduling node 805 receives deployment request information to expand gateway cluster 1 by one instance, with the target deployment method being single NUMA deployment. The scheduling node 805 obtains the interconnection topology information of the aforementioned gateway system; with the goal of distributing multiple virtual gateway instances across physical machines 801-804, it generates initial deployment description information corresponding to any virtual gateway instance; this initial deployment description information describes the deployment of any virtual gateway instance onto physical machine 801, wherein the initial deployment description information is not limited to which NUMA node is deployed on physical machine 801; further, the scheduling node 805 adjusts the initial deployment description information based on the interconnection topology information, with the goal of maximizing the number of physical switches interconnected by the physical network interface mapped to the same virtual gateway instance, to obtain target deployment description information; wherein, as can be seen from the aforementioned interconnection topology information, the number of physical switches interconnected by the NUMA0 node is greater than the number interconnected by NUMA1, therefore the initial deployment description information is adjusted to obtain target deployment description information, which indicates that any virtual gateway instance is deployed onto the NUMA0 node of physical machine 801. Further, the scheduling node sends the target deployment description information to physical machine 801, so that physical machine 801 deploys virtual gateway instance 12 according to the target deployment description information.

[0088] The above embodiments describe how the scheduling node generates target deployment description information based on deployment requirement information and sends the target deployment description information to the target physical machine. Further, the following embodiments will describe how the physical machine deploys any virtual gateway instance based on the target deployment description information. In subsequent embodiments, some specific implementation details can be referred to the above embodiments, and will not be repeated hereafter.

[0089] Figure 9 is a flowchart illustrating a gateway cluster deployment method provided in an exemplary embodiment of this disclosure. The method is applied to a physical machine. As shown in the figure, the method includes: S901: receiving target deployment description information, which describes deploying any virtual gateway instance in the gateway cluster on the target physical machine; S902: deploying any virtual gateway instance on the target physical machine according to the image file corresponding to the virtual gateway instance; wherein, any virtual gateway instance includes a virtual network interface card (NIC), which is obtained by virtualizing the physical NIC on the target physical machine, and the virtual network port of the virtual NIC has a mapping relationship with the physical network port of the physical NIC.

[0090] In an optional embodiment, the method further includes: receiving the target NUMA deployment mode used by the gateway cluster, wherein the target NUMA deployment mode refers to the deployment mode of deploying a virtual gateway instance on K NUMA nodes, K = 2n, n is a natural number and satisfies 2n ≤ N, N is the total number of NUMA nodes included in any physical machine, and K and N are positive integers; deploying any virtual gateway instance on the target physical machine according to the image file corresponding to the virtual gateway instance, including: deploying any virtual gateway instance on the target physical machine according to the image file and the target NUMA deployment mode.

[0091] In one optional embodiment, any virtual gateway instance is implemented as a containerized gateway, which refers to a gateway application running in a container. Then, according to the image file and the target NUMA deployment method, deploying any virtual gateway instance on the target physical machine includes: deploying a container carrying the gateway application on the target physical machine according to the image file; virtualizing the physical network cards on K NUMA nodes on the target physical machine according to the target NUMA deployment method to obtain at least K virtual network cards; and allocating the at least K virtual network cards to the container to obtain the containerized gateway.

[0092] The above embodiments described how to deploy a gateway cluster. Further, the following embodiments will describe how the gateway cluster is used for data forwarding. In subsequent embodiments, some specific implementation details can be found in the above embodiments and will not be repeated hereafter.

[0093] Figure 10 is an interactive flowchart of data forwarding provided by an exemplary embodiment of this disclosure. As shown in Figure 10, data forwarding involves, but is not limited to, any physical switch, a physical machine interconnected with any physical switch, a virtual gateway instance, and an upper-layer application. The physical switch is only one example used to receive and send packets. In some embodiments, data forwarding may not involve a physical switch, but rather the virtual gateway instance on the physical machine may be responsible for receiving and sending external packets.

[0094] In this embodiment, data forwarding involves two directions; Direction 1: any physical switch → physical machine interconnected with any physical switch → any virtual gateway instance of the target gateway cluster → upper-layer application in the cloud network. The steps in Direction 1 are represented by solid lines in Figure 10; Direction 2: upper-layer application in the cloud network → any virtual gateway instance of the target gateway cluster → physical machine interconnected with any physical switch → any physical switch. The steps in Direction 2 are represented by dashed lines in Figure 10.

[0095] In direction 1 above, a physical machine interconnected with any physical switch receives a packet and the corresponding target network identifier on any physical network port. The target network identifier is used to identify the target user network corresponding to the packet. Based on the target network identifier, a target gateway cluster is determined from at least one gateway cluster, wherein different gateway clusters serve different user networks, and different user networks have different network identifiers. The packet is forwarded to the target virtual gateway instance in the target gateway cluster, so that the target virtual gateway instance can forward the packet to the upper-layer application in the cloud network to which the gateway system belongs. Here, the target virtual gateway instance refers to a virtual gateway instance whose virtual network port is mapped to any physical network port.

[0096] In one alternative embodiment, the target network identifier can be implemented as a VLAN (Virtual Local Area Network) ID (Identity document). Different gateway clusters have different VLAN IDs. Thus, when multiple gateway clusters are deployed on the same physical machine, the target gateway cluster can be determined based on the VLAN ID.

[0097] In this process, packets received by the physical switch from external sources may or may not contain a target network identifier. If the packet does not contain a target network identifier, the forwarding table is matched based on the packet's destination address; this forwarding table corresponds to the target network identifier. Further, the packet is forwarded to the target physical network port of the target physical machine according to the forwarding table. If the target physical network port is reused by multiple gateway clusters, the target gateway cluster is determined based on the target network identifier; the packet is then forwarded to the target virtual gateway instance within the target gateway cluster.

[0098] In direction 2 above, any virtual gateway instance receives packets sent by upper-layer applications in the cloud network to which the gateway system belongs. Different gateway clusters serve different user networks, and different user networks have different network identifiers. A target network identifier is added to the packet. The target network identifier is used to identify the target user network served by the target gateway cluster. Different gateway clusters serve different user networks, and different user networks have different network identifiers. Through the virtual network interface card contained in any virtual gateway instance, the packet is sent to the physical network interface card on any physical machine corresponding to the virtual network interface card, so that the physical network interface card sends out the packet.

[0099] In this embodiment, the physical switch identifies the corresponding forwarding table based on the target network identifier; and forwards the packet according to the routing information in the forwarding table.

[0100] The detailed implementation methods and beneficial effects of each step in this embodiment have been described in detail in the foregoing embodiments, and will not be elaborated here.

[0101] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 601 to 603 can be device A; or the execution subject of steps 601 and 602 can be device A, and the execution subject of step 603 can be device B; and so on.

[0102] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 601, 602, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.

[0103] Figure 11 is a schematic diagram of the structure of an electronic device provided in another exemplary embodiment of this disclosure. As shown in Figure 11, the electronic device includes the following.

[0104] Memory 114 is used to store computer programs and can be configured to store various other data to support operation on the computing platform. Examples of this data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc.

[0105] The memory 114 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0106] Processor 115, coupled to memory 114, is used to execute a computer program in memory 114 for: acquiring deployment requirement information of a gateway cluster, the deployment requirement information describing the deployment of multiple virtual gateway instances included in the gateway cluster on at least two physical machines; generating target deployment description information corresponding to any virtual gateway instance with the goal of distributing the multiple virtual gateway instances across the at least two physical machines, the target deployment description information describing the deployment of the any virtual gateway instance on a target physical machine; sending the target deployment description information to the target physical machine so that the target physical machine deploys the any virtual gateway instance locally based on the image file corresponding to the virtual gateway instance; wherein, any virtual gateway instance includes a virtual network interface card (NIC), the virtual NIC being obtained by virtualizing the physical NIC on the target physical machine, and the virtual network port of the virtual NIC having a mapping relationship with the physical network port of the physical NIC; wherein, the distributed deployment refers to using the virtual gateway instance as a load on the physical machines, prioritizing the deployment of the virtual gateway instance on physical machines with loads meeting set requirements (e.g., the lightest or lightest).

[0107] In an optional embodiment, the physical network ports of the at least two physical machines are interconnected with the physical network ports of at least one physical switch. Preferably, the physical network ports of the at least two physical machines and the physical network ports of the at least one physical switch are interconnected through a full mesh topology. Based on this, the method further includes: obtaining interconnection topology information between the at least two physical machines and the at least one physical switch; when the processor 115 generates target deployment description information corresponding to any virtual gateway instance with the goal of distributing the multiple virtual gateway instances across the at least two physical machines, specifically it is used to: based on the interconnection topology information, with the goal of distributing the multiple virtual gateway instances across the at least two physical machines, and ensuring that the physical network ports mapped to the same virtual gateway instance are interconnected with physical network ports on different physical switches, generate target deployment description information corresponding to any virtual gateway instance.

[0108] In an optional embodiment, any physical machine includes at least one non-uniform memory access NUMA node, any NUMA node includes at least one physical network card, and any physical network card includes at least one physical network port, and the physical network ports on the same NUMA node are interconnected with physical network ports on different physical switches.

[0109] In an optional embodiment, the deployment requirement information includes the target NUMA deployment method used by the gateway cluster. The target NUMA deployment method refers to a deployment method that covers K NUMA nodes, where K = 2n, n is a natural number and satisfies 2n ≤ N, N is the total number of NUMA nodes included in any physical machine, and K and N are positive integers. The processor 115 is further configured to: send the target NUMA deployment method to the target physical machine, so that the target physical machine can deploy any virtual gateway instance locally according to the image file and the target NUMA deployment method.

[0110] In one alternative embodiment, N = 2, n = 0, K = 1 or n = 1, K = 2; or, N = 4, n = 0, K = 1, or n = 1, K = 2, or n = 2, K = 4.

[0111] In an optional embodiment, when the processor 115 generates target deployment description information corresponding to any virtual gateway instance based on the interconnection topology information with the goal of distributing the plurality of virtual gateway instances across the at least two physical machines and interconnecting the physical network ports mapped to the same virtual gateway instance with physical network ports on different physical switches, the processor 115 is specifically configured to: generate initial deployment description information corresponding to any virtual gateway instance with the goal of distributing the plurality of virtual gateway instances across the at least two physical machines; and adjust the initial deployment description information based on the interconnection topology information with the goal of interconnecting the physical network ports mapped to the same virtual gateway instance with physical network ports on different physical switches to obtain the target deployment description information.

[0112] In an optional embodiment, the processor 115 is further configured to: receive a scaling request, the scaling request indicating the addition of a virtual gateway instance on the at least two physical machines; if the target NUMA deployment mode is a single NUMA deployment mode, generate new deployment description information with the goal of distributing the existing virtual gateway instance and the newly added virtual gateway instance across the at least two physical machines; the new deployment description information describes that the newly added virtual gateway instance is deployed on an idle NUMA node of the physical machine with the most idle NUMA nodes among the at least two physical machines; and send the new deployment description information to the physical machine with the most idle NUMA nodes, so that the physical machine with the most idle NUMA nodes can deploy the newly added virtual gateway instance locally based on the image file corresponding to the newly added virtual gateway instance.

[0113] Furthermore, as shown in Figure 11, the electronic device also includes other components such as a communication component 116, a display 117, a power supply component 118, and an audio component 119. Figure 11 only schematically shows some components and does not imply that the electronic device only includes the components shown in Figure 11. Additionally, the components within the dashed boxes in Figure 11 are optional, not mandatory, and their specific inclusion depends on the product form of the working node. The electronic device of this embodiment can be implemented as a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or as a server-side device such as a conventional server, cloud server, or server array. If the electronic device of this embodiment is implemented as a terminal device such as a desktop computer, laptop computer, or smartphone, it may include the components within the dashed boxes in Figure 11; if the electronic device of this embodiment is implemented as a server-side device such as a conventional server, cloud server, or server array, it may not include the components within the dashed boxes in Figure 11.

[0114] This disclosure also provides an electronic device whose implementation structure is the same as or similar to that of the electronic device shown in FIG11, and can be implemented with reference to the structure of the electronic device shown in FIG11. The main difference between the electronic device provided in this embodiment and the electronic device in the embodiment shown in FIG11 is that the functions implemented by the processor in the electronic device executing the computer program stored in the memory are different. For the electronic device provided in this embodiment, the processor executing the computer program stored in the memory can be used to: receive target deployment description information, the target deployment description information being used to describe the deployment of any virtual gateway instance in the gateway cluster on the target physical machine; deploy the any virtual gateway instance on the target physical machine according to the image file corresponding to the virtual gateway instance; wherein, the any virtual gateway instance includes a virtual network card, the virtual network card being obtained by virtualizing the physical network card on the target physical machine, and the virtual network port of the virtual network card having a mapping relationship with the physical network port of the physical network card.

[0115] In an optional embodiment, the processor is further configured to: receive the target NUMA deployment method used by the gateway cluster, wherein the target NUMA deployment method refers to a deployment method covering K NUMA nodes, K = 2n, n is a natural number and satisfies 2n ≤ N, N is the total number of NUMA nodes included in any physical machine, and K and N are positive integers; and deploy any virtual gateway instance on the target physical machine according to the image file corresponding to the virtual gateway instance, including: deploying any virtual gateway instance on the target physical machine according to the image file and the target NUMA deployment method.

[0116] In one optional embodiment, any virtual gateway instance is implemented as a containerized gateway, which refers to a gateway application running in a container; when the processor deploys any virtual gateway instance on the target physical machine according to the image file and the target NUMA deployment method, it is specifically used to: deploy a container carrying the gateway application on the target physical machine according to the image file; virtualize the physical network cards on K NUMA nodes on the target physical machine according to the target NUMA deployment method to obtain at least K virtual network cards; and allocate the at least K virtual network cards to the container to obtain the containerized gateway.

[0117] This disclosure also provides an electronic device that can serve as a physical implementation in a gateway system. This physical machine has at least one virtual gateway instance deployed in a gateway cluster. The implementation structure of this electronic device is the same as or similar to that of the electronic device shown in Figure 11, and can be implemented with reference to the structure of the electronic device shown in Figure 11. The main difference between the electronic device provided in this embodiment and the electronic device in the embodiment shown in Figure 11 is that the functions implemented by the processor executing the computer program stored in the memory are different. For the electronic device provided in this embodiment, the processor executing the computer program stored in the memory can be used to: receive a packet and a target network identifier corresponding to the packet on any physical network port of the physical machine, the target network identifier being used to identify the target user network corresponding to the packet; determine a target gateway cluster from the at least one gateway cluster based on the target network identifier, wherein different gateway clusters serve different user networks, and different user networks have different network identifiers; forward the packet to a target virtual gateway instance in the target gateway cluster, so that the target virtual gateway instance can forward the packet to an upper-layer application in the cloud network to which the gateway system belongs; wherein the target virtual gateway instance refers to a virtual gateway instance whose virtual network port is mapped to any physical network port.

[0118] This disclosure also provides an electronic device that can be implemented as any physical machine in a gateway system. The physical machine deploys a virtual gateway instance, and the virtual gateway instance belongs to a target gateway cluster. The implementation structure of this electronic device is the same as or similar to that of the electronic device shown in Figure 11, and can be implemented with reference to the structure of the electronic device shown in Figure 11. The main difference between the electronic device provided in this embodiment and the electronic device in the embodiment shown in Figure 11 is that the functions implemented by the processor executing the computer program stored in the memory are different. For the electronic device provided in this embodiment, the processor executing the computer program stored in the memory can be used to: receive messages sent by upper-layer applications in the cloud network to which the gateway system belongs; different gateway clusters serve different user networks, and different user networks have different network identifiers; add a target network identifier to the message, the target network identifier being used to identify the target user network served by the target gateway cluster, wherein different gateway clusters serve different user networks, and different user networks have different network identifiers; and send the message to the physical network card corresponding to the virtual network card on the physical machine through the virtual network card included in any virtual gateway instance, so that the physical network card sends the message out.

[0119] Accordingly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the methods described above.

[0120] This disclosure also provides a computer program product, which includes a computer program / instructions that, when executed by a processor, enable the processor to perform the steps described in the method embodiments above.

[0121] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0122] The aforementioned communication components are configured to facilitate wired or wireless communication between the device containing the communication components and other devices. The device containing the communication components can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication components receive broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication components also include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.

[0123] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.

[0124] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.

[0125] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0126] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code.

[0127] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.

[0128] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0129] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0130] In a typical configuration, a computing device includes one or more processors (Central Processing Units, CPUs), input / output interfaces, network interfaces, and memory.

[0131] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0132] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0133] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0134] The above are merely embodiments of this disclosure and are not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.

Claims

1. A gateway system comprising: At least two physical machines and at least one gateway cluster, the gateway cluster comprising a plurality of virtual gateway instances, the number of the virtual gateway instances being dynamically changeable, and the plurality of virtual gateway instances being distributed deployed on the at least two physical machines; wherein the distributed deployment refers to taking the virtual gateway instances as loads of the physical machines, and preferentially deploying the virtual gateway instances on the physical machines with loads meeting set requirements; The virtual gateway instance comprises a virtual network card, the virtual network card being obtained by virtualizing a physical network card on a physical machine where the virtual gateway instance is located, and a virtual network port of the virtual network card and a physical network port of the physical network card having a mapping relationship.

2. The gateway system of claim 1, wherein, The physical machine comprises at least one non-uniform memory access (NUMA) node, and the distributed deployment refers to taking deployment of one virtual gateway instance on K NUMA nodes as granularity, and preferentially deploying the virtual gateway instance on the physical machine with the lightest load; wherein K = 2n, n is a natural number and satisfies 2n ≤ N, and N is the total number of NUMA nodes included in the physical machine.

3. The gateway system of claim 2, wherein, In the same gateway cluster, n has the same value.

4. The gateway system of claim 2, wherein, In the case of N = 2, n = 0, K = 1, or n = 1, K = 2; in the case of N = 4, n = 0, K = 1, or n = 1, K = 2, or n = 2, K = 4.

5. The gateway system of any one of claims 2-4, wherein, The physical network ports of the at least two physical machines and the physical network ports of at least one physical switch are interconnected through a full-mesh topology; wherein the NUMA node comprises at least one physical network card, and the physical network card comprises at least one physical network port, and the physical network ports on the same NUMA node are respectively interconnected with the physical network ports on different physical switches.

6. The gateway system of any one of claims 1-5, wherein, The virtual gateway instance is implemented as a containerized gateway, and the containerized gateway refers to a gateway application running in a container.

7. A gateway cluster comprising: At least two physical machines and a plurality of virtual gateway instances, the number of the virtual gateway instances being dynamically changeable, and the plurality of virtual gateway instances being distributed deployed on the at least two physical machines; wherein the distributed deployment refers to taking the virtual gateway instances as loads of the physical machines, and preferentially deploying the virtual gateway instances on the physical machines with loads meeting set requirements; The virtual gateway instance comprises a virtual network card, the virtual network card being obtained by virtualizing a physical network card on a physical machine where the virtual gateway instance is located, and a virtual network port of the virtual network card and a physical network port of the physical network card having a mapping relationship.

8. A gateway cluster deployment method, comprising: obtaining deployment requirement information of a gateway cluster, the deployment requirement information being used to describe deployment of a plurality of virtual gateway instances included in the gateway cluster on at least two physical machines; generating target deployment description information corresponding to the virtual gateway instances, taking distributed deployment of the virtual gateway instances on the at least two physical machines as a target, the target deployment description information being used to describe deployment of the virtual gateway instances on target physical machines in the at least two physical machines; sending the target deployment description information to the target physical machine, so that the target physical machine locally deploys the virtual gateway instance according to an image file corresponding to the virtual gateway instance; The virtual gateway instance comprises a virtual network card, the virtual network card is obtained by virtualizing a physical network card on the target physical machine, and a virtual network port of the virtual network card has a mapping relationship with a physical network port of the physical network card. The virtual gateway instance is preferentially deployed on a physical machine with a load meeting a set requirement.

9. The method of claim 8, wherein, The physical network ports of the at least two physical machines and the physical network ports of the at least one physical switch are connected through a full-mesh topology, and the method further comprises: obtaining interconnection topology information between the at least two physical machines and the at least one physical switch; The target deployment description information corresponding to the virtual gateway instance is generated, including: The target deployment description information corresponding to the virtual gateway instance is generated according to the interconnection topology information, so that the plurality of virtual gateway instances are dispersedly deployed on the at least two physical machines, and a physical network port to which a same virtual gateway instance is mapped and a physical network port on a different physical switch are interconnected.

10. The method of claim 9, wherein, The physical machine comprises at least one non-uniform memory access (NUMA) node, and the dispersed deployment means preferentially deploying a virtual gateway instance on a physical machine with the lightest load, with K=2n, and n being a natural number and satisfying 2n≤N, where N is the total number of NUMA nodes included in the physical machine.

11. The method of claim 10, wherein, The deployment requirement information comprises a target NUMA deployment mode used by the gateway cluster, and the target NUMA deployment mode means a deployment mode of deploying one virtual gateway instance on K NUMA nodes. The method further comprises: sending the target NUMA deployment mode to the target physical machine, so that the target physical machine locally deploys the virtual gateway instance according to the image file and the target NUMA deployment mode.

12. The method of claim 11, further comprising: receiving an expansion request, the expansion request indicating that a new virtual gateway instance is added on the at least two physical machines; In a case where the target NUMA deployment mode is a single- NUMA deployment mode, new deployment description information is generated for the purpose of dispersively deploying the existing virtual gateway instance and the new virtual gateway instance on the at least two physical machines; the new deployment description information is used to describe that the new virtual gateway instance is deployed on an idle NUMA node of a physical machine with the largest number of idle NUMA nodes; and the single- NUMA deployment mode means a deployment mode of K=1. sending the new deployment description information to the physical machine with the largest number of idle NUMA nodes, so that the physical machine with the largest number of idle NUMA nodes deploys the new virtual gateway instance locally according to an image file corresponding to the new virtual gateway instance.

13. A gateway cluster deployment method, comprising: receiving target deployment description information, the target deployment description information being used to describe deployment of any virtual gateway instance in a gateway cluster on a target physical machine; deploying the virtual gateway instance on the target physical machine according to an image file corresponding to the virtual gateway instance; wherein the virtual gateway instance comprises a virtual network card, the virtual network card being obtained by virtualizing a physical network card on the target physical machine, and a virtual network port of the virtual network card has a mapping relationship with a physical network port of the physical network card.

14. The method of claim 13, further comprising: receiving a target NUMA deployment mode used by the gateway cluster, the target NUMA deployment mode being a deployment mode in which one virtual gateway instance is deployed on K NUMA nodes, K = 2n, n being a natural number and satisfying 2n ≤ N, N being a total number of NUMA nodes included in the physical machine; deploying the virtual gateway instance on the target physical machine according to the image file, comprising: deploying the virtual gateway instance on the target physical machine according to the image file and the target NUMA deployment mode.

15. The method of claim 14, wherein, the virtual gateway instance is implemented as a containerized gateway, the containerized gateway being a gateway application running in a container; deploying the virtual gateway instance on the target physical machine according to the image file and the target NUMA deployment mode, comprising: deploying a container carrying the gateway application on the target physical machine according to the image file; performing virtualization processing on physical network cards on the K NUMA nodes of the target physical machine according to the target NUMA deployment mode, to obtain at least K virtual network cards; allocating the at least K virtual network cards to the container to obtain the containerized gateway.

16. A data forwarding method applied to a physical machine in a gateway system, the physical machine having a virtual gateway instance in at least one gateway cluster deployed thereon, the method comprising: receiving a packet and a target network identifier corresponding to the packet on any physical network port of the physical machine, the target network identifier being used to identify a target user network corresponding to the packet; determining a target gateway cluster from the at least one gateway cluster according to the target network identifier, wherein different gateway clusters serve different user networks, and different user networks have different network identifiers; forwarding the packet to a target virtual gateway instance in the target gateway cluster, so that the target virtual gateway instance forwards the packet to an upper-layer application in a cloud network to which the gateway system belongs; wherein the target virtual gateway instance is a virtual gateway instance whose virtual network port is mapped to the physical network port.

17. A data forwarding method applied to a virtual gateway instance deployed on a physical machine in a gateway system, the virtual gateway instance belonging to a target gateway cluster, the method comprising: receiving a packet sent by an upper-layer application in a cloud network to which the gateway system belongs, different gateway clusters serving different user networks, and different user networks having different network identifiers; adding a target network identifier to the packet, the target network identifier being used to identify a target user network served by the target gateway cluster, wherein different gateway clusters serve different user networks, and different user networks have different network identifiers; sending the packet to a physical network card corresponding to a virtual network card included in the virtual gateway instance through the virtual network card, so that the physical network card sends the packet out.

18. An electronic device, comprising: a memory and a processor; the memory is configured to store a computer program, and the processor is coupled to the memory and configured to execute the computer program in the memory to implement the steps in the method of any one of claims 8-12, 13-15, 16, and 17.

19. A computer readable storage medium storing computer programs / instructions, wherein, The computer program, when executed by the processor, causes the processor to be able to implement the steps in the method of any one of claims 8-12, 13-15, 16, and 17.

20. A computer program product, comprising: The computer program / instructions, when executed by the processor, cause the processor to be able to implement the steps in the method of any one of claims 8-12, 13-15, 16, and 17.

Citation Information

Patent Citations

  • A method and a device for testing the virtualization characteristics of a network card

    CN108989145A

  • Virtual machine deployment method and device

    CN110795204A

  • Public cloud container instance creation method

    CN114422350A

  • Network function virtualization method and device of server and storage medium

    CN115695170A

  • Virtual network card management method based on KVM

    JP2020191068A