Business processing method and device, computer equipment and storage medium
By introducing a main and standby network element cluster into the tenant gateway and using the standby network element to load balancing allocation when the main network element fails, the server overload problem caused by network element exceptions in traditional technology is solved, and the system stability and concurrent processing capabilities are improved.
Patent Information
- Application Number
- CN202411789472.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-07
AI Technical Summary
When the network element abnormality occurs, traditional traffic load balancing technology may cause the server to run overload and the system stability is low.
By introducing multiple network element clusters into the tenant gateway, each network element cluster contains the main network element and the backup network element, and allocating service requests to the target network element cluster, so that the backup network element is allocated to the server according to the load balancing policy when the main network element fails.
It effectively avoids server overload, improves system stability, and improves the concurrent processing capability of business requests.
Smart Images

Figure CN119583551A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a business processing method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of social economy, cloud computing technology is also developing continuously. Traffic load balancing is a key technology in the field of cloud computing technology.
[0003] In the traditional way, the gateway receives massive business requests from different users. The gateway sends the business requests to different servers through the corresponding network elements to achieve load balancing of each server. When the network element fails, the server may be overloaded and the system stability is low. Summary of the invention
[0004] Based on this, it is necessary to provide a business processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve system stability in response to the above technical problems.
[0005] In the first aspect, the present application provides a service processing method. Applied to a tenant gateway, the tenant gateway is connected to multiple network element clusters; each of the network element clusters includes a main network element and at least one backup network element, and the network element cluster is connected to a corresponding server cluster; the server cluster includes multiple servers; the method includes: obtaining service requests sent by multiple tenants respectively, for each of the service requests, determining a target network element cluster that matches the request address of the service request from each of the network element clusters; allocating the service request to the target network element cluster, so that the backup network element in the target network element cluster, when the main network element in the target network element cluster fails, distributes the received service requests to each server in the server cluster connected to the target network element cluster in a balanced manner according to the set load balancing strategy.
[0006] In one of the embodiments, for each of the service requests, determining a target network element cluster that matches the request address of the service request from each of the network element clusters, includes: configuring corresponding address ranges for multiple network element clusters respectively; for each of the service requests, determining a target range that includes the request address of the service request from each of the address ranges; and determining the network element cluster to which the target range belongs as the target network element cluster that matches the service request.
[0007] In one of the embodiments, configuring corresponding address ranges for multiple network element clusters respectively includes: obtaining an address configuration message; the address configuration message includes an address configuration field; for each of the network element clusters, updating the field value corresponding to the address configuration field respectively, and configuring the corresponding address range for the network element cluster.
[0008] In one of the embodiments, the target network element cluster includes multiple backup network elements; the method also includes: when a main network element in the target network element cluster fails, obtaining the status of each of the backup network elements; and determining the target network element for allocating service requests from the backup network elements in idle state.
[0009] On the second aspect, the present application also provides a business processing architecture, including a tenant gateway, multiple network element clusters and multiple server clusters, each of the network element clusters including a main network element and at least one backup network element, and the network element cluster is connected to a corresponding server cluster; the server cluster includes multiple servers; the tenant gateway is used to obtain business requests sent by multiple tenants respectively, and for each of the business requests, allocate the business request to a target network element cluster that matches the request address of the business request; the target network element cluster is one of the network element clusters; for each network element cluster, the backup network element in the network element cluster is used to, in the event of a failure of the main network element in the network element cluster, distribute the received business requests evenly to the servers in the server cluster to which the network element cluster is connected according to the set load balancing strategy; each server in the server cluster is used to process the allocated business requests.
[0010] In one of the embodiments, the network element cluster includes a first host machine and a second host machine; the primary network element is configured in the first host machine in the form of a virtual machine; and the backup network element is configured in the second host machine in the form of a virtual machine.
[0011] In a third aspect, the present application also provides a service processing device. Applied to a tenant gateway, the tenant gateway is connected to multiple network element clusters; each of the network element clusters includes a primary network element and at least one backup network element, and the network element clusters are connected to a corresponding server cluster; the server cluster includes multiple servers; the device includes:
[0012] An acquisition module is used to acquire business requests sent by multiple tenants respectively; a cluster determination module is used to determine, for each business request, a target network element cluster that matches the request address of the business request from each network element cluster; a load balancing module is used to distribute the business request to the target network element cluster, so that the backup network element in the target network element cluster can distribute the received business requests evenly to each server in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails.
[0013] In a fourth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0014] Obtain service requests respectively sent by multiple tenants, and for each service request, determine a target network element cluster that matches the request address of the service request from each network element cluster; distribute the service request to the target network element cluster, so that the backup network element in the target network element cluster can distribute the received service requests evenly to each server in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails.
[0015] In a fifth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0016] Obtain service requests respectively sent by multiple tenants, and for each service request, determine a target network element cluster that matches the request address of the service request from each network element cluster; distribute the service request to the target network element cluster, so that the backup network element in the target network element cluster can distribute the received service requests evenly to each server in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails.
[0017] In a sixth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0018] Obtain service requests respectively sent by multiple tenants, and for each service request, determine a target network element cluster that matches the request address of the service request from each network element cluster; distribute the service request to the target network element cluster, so that the backup network element in the target network element cluster can distribute the received service requests evenly to each server in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails.
[0019] According to the above-mentioned business processing method, apparatus, computer equipment, storage medium and computer program product, the tenant gateway obtains business requests sent by multiple tenants respectively. For each business request, the tenant gateway determines the target network element cluster that matches the request address of the business request from each network element cluster, and distributes the business request to the target network element cluster, so that the backup network elements in the target network element cluster can distribute the received business requests evenly to the servers in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails. With the above-mentioned method, on the one hand, since there are main network elements and backup network elements in the target network element cluster, when the main network element in the target network element cluster fails, the backup network element can still send the business request to the server normally, thereby avoiding server overload and improving system stability. On the other hand, the tenant gateway is connected to multiple network element clusters, each of which includes a primary network element and at least one backup network element, and the network element cluster is connected to the corresponding server cluster, which includes multiple servers. Since the tenant gateway is connected to multiple network element clusters, each network element cluster can process business requests corresponding to multiple request addresses, providing a basis for increasing the concurrency of business requests and further improving system stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 An application environment diagram of a business processing method in an embodiment;
[0021] Figure 2 A flowchart of a business processing method in an embodiment;
[0022] Figure 3 A business processing architecture in one embodiment;
[0023] Figure 4 A schematic diagram of a process of a method for horizontal capacity expansion of active-standby load balancing in a cloud network in one embodiment;
[0024] Figure 5 A diagram of a network element communication architecture for horizontal expansion of multiple pairs of load balancing network elements in one embodiment;
[0025] Figure 6is a structural block diagram of a service processing device in an embodiment;
[0026] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0028] The service processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The tenant gateway 102 is connected to the network element cluster 104 through the network, and the network element cluster 104 is connected to the server cluster 106 through the network. The tenant gateway 102 is connected to multiple network element clusters 104; each network element cluster 104 includes a main network element and at least one backup network element, and the network element cluster 104 is connected to the corresponding server cluster 106; the server cluster 106 includes multiple servers;
[0029] Among them, the tenant gateway 102 can obtain service requests sent by multiple tenants respectively. For each service request, the tenant gateway 102 can determine the target network element cluster that matches the request address of the service request from each network element cluster 104. The tenant gateway 102 can distribute the service request to the target network element cluster, so that the backup network element in the target network element cluster, when the main network element in the target network element cluster fails, will distribute the received service requests to each server in the server cluster 106 connected to the target network element cluster in a balanced manner according to the set load balancing strategy.
[0030] Among them, the tenant gateway 102 can be a hardware device or a software program, which is usually located between two or more different networks and acts as a bridge for data packets to be transmitted between different networks. The network element cluster 104 can be a network component including physical machines and virtual machines. The main network element can be a component including a main host machine and a main virtual machine, and the backup network element can be a component including a backup host machine and a backup virtual machine. The server cluster 106 can be a cluster consisting of multiple servers.
[0031] In one embodiment, Figure 2 As shown, a business processing method is provided, which is applied to Figure 1 The following is an example of the tenant gateway in the example, including:
[0032] S202: Obtain service requests respectively sent by multiple tenants.
[0033] The tenant may be a user participating in a cloud computing scenario. For example, the cloud computing scenario may be a public cloud scenario or a private cloud scenario, and the tenant may be a user of a public cloud or a user of a private cloud. The tenant may specifically be a terminal held by a user participating in the cloud computing scenario.
[0034] A business request may be a request initiated by a tenant. Specifically, a business request may be a certain demand or service request made by a customer or system to an enterprise or service provider. For example, a terminal corresponding to a tenant sends a query request for a certain business to a tenant gateway.
[0035] A tenant can send at least one business request. Business requests are usually high-concurrency requests.
[0036] Specifically, the tenant gateway can obtain service requests sent by multiple tenants respectively.
[0037] Among them, the tenant gateway can be a network device or service used to manage and isolate traffic of different tenants in a multi-tenant environment. The tenant gateway can be a hardware concept or a software concept. For example, the tenant gateway can be a router with high-concurrency business request distribution function. The tenant gateway is usually used to implement functions such as resource isolation, security management, and traffic routing in a multi-tenant environment.
[0038] In one embodiment, the tenant gateway may actively poll the tenant devices of each tenant to obtain the service requests corresponding to the multiple tenants. The tenant gateway may also passively receive the service requests sent by the multiple tenants.
[0039] S204: For each service request, determine a target network element cluster that matches the request address of the service request from each network element cluster.
[0040] The network element cluster may be a cluster composed of multiple network elements. The network element cluster may accurately forward the service request. It is understandable that the tenant gateway may preliminarily classify each service request, and then the network element cluster may accurately forward the service request.
[0041] The network element cluster may be a cluster of active and standby network elements. Specifically, one network element in each network element is a primary network element and the other network elements are standby network elements. The standby network elements work when the primary network element fails, and the standby network elements may be in an idle state when the primary network element is normal.
[0042] The request address may be a virtual address included in the service request. The virtual address may be used to indicate a target network element cluster corresponding to the service request.
[0043] The target network element cluster may be a network element cluster used to process the service request corresponding to the request address.
[0044] Specifically, the tenant gateway may determine, for each service request, from each network element cluster, a target network element cluster that matches the request address of the service request.
[0045] In one embodiment, the tenant gateway may obtain the preset addresses configured for each network element cluster. The tenant gateway may filter the target address that matches the request address of the service request from the preset addresses. The tenant gateway may determine the network element cluster corresponding to the target address as the target network element cluster.
[0046] In one embodiment, the tenant gateway may also obtain the address type of the request address of the service request. The address type may be a Mac address type, a virtual address type, or other address types. The tenant gateway may determine a target network element cluster that matches the address type of the request address of the service request from each network element cluster.
[0047] The relationship between the tenant gateway and the network element cluster may be that the tenant gateway is connected to multiple network element clusters. Since the tenant gateway is connected to multiple network element clusters, each network element cluster can process service requests corresponding to multiple request addresses, providing a basis for increasing the concurrency of service requests and further improving system stability.
[0048] S206, distributes the service requests to the target network element cluster so that the backup network elements in the target network element cluster can distribute the received service requests evenly to the servers in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails.
[0049] The standby network element may be a specific network element in a network element cluster. The network element cluster includes at least one standby network element and one main network element. When the main network element fails, in order to process the service request in time, the standby network element may replace the main network element to receive and process the service request.
[0050] There are many reasons for the failure of the primary network element. For example, network connection problems, hardware failures, configuration errors, resource limitations, and other issues may cause the failure of the primary network element. Network connection problems: The interruption of the network connection between the primary and backup devices may cause the failure of the primary network element. For example, physical link failures, network configuration errors, or security group policy issues may cause such problems. Hardware failure: Hardware failures of the primary network element, such as optical module or line failures, may also cause the failure of the primary network element. Configuration errors: Configuration errors of the load balancer may cause the primary network element to fail to work properly. Resource limitations: The primary network element may not be able to process requests normally due to resource limitations such as insufficient bandwidth and insufficient memory.
[0051] Load balancing strategy refers to the strategy of evenly distributing business requests or loads to multiple servers. The purpose of load balancing strategy is to improve the performance and stability of the system. Load balancing strategies can include polling, weighted polling, minimum number of connections, fastest response time, IP hash, minimum bandwidth, random strategy, dynamic weight adjustment, etc.
[0052] Specifically, the tenant gateway can distribute service requests to the target network element cluster so that the backup network elements in the target network element cluster can distribute the received service requests evenly to the servers in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails.
[0053] In one embodiment, the tenant gateway can determine a target network element from the backup network elements when a main network element in the target network element cluster fails. The target network element is used to evenly distribute the received service requests to the servers in the server cluster connected to the target network element cluster according to the set load balancing strategy.
[0054] In one embodiment, the tenant network element may determine the best performing backup network element as the target network element. The tenant network element may also obtain the status of each backup network element when the primary network element in the target network element cluster fails. The tenant gateway may determine the target network element for allocating the service request from the idle backup network elements.
[0055] In the above service processing method, the tenant gateway obtains service requests sent by multiple tenants respectively. For each service request, the tenant gateway determines the target network element cluster that matches the request address of the service request from each network element cluster, and distributes the service request to the target network element cluster, so that the backup network element in the target network element cluster, when the main network element in the target network element cluster fails, distributes the received service requests to each server in the server cluster connected to the target network element cluster according to the set load balancing strategy. With the above method, on the one hand, since there are main network elements and backup network elements in the target network element cluster, when the main network element in the target network element cluster fails, the backup network element can still send service requests to the server normally, thereby avoiding the overload of the server and improving the system stability. On the other hand, the tenant gateway is connected to multiple network element clusters, each network element cluster includes a main network element and at least one backup network element, and the network element cluster is connected to the corresponding server cluster, and the server cluster includes multiple servers. Since the tenant gateway is connected to multiple network element clusters, each network element cluster can process service requests corresponding to multiple request addresses, providing a basis for increasing the concurrency of service requests and further improving the system stability.
[0056] In one embodiment, for each service request, a target network element cluster that matches the request address of the service request is determined from each network element cluster, including: configuring corresponding address ranges for multiple network element clusters respectively, and for each service request, determining a target range that includes the request address of the service request from each address range, and determining the network element cluster to which the target range belongs as the target network element cluster that matches the service request.
[0057] The address range may be a pre-configured address field range for the network element cluster, for example, the IP address is 192.0.0.0-192.0.0.9.
[0058] The target range may be an address range including the request address. The request address may be a virtual address (Virtual IP Address, VIP) included in the service request. The virtual address may be used to indicate the target network element cluster corresponding to the service request.
[0059] Specifically, the tenant gateway may divide the address into multiple preset ranges in sequence according to the size of the address. The tenant gateway may determine each preset range as the address range of each network element cluster.
[0060] Specifically, the tenant gateway may also obtain the historical request addresses in the historical requests. The tenant gateway may determine the common address range in each historical request address. The tenant gateway divides the common address range to obtain multiple preset ranges. The tenant gateway may determine each preset range as the address range of each network element cluster.
[0061] In this embodiment, corresponding address ranges are configured for multiple network element clusters respectively. For each service request, a target range containing the request address of the service request is determined from each address range, and the network element cluster to which the target range belongs is determined as the target network element cluster that matches the service request. Since the tenant gateway is connected to multiple network element clusters, each network element cluster can forward each service request to a different network element cluster, which provides a basis for increasing the concurrency of service requests and further improves system stability.
[0062] In one embodiment, corresponding address ranges are configured for multiple network element clusters respectively, including: obtaining an address configuration message, updating a field value corresponding to an address configuration field for each network element cluster respectively, and configuring a corresponding address range for the network element cluster.
[0063] The address configuration message may be a message used for address allocation and configuration between network devices. In different network protocols, these messages have different names and functions.
[0064] The address configuration message may include an address configuration field.
[0065] The address configuration field may be a field in the code corresponding to the network element cluster that needs to be configured with an address. In the traditional method, the code needs to be modified to complete the addition of the address range.
[0066] The field value can be a specific value in the address configuration field, for example, the IP address 192.0.0.0-192.0.0.9.
[0067] Specifically, the tenant gateway can replace the corresponding initial field value in the network element cluster according to the field value in the address configuration field to obtain the address range corresponding to the network element cluster configuration. This method does not require modification of the code. It only replaces the initial field value with the field value in the address configuration message to complete the addition of the address range.
[0068] In one embodiment, the tenant gateway may obtain an address configuration message in response to a new operation on a network element cluster. The tenant gateway may update a field value corresponding to the address configuration field for each network element cluster, and configure a corresponding address range for the network element cluster.
[0069] In one of the embodiments, the tenant gateway may obtain a communication channel configuration message in response to a new operation on a network element cluster, and the communication channel configuration message may include a channel configuration file. The tenant gateway may configure the communication channel between itself and the newly added network element cluster according to the channel configuration file. Among them, the communication channel may be a VXLAN tunnel. A VXLAN tunnel is a network virtualization method based on tunnel technology, which is used to transmit encapsulated Layer 2 Ethernet frames on a Layer 3 IP network. Specifically, a VXLAN tunnel is a point-to-point logical connection between two VTEPs (virtual tunnel endpoints) for transmitting VXLAN-encapsulated data packets.
[0070] In this embodiment, an address configuration message is obtained, and for each network element cluster, the field value corresponding to the address configuration field is updated respectively, so as to configure the corresponding address range for the network element cluster. This method does not require modification of the code, and only replaces the initial field value with the field value in the address configuration message to complete the addition of the address range, thereby improving the configuration efficiency of the address range.
[0071] In one embodiment, the target network element cluster includes multiple backup network elements; the method also includes: when a main network element in the target network element cluster fails, obtaining the status of each backup network element, and determining the target network element for allocating service requests from the backup network elements in the idle state.
[0072] There are many reasons why the main network element fails. For example, network connection problems, hardware failures, configuration errors, resource limitations, and other issues may all lead to the failure of the main network element.
[0073] Network connection problems can be caused by a network connection interruption between the primary and backup devices, which may lead to a primary network element failure. For example, physical link failure, network configuration errors, or security group policy issues can all cause such problems.
[0074] Hardware failure can be a hardware failure of the main network element, such as an optical module or line failure, which may also cause the main network element to fail.
[0075] Configuration errors may be configuration errors of the load balancer that may cause the primary network element to not work properly.
[0076] Resource limitation may be that the primary network element may be unable to process the request normally due to resource limitations such as insufficient bandwidth and insufficient memory.
[0077] The state of the standby network element may be a load state of the standby network element. The state of the standby network element may include an idle state, a working state, an abnormal state, and the like.
[0078] Specifically, the tenant gateway can obtain the status information of the main network element. The status information may include various types of problem information. Various types of problem information may include network connection information, hardware information, configuration information, and resource limitation information. The tenant gateway can determine whether the main network element has a fault based on the network connection information, hardware information, configuration information, and resource limitation information.
[0079] The network connection information may indicate the network connection information between the primary and backup devices. The hardware information may indicate the hardware information of the physical machine to which the network element belongs, such as line failure, processor failure, etc. The configuration information may indicate the load balancing configuration error of the network element, such as the load balancing version error. The resource limitation information may indicate the bandwidth size, memory size, etc. of the network element.
[0080] In one embodiment, when at least one of the network connection information, hardware information, configuration information, and resource restriction information is abnormal, the tenant gateway can determine that the primary network element is faulty. The tenant gateway can obtain the status of each standby network element. From the standby network elements in the idle state, determine the target network element for allocating the service request. When all the information is normal, the tenant gateway can determine the primary network element as the target network element for allocating the service request.
[0081] There are multiple ways to determine the target network element for allocating the service request from the spare network elements in the idle state. Specifically, the tenant gateway can randomly determine the target network element for allocating the service request from the spare network elements in the idle state. The tenant gateway can also determine the best performing spare network element from the spare network elements in the idle state as the target network element for allocating the service request.
[0082] In this embodiment, when a main network element in the target network element cluster fails, the status of each backup network element is obtained, and the target network element for allocating service requests is determined from the idle backup network elements. The target network element is determined quickly and accurately, and when a main network element fails, service requests can still be sent to the server normally, thereby avoiding server overload and improving system stability.
[0083] In one embodiment, Figure 3 As shown, a service processing architecture is provided, including: a tenant gateway 310, multiple network element clusters 320 and multiple server clusters 320. Each network element cluster 320 includes a main network element and at least one backup network element, and the network element cluster 320 is connected to the corresponding server cluster 320. The server cluster 320 includes multiple servers.
[0084] The tenant gateway 310 is used to obtain service requests respectively sent by multiple tenants, and for each service request, allocate the service request to a target network element cluster 320 matching the request address of the service request; the target network element cluster 320 is one of the network element clusters 320 .
[0085] Specifically, the tenant gateway can obtain service requests sent by multiple tenants respectively.
[0086] In one embodiment, the tenant gateway may actively poll the tenant devices of each tenant to obtain the service requests corresponding to the multiple tenants. The tenant gateway may also passively receive the service requests sent by the multiple tenants.
[0087] Specifically, the tenant gateway may determine, for each service request, from each network element cluster, a target network element cluster that matches the request address of the service request.
[0088] In one embodiment, the tenant gateway may obtain the preset addresses configured for each network element cluster. The tenant gateway may filter the target address that matches the request address of the service request from the preset addresses. The tenant gateway may determine the network element cluster corresponding to the target address as the target network element cluster.
[0089] In one embodiment, the tenant gateway may also obtain the address type of the request address of the service request. The address type may be a Mac address type, a virtual address type, or other address types. The tenant gateway may determine a target network element cluster that matches the address type of the request address of the service request from each network element cluster.
[0090] For each network element cluster 320, the backup network element 322 in the network element cluster 320 is used to evenly distribute the received service requests to the servers 311 in the server cluster 320 connected to the network element cluster 320 according to the set load balancing strategy when the main network element 311 in the network element cluster 320 fails.
[0091] Specifically, the tenant gateway can distribute service requests to the target network element cluster so that the backup network elements in the target network element cluster can distribute the received service requests evenly to the servers in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails.
[0092] In one embodiment, the tenant gateway can determine a target network element from the backup network elements when a main network element in the target network element cluster fails. The target network element is used to evenly distribute the received service requests to the servers in the server cluster connected to the target network element cluster according to the set load balancing strategy.
[0093] In one embodiment, the tenant network element may determine the best performing backup network element as the target network element. The tenant network element may also obtain the status of each backup network element when the primary network element in the target network element cluster fails. The tenant gateway may determine the target network element for allocating the service request from the idle backup network elements.
[0094] Specifically, when the master network element does not fail, the master network element can distribute the received service requests evenly to the servers in the server cluster to which the network element cluster is connected according to the set load balancing strategy.
[0095] Each server 311 in the server cluster 320 is used to process the assigned service request.
[0096] Specifically, the server may receive a service request sent by the primary network element or the backup network element. The server may process the service request and obtain a service response corresponding to the service request. The server may return the service response directly to the terminal of the corresponding tenant.
[0097] The server can also return the service response to the terminal of the corresponding tenant through the main network element or the backup network element or the tenant gateway.
[0098] In this embodiment, the tenant gateway is used to obtain service requests sent by multiple tenants respectively, and for each service request, distribute the service request to a target network element cluster that matches the request address of the service request; the target network element cluster is one of the network element clusters. For each network element cluster, the backup network element in the network element cluster is used to distribute the received service requests evenly to the servers in the server cluster connected to the network element cluster according to the set load balancing strategy when the main network element in the network element cluster fails. Each server in the server cluster is used to process the distributed service requests. On the one hand, since there are main network elements and backup network elements in the target network element cluster, when the main network element in the target network element cluster fails, the backup network element can still send the service request to the server normally, thereby avoiding the overload of the server and improving the stability of the system. On the other hand, the tenant gateway is connected to multiple network element clusters, each of which includes a primary network element and at least one backup network element, and the network element cluster is connected to the corresponding server cluster, which includes multiple servers. Since the tenant gateway is connected to multiple network element clusters, each network element cluster can process business requests corresponding to multiple request addresses, providing a basis for increasing the concurrency of business requests and further improving system stability.
[0099] In one embodiment, the network element cluster includes a first host machine and a second host machine, the primary network element is configured in the first host machine in the form of a virtual machine, and the backup network element is configured in the second host machine in the form of a virtual machine.
[0100] The first host machine and the second host machine may be physical machines. Specifically, the host machine may be a physical computer or server for hosting and managing virtual machines. The host machine is responsible for providing necessary hardware resources, such as CPU, memory, storage, and network interface, to support the operation of the virtual machine. On the host machine, the virtual machine can be configured to implement a variety of network connection modes, such as bridge mode, NAT mode, and host-only network mode.
[0101] The first host machine may be a host machine configured by the primary network element. The second host machine may be a host machine configured by the backup network element.
[0102] Specifically, the first host machine may create a primary network element in the form of a virtual machine, and the second host machine may create a backup network element in the form of a virtual machine.
[0103] In one embodiment, there are multiple ways for the host to create virtual machines. Specifically, the host creates virtual machines through virtualization software (such as VMware, VirtualBox, KVM, etc.) and allocates required resources to each virtual machine. These virtual machines can run independently on the host, have their own operating systems and applications, and can communicate with each other and the host through a virtual network.
[0104] In one embodiment, before the host creates a virtual machine, the host can determine the master-slave relationship with at least two host machines and each host machine in the network element cluster. Taking two host machines in the network element cluster as an example, the host machine with better performance is determined as the first host machine, and the other is determined as the second host machine. Furthermore, the master network element is configured in the form of a virtual machine in the first host machine, and the backup network element is configured in the form of a virtual machine in the second host machine.
[0105] In this embodiment, the main network element is configured in the form of a virtual machine in the first host machine, and the backup network element is configured in the form of a virtual machine in the second host machine. The main network element and the backup network element are created in different host machines to facilitate load-balanced active-standby switching of network elements, increase the active-standby switching speed, avoid server overload, and improve system stability.
[0106] In one embodiment, Figure 4 As shown, a method for horizontal expansion of active-standby load balancing in a cloud network is provided, comprising:
[0107] S401, obtaining service requests respectively sent by multiple tenants.
[0108] S402: Obtain an address configuration message.
[0109] The address configuration message includes an address configuration field.
[0110] S403: For each network element cluster, update the field value corresponding to the address configuration field respectively, and configure the corresponding address range for the network element cluster.
[0111] S404: For each service request, determine a target range including the request address of the service request from each address range.
[0112] S405: Determine the network element cluster to which the target range belongs as the target network element cluster matching the service request.
[0113] For example, Figure 5In the network element communication architecture diagram of multiple pairs of load balancing network elements horizontally expanded as shown, a pair of network element clusters (load balancing network element virtual machines) can be newly created before S405. The configuration of the newly created second pair of load balancing network element virtual machines for vrrp message interaction ovs vxlan tunnel is similar to that of the first pair of load balancing network elements. On the newly created load balancing network element, an independent default gateway address is configured. This address will be configured on the loop port of the tenant gateway vpc BD to pull through the 3-layer communication path of the tenant gateway / load balancing. At the same time, on the load balancing virtual machine, the macvlan interface configured with the keepalived vip address needs to be configured with a different MAC address from the corresponding interface of the initial load balancing network element to implement the update of the corresponding entry of the newly configured LB vip address in the arp table and the layer 2 forwarding table on the tenant gateway, so that the message is forwarded to the virtual machine of the destination load balancing vip address by the correct vxlan tunnel. On the BD of the tenant gateway vpc, the default gateway address of the newly created pair of load balancing virtual machines is mainly configured on the loop port.
[0114] Through this capacity expansion method of load balancing, customers can also use load balancing products to configure new LBs and achieve the effect of version upgrades. On the newly built network element host, by using technologies such as dpdk ovs, network card multi-queue, and host virtual machine core binding, the processing capacity of the load balancing virtual machine on it can be greatly improved. In this way, the purpose of improving load balancing performance is better met.
[0115] Specifically:
[0116] (1) The creation and scheduling of load balancing network element virtual machines remain consistent with the current architecture.
[0117] (2) The newly created load balancing network element may be on the same or different host as the original load balancing. The main difference in the OVS flow table configuration of the load balancing network element node is whether a new VXLAN tunnel to the tenant gateway is required.
[0118] (3) Each pair of mcvlan network cards configured with the LB vip address of the load balancing virtual machine uses a different MAC address configuration to enable the tenant gateway's layer 2 forwarding table to correctly forward the LB vip address vxlan tunnel.
[0119] Considering the forward compatibility of the software, no keepalived code modification was made. Use the virtual_router_id field configuration item used in the vrrp message, and set different virtual_router_id for different pairs of load balancing network elements according to its different values and the mechanism of generating different MAC addresses for the mcvlan network card.
[0120] (4) The OVS flow table configuration related to load balancing of the computing node where the tenant virtual machine is located is consistent with the current architecture.
[0121] S406: Allocate the service request to the target network element cluster.
[0122] S407, when a master network element in the target network element cluster fails, obtaining the status of each backup network element.
[0123] S408, determine the target network element for allocating service requests from the spare network elements in the idle state, so that the target network element can evenly distribute the received service requests to the servers in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails.
[0124] In this embodiment, the tenant gateway obtains service requests sent by multiple tenants respectively. For each service request, the tenant gateway determines the target network element cluster that matches the request address of the service request from each network element cluster, and distributes the service request to the target network element cluster, so that the backup network element in the target network element cluster, when the main network element in the target network element cluster fails, distributes the received service requests to each server in the server cluster connected to the target network element cluster according to the set load balancing strategy. With the above method, on the one hand, since there are main network elements and backup network elements in the target network element cluster, when the main network element in the target network element cluster fails, the backup network element can still send service requests to the server normally, thereby avoiding the overload of the server and improving the system stability. On the other hand, the tenant gateway is connected to multiple network element clusters, each network element cluster includes a main network element and at least one backup network element, and the network element cluster is connected to the corresponding server cluster, and the server cluster includes multiple servers. Since the tenant gateway is connected to multiple network element clusters, each network element cluster can process service requests corresponding to multiple request addresses, providing a basis for increasing the concurrency of service requests and further improving the system stability.
[0125] The above method can also bring the following beneficial effects: a simple and easy-to-implement expansion method for active-standby architecture load balancing products is proposed, which can realize the effect of supporting multiple high-performance LB instances in the tenant VPC in the current active-standby architecture load balancing product environment. Using dpdk-ovs and a newly created load balancing network element pair bound to the host core can achieve millions of concurrent and 100,000 newly created single LB instance performance.
[0126] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0127] Based on the same inventive concept, the embodiment of the present application also provides a business processing device for implementing the business processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more business processing device embodiments provided below can refer to the limitations on the business processing method above, and will not be repeated here.
[0128] In one embodiment, Figure 6 As shown, a service processing device is provided, which is applied to a tenant gateway, and the tenant gateway is connected to multiple network element clusters; each network element cluster includes a main network element and at least one backup network element, and the network element cluster is connected to a corresponding server cluster; the server cluster includes multiple servers, and the device includes: an acquisition module 601, a cluster determination module 602 and a load balancing module 603, wherein:
[0129] The acquisition module 601 is used to acquire the service requests sent by multiple tenants respectively.
[0130] The cluster determination module 602 is used to determine, for each service request, from each network element cluster, a target network element cluster that matches the request address of the service request;
[0131] The load balancing module 603 is used to distribute service requests to the target network element cluster so that when the main network element in the target network element cluster fails, the backup network element in the target network element cluster can distribute the received service requests evenly to the servers in the server cluster connected to the target network element cluster according to the set load balancing strategy.
[0132] In one of the embodiments, the cluster determination module 602 is also used to configure corresponding address ranges for multiple network element clusters respectively; for each service request, determine a target range containing the request address of the service request from each address range; and determine the network element cluster to which the target range belongs as the target network element cluster that matches the service request.
[0133] In one embodiment, the cluster determination module 602 is further used to obtain an address configuration message; the address configuration message includes an address configuration field; for each network element cluster, the field value corresponding to the address configuration field is updated respectively to configure the corresponding address range for the network element cluster.
[0134] In one embodiment, the service processing device further includes: a target network element determination module, which is used to obtain the status of each backup network element when a main network element in the target network element cluster fails; and determine the target network element for allocating the service request from the backup network elements in the idle state.
[0135] Each module in the above-mentioned business processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0136] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store business request data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business processing method is implemented.
[0137] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0138] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the above method steps are implemented when the processor executes the computer program.
[0139] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method steps are implemented.
[0140] In one embodiment, a computer program product is provided, comprising a computer program, which implements the above method steps when executed by a processor.
[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A business processing method, characterized in that: Applied to a tenant gateway, the tenant gateway is connected to multiple network element clusters; each of the network element clusters includes a primary network element and at least one backup network element, and the network element clusters are connected to corresponding server clusters; The server cluster includes multiple servers; The method comprises: Get business requests sent by multiple tenants. For each of the service requests, determining, from the network element clusters, a target network element cluster that matches the request address of the service request; The service requests are distributed to the target network element cluster so that the backup network elements in the target network element cluster can distribute the received service requests evenly to the servers in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails.
2. The method according to claim 1, characterized in that The step of determining, for each of the service requests, a target network element cluster that matches a request address of the service request from the network element clusters includes: Configure corresponding address ranges for multiple network element clusters respectively; For each of the service requests, determining a target range including a request address of the service request from each of the address ranges; The network element cluster to which the target range belongs is determined as a target network element cluster matching the service request.
3. The method according to claim 2, characterized in that The configuring corresponding address ranges for the multiple network element clusters respectively includes: Obtain an address configuration message; the address configuration message includes an address configuration field; For each of the network element clusters, the field value corresponding to the address configuration field is updated respectively to configure a corresponding address range for the network element cluster.
4. The method according to claim 1, characterized in that: The target network element cluster includes a plurality of standby network elements; the method further includes: When a main network element in the target network element cluster fails, obtaining the status of each of the backup network elements; A target network element for allocating the service request is determined from the standby network elements in an idle state.
5. A business processing architecture, characterized in that: It includes a tenant gateway, multiple network element clusters and multiple server clusters, each of the network element clusters includes a main network element and at least one backup network element, and the network element clusters are connected to the corresponding server clusters; The server cluster includes multiple servers; The tenant gateway is used to obtain service requests respectively sent by multiple tenants, and for each of the service requests, allocate the service request to a target network element cluster matching the request address of the service request; The target network element cluster is one of the network element clusters; For each network element cluster, the standby network element in the network element cluster is used to evenly distribute each received service request to each server in the server cluster connected to the network element cluster according to a set load balancing strategy when a main network element in the network element cluster fails; Each of the servers in the server cluster is used to process the allocated service requests.
6. The architecture according to claim 5, characterized in that The network element cluster includes a first host machine and a second host machine; the primary network element is configured in the first host machine in the form of a virtual machine; and the backup network element is configured in the second host machine in the form of a virtual machine.
7. A service processing device, characterized in that: Applied to a tenant gateway, the tenant gateway is connected to multiple network element clusters; each of the network element clusters includes a primary network element and at least one backup network element, and the network element clusters are connected to corresponding server clusters; The server cluster includes multiple servers; The device comprises: The acquisition module is used to obtain business requests sent by multiple tenants. A cluster determination module, configured to determine, for each of the service requests, from the network element clusters, a target network element cluster that matches a request address of the service request; The load balancing module is used to distribute the service requests to the target network element cluster so that the backup network elements in the target network element cluster can distribute the received service requests evenly to the servers in the server cluster connected to the target network element cluster according to the set load balancing strategy when the main network element in the target network element cluster fails.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Data processing method, device and system
CN113703906A
Private network access method and system
CN115714756A
Equipment allocation method and device and resource arrangement system
CN118301151A
Switching method, network element, gateway, base station, framework, apparatus, and storage medium
WO2017193797A1