A load balancing method and apparatus
By offloading and analyzing traffic in a hybrid cloud environment and configuring load balancing strategies to distribute traffic to public and private clouds, the problem of low resource utilization in traditional methods is solved, achieving efficient resource utilization and cost reduction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CLOUD TECH CO LTD
- Filing Date
- 2023-03-12
- Publication Date
- 2026-04-21
AI Technical Summary
Traditional business load balancing methods have low resource utilization in hybrid cloud environments, resulting in high user costs and failing to meet the requirements of resource cost and security performance, which can easily lead to resource waste and additional costs.
By offloading the received traffic and configuring load balancing strategies, the traffic load is evenly distributed to public and/or private clouds. Various resource information is obtained and analyzed, and traffic scheduling strategies are reconfigured to improve resource utilization and reduce costs.
It improves resource utilization in hybrid cloud environments, reduces user costs, ensures the security of traffic resources with protection requirements, and enables unified planning and control of public and private cloud resources.
Smart Images

Figure CN116346740B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer cloud computing technology, and in particular to a load balancing method, apparatus, computer equipment, and readable storage medium. Background Technology
[0002] With the continuous progress of society and economy, the field of cloud computing technology is also constantly developing. The existing cloud computing architecture can be roughly divided into public cloud, private cloud and hybrid cloud.
[0003] Public clouds primarily provide computing or storage resources to users via the internet. Users pay as needed, with low usage, maintenance, and management costs, but their security is also relatively lower. Private clouds, on the other hand, house cloud computing services within an enterprise or organization, freeing them from the security threats and bandwidth limitations of public networks. Their infrastructure can be adjusted and optimized to meet the specific needs of the enterprise or organization, but they require additional costs for maintenance and management. Hybrid clouds are a combination of multiple cloud types, including multiple public clouds, multiple private clouds, or a combination of both. Due to security and management considerations, some users desire to use public clouds but do not want to deploy sensitive information on them. This is where hybrid clouds come in. Considering security and resource utilization, hybrid clouds typically adopt a "private cloud + public cloud" approach. This combines the scalability and cost-effectiveness of public clouds with the security and controllability of private clouds, and also provides solutions for the elastic resource needs and disaster recovery issues of private clouds. In a hybrid cloud environment, users need to consider resource costs and security controls to plan and control resources in a unified manner for public and private clouds. Load balancing directly affects the effectiveness of resource planning and control. Elastic control further emphasizes the importance of load balancing. A reasonable load balancing solution can help users avoid additional costs and resource waste.
[0004] However, traditional business load balancing methods have low resource utilization and correspondingly high user costs. They are not suitable for unified planning and control of resources in a hybrid cloud environment, cannot meet users' needs for resource cost and security performance, and are prone to resource waste and additional costs. Summary of the Invention
[0005] Therefore, it is necessary to provide a load balancing method, apparatus, computer equipment, and readable storage medium that can comprehensively control security and resource costs in a hybrid cloud environment, analyze and rationally plan user traffic, thereby improving resource utilization and reducing user costs.
[0006] A load balancing method, applied to a load balancer, includes:
[0007] The received traffic is distributed and a load balancing strategy is configured, which is a method for distributing traffic load evenly across nodes.
[0008] Based on the load balancing strategy, the traffic after being split will be forwarded to the public cloud and / or private cloud respectively;
[0009] The system acquires and updates various resource information of traffic in public and private clouds for analysis to determine the type of traffic and record it. The resource information includes storage cloud type, memory, CPU information, IP, disk and bandwidth.
[0010] The traffic scheduling strategy is reconfigured based on the recorded traffic type, and the load balancing strategy is adjusted. The traffic scheduling strategy is a method for combining and forwarding different types of traffic.
[0011] In one embodiment, the process of routing the received traffic and configuring a load balancing strategy includes:
[0012] Traffic is routed based on the URL and security requirements;
[0013] Configure round-robin, weighted average, or IP hash as the load balancing strategy.
[0014] In one embodiment, the process of routing the received traffic and configuring a load balancing strategy further includes:
[0015] The load balancing effect is detected and recorded, and the traffic scheduling strategy is initially adjusted based on the load balancing effect. The traffic scheduling strategy is a method for combining and forwarding different types of traffic.
[0016] Obtain various resource information of traffic in public and private clouds, including storage cloud type, memory, CPU information, IP, disk and bandwidth.
[0017] In one embodiment, the step of reconfiguring the traffic scheduling policy based on the recorded traffic type and adjusting the load balancing policy further includes:
[0018] The time of received traffic is statistically analyzed to determine the patterns of peaks and troughs in the received traffic.
[0019] In one embodiment, the step of statistically analyzing the time of received traffic to determine the patterns of peaks and troughs in the received traffic further includes:
[0020] The peak value of unreceived traffic is predicted based on the pattern of peaks and troughs in received traffic.
[0021] In one embodiment, the step of predicting the peak value of unreceived traffic based on the pattern of peaks and troughs in received traffic further includes:
[0022] By combining the predicted results of resource costs, traffic types, and traffic peaks, operational basis is provided for scaling up and down nodes;
[0023] Based on the prediction results, monitor and record the utilization rate of various resource information when the traffic reaches its peak.
[0024] A load balancing device, applied to a load balancer, comprising:
[0025] The strategy configuration module is used to distribute the received traffic and configure the load balancing strategy, which is a way to distribute the traffic load evenly across the nodes.
[0026] The policy execution module is used to forward the traffic after it has been split to the public cloud and / or private cloud according to the load balancing policy.
[0027] The resource monitoring module is used to acquire and update various resource information of traffic in public and private clouds for analysis, so as to determine the type of traffic and make a record. The resource information includes storage cloud type, memory, CPU information, IP, disk and bandwidth.
[0028] The resource management module is used to reconfigure traffic scheduling strategies and adjust load balancing strategies based on the recorded traffic types. The traffic scheduling strategy is a method for combining and forwarding different types of traffic.
[0029] In one embodiment, a computer device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to perform the following steps:
[0030] The received traffic is distributed and a load balancing strategy is configured, which is a method for distributing traffic load evenly across nodes.
[0031] Based on the load balancing strategy, the traffic after being split will be forwarded to the public cloud and / or private cloud respectively;
[0032] The system acquires and updates various resource information of traffic in public and private clouds for analysis to determine the type of traffic and record it. The resource information includes storage cloud type, memory, CPU information, IP, disk and bandwidth.
[0033] The traffic scheduling strategy is reconfigured based on the recorded traffic type, and the load balancing strategy is adjusted. The traffic scheduling strategy is a method for combining and forwarding different types of traffic.
[0034] In one embodiment, a computer-readable storage medium stores a computer program, characterized in that, when executed by a processor, the computer program performs the following steps:
[0035] The received traffic is distributed and a load balancing strategy is configured, which is a method for distributing traffic load evenly across nodes.
[0036] Based on the load balancing strategy, the traffic after being split will be forwarded to the public cloud and / or private cloud respectively;
[0037] The system acquires and updates various resource information of traffic in public and private clouds for analysis to determine the type of traffic and record it. The resource information includes storage cloud type, memory, CPU information, IP, disk and bandwidth.
[0038] The traffic scheduling strategy is reconfigured based on the recorded traffic type, and the load balancing strategy is adjusted. The traffic scheduling strategy is a method for combining and forwarding different types of traffic.
[0039] In one embodiment, a computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0040] The received traffic is distributed and a load balancing strategy is configured, which is a method for distributing traffic load evenly across nodes.
[0041] Based on the load balancing strategy, the traffic after being split will be forwarded to the public cloud and / or private cloud respectively;
[0042] The system acquires and updates various resource information of traffic in public and private clouds for analysis to determine the type of traffic and record it. The resource information includes storage cloud type, memory, CPU information, IP, disk and bandwidth.
[0043] The traffic scheduling strategy is reconfigured based on the recorded traffic type, and the load balancing strategy is adjusted. The traffic scheduling strategy is a method for combining and forwarding different types of traffic.
[0044] The aforementioned load balancing method, apparatus, computer equipment, and readable storage medium distribute traffic according to user demand, configure an initial load balancing strategy to maintain the stable operation of the load balancer, and forward received traffic to public and / or private cloud resource pools as required according to the load balancing strategy. This improves the security of traffic resources requiring protection and saves on hybrid cloud maintenance and management costs. Furthermore, it enables unified planning and control of public and private cloud resources. Subsequently, it acquires and analyzes various resource information of the traffic in the resource pool, determines and records the traffic type, and reconfigures the traffic scheduling strategy and adjusts the load balancing strategy based on the records. This method comprehensively considers security control and resource costs in a hybrid cloud environment, analyzes and rationally plans user traffic, improves resource information utilization, and reduces user costs. Attached Figure Description
[0045] Figure 1 This is one of the flowcharts of the load balancing method provided in this application;
[0046] Figure 2 The second flowchart of the load balancing method provided in this application;
[0047] Figure 3 The third flowchart of the load balancing method provided in this application;
[0048] Figure 4 The fourth flowchart of the load balancing method provided in this application;
[0049] Figure 5 The fifth flowchart of the load balancing method provided in this application;
[0050] Figure 6 A block diagram of the load balancing device provided in this application;
[0051] Figure 7 This is an internal structural diagram of a computer device according to one embodiment. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] like Figure 1 As shown, in one embodiment, a load balancing method applied to a load balancer includes the following steps:
[0054] Step S110: Distribute the received traffic and configure a load balancing strategy. The load balancing strategy is a method used to distribute traffic load evenly across nodes.
[0055] Specifically, traffic distribution refers to the load balancer providing appropriate forwarding paths for the traffic based on the user's demand for it; configuring an initial load balancing strategy to distribute traffic evenly across nodes, ensuring the load balancer can operate stably.
[0056] Step S120: According to the load balancing strategy, the traffic after being split is forwarded to the public cloud and / or the private cloud respectively.
[0057] Specifically, based on the initially configured load balancing strategy and the traffic distribution results, the load balancer forwards the received traffic to the resource pools of the public cloud and / or private cloud as required, thereby improving the security of traffic resources with protection needs, saving the cost of hybrid cloud maintenance and management, and performing unified planning and control of public cloud and private cloud resources based on the load balancing strategy.
[0058] Step S130: Obtain and update various resource information of traffic in public cloud and private cloud for analysis, so as to determine the type of traffic and make a record. Resource information includes storage cloud type, memory, CPU information, IP, disk and bandwidth.
[0059] Specifically, the load balancer acquires and updates resource information such as storage cloud type, memory, CPU information, IP, disk, and bandwidth for traffic in both public and private clouds, and analyzes it to determine whether the traffic belongs to one of the following categories: high CPU, high memory, high bandwidth, high disk, or unknown, or a combination of several categories, and records the classification accordingly. This traffic classification significantly improves the resource utilization of each node.
[0060] It should be noted that in this embodiment, the load balancer classifies traffic according to URL format based on Layer 7 network load balancing. A type of traffic (those with a high volume of actual requests) is routed to a specific node for testing. Based on request response time, CPU load, memory usage, disk usage, and bandwidth usage, the system automatically estimates the limit of requests that can be handled and analyzes which metrics are related to the current type of request. The specific operation process is as follows:
[0061] Set a reasonable response time of 500-1000ms; based on traffic distribution statistics under the initial load balancing strategy, estimate an initial point for regular traffic, defaulting to 1000, and gradually increase the number of requests as needed; statistically analyze the response time, observing the changes in the above indicators within the reasonable response time range, and record them as percentages; when the response exceeds the reasonable range, record the request limit and observe whether the above indicators reach the threshold, such as CPU utilization of 100%, bandwidth of 90%, disk write speed, or memory utilization of 90%, etc.
[0062] If none of the factors reach the threshold, it indicates that other factors are affecting the limit of the number of requests that can be processed. These factors are collectively referred to as unknown factors. These unknown factors may depend on the performance of other backend services and thus cannot be estimated.
[0063] The current percentage of each indicator can be recorded in the table below:
[0064] CPU Memory disk bandwidth Unknown factors Req 50% 60% 10% 50% 1 10000
[0065] If one or more indicators are close to or exceed the threshold, it can be preliminarily determined that this type of request depends on the above indicators. Then, the following formula is used to calculate the derivative (discrete derivative) of the above indicators, and it is observed whether the derivative is always greater than 0 to detect whether there is a correlation.
[0066]
[0067] The current percentage of each indicator can be recorded in the table below:
[0068] CPU Memory disk bandwidth Unknown factors Req 100% 60% 10% 50% 0 20000
[0069] Step S140: Reconfigure the traffic scheduling policy according to the recorded traffic type and adjust the load balancing policy. The traffic scheduling policy is a method used to combine and forward different types of traffic.
[0070] Specifically, based on the recorded traffic types, different types of traffic are combined to achieve a higher load on various machine metrics, thereby improving node resource utilization. For example, some requests with high CPU requirements can be combined with requests with lower CPU usage and routed to the same node. Then, based on the remaining resources of the current node, the most suitable traffic type is estimated and traffic redirection is performed. When two or more metrics on a node have high utilization, a threshold of 80% is set, and this combination is recorded and stored in the policy database. The policy database is automatically updated periodically, retaining only records within the most recent threshold for resource estimation, saving space. Under the established load balancing strategy, the load balancing strategy is dynamically adjusted to save costs and ensure security; resources are not expanded unnecessarily.
[0071] The aforementioned load balancing method distributes traffic according to user demand and configures an initial load balancing strategy to maintain the stable operation of the load balancer. Based on this strategy, received traffic is forwarded to public and / or private cloud resource pools as required. This improves the security of traffic resources requiring protection and saves on hybrid cloud maintenance and management costs. Furthermore, it enables unified planning and control of public and private cloud resources. Subsequently, it acquires and analyzes various resource information of the traffic in the resource pool, determines and records the traffic type, and reconfigures the traffic scheduling strategy and adjusts the load balancing strategy based on the records. This method comprehensively considers security control and resource costs in a hybrid cloud environment, analyzes and rationally plans user traffic, improves resource information utilization, and reduces user costs.
[0072] like Figure 2 As shown, in this embodiment, the received traffic is distributed and a load balancing strategy is configured, specifically including the following steps:
[0073] Step S111: Distribute traffic according to the URL and security requirements.
[0074] Specifically, the load balancer supports Layer 7 load balancing strategies. Based on the URL (supporting regular expression matching), it forwards user-uploaded task traffic with security requirements to the private cloud, and forwards traffic without security requirements in conjunction with other subsequent strategies.
[0075] Step S112: Configure round-robin, weighted average, or IP hash as the load balancing strategy.
[0076] Specifically, after determining the traffic forwarding path, the load balancer will configure common load balancing algorithms (such as round-robin, weighted average, or IP hash) as the initial load balancing strategy to distribute traffic load evenly across nodes to ensure its stable operation.
[0077] like Figure 3 As shown, in this embodiment, the received traffic is distributed and a load balancing strategy is configured, followed by the following steps:
[0078] Step S210: Detect and record the load balancing effect, and make preliminary adjustments to the traffic scheduling strategy based on the load balancing effect. The traffic scheduling strategy is a method used to combine and forward different types of traffic.
[0079] Specifically, after stable operation, the load balancer will automatically adjust based on the load balancing effect. This function is enabled by default. If the adjusted load balancing effect is not satisfactory, you can choose to disable it, which means that the traffic will be forwarded according to the initially set load balancing strategy by default.
[0080] Step S220: Obtain various resource information of traffic in public and private clouds, including storage cloud type, memory, CPU information, IP, disk and bandwidth.
[0081] Specifically, the addition or reduction of nodes is called node scaling, which is further divided into manual and automatic scaling. In this embodiment, when performing manual or automatic scaling, the load balancer will collect resource information such as storage cloud type, memory, CPU information, IP, disk, and bandwidth of traffic in both public and private clouds, so as to schedule traffic based on the acquired resource information.
[0082] like Figure 4 As shown, in this embodiment, the traffic scheduling strategy is reconfigured according to the recorded traffic type, the load balancing strategy is adjusted, and then the following steps are included:
[0083] Step S310: Statistically analyze the time of received traffic to determine the patterns of peaks and troughs in the received traffic.
[0084] Specifically, the receiving time is recorded when traffic is received, and the data is aggregated and statistically analyzed to determine the periods with the most concentrated and least traffic.
[0085] Step S320: Predict the peak value of unreceived traffic based on the pattern of peaks and troughs in the received traffic.
[0086] Specifically, based on the statistical patterns of peak and trough traffic received, the potential peak traffic can be predicted. For example, the number of traffic received is most concentrated on Friday nights and least concentrated on Monday mornings. Therefore, it can be inferred that nodes can be appropriately expanded before Friday and appropriately reduced before Monday.
[0087] like Figure 5 As shown, in this embodiment, the peak value of unreceived traffic is predicted based on the pattern of peaks and troughs in received traffic, followed by the following steps:
[0088] Step S410 combines the predicted results of resource costs, traffic types, and traffic peaks to provide operational basis for scaling up and down nodes.
[0089] Specifically, by analyzing and predicting traffic types and adjusting scheduling strategies accordingly, capacity scaling up and down can be performed relatively accurately. The specific operation process is as follows:
[0090] Classify the newly added change requests and calculate their respective proportions; combine the data and strategies in the strategy library to estimate the number of nodes that need to be expanded or reduced; identify the top 5 types of newly added change requests that share the same 5 strategies; use the following formula to combine the above 5 strategies and calculate the solution that meets the conditions.
[0091]
[0092] Where rate1 represents the proportion of request 1, reqNum is the maximum number of requests this node can accept, and nodeNum1 is the estimated number of nodes. The number of nodes that meet the conditions can be calculated by enumeration. If the calculation result is not a better solution, the predetermined scaling-up and scaling-down strategy will be followed. In the above calculation process, the 80% of all requests in each node can be estimated based on the sum of the proportion of valid requests in their respective load balancing strategies, thereby determining whether it is a better solution. Here, valid requests refer to a certain category of new requests.
[0093] Step S420: Based on the prediction results, monitor and record the utilization rate of various resource information when the traffic reaches its peak.
[0094] Specifically, the load balancer monitors traffic and node resources to ensure that the number of requests does not exceed the limit when traffic reaches its peak, and then records and saves the resource utilization of the nodes.
[0095] The aforementioned load balancing method distributes traffic based on users' security requirements and configures an initial load balancing strategy to maintain stable operation of the load balancer. It pre-acquires various resource information of the traffic for scheduling and forwards received traffic to public and / or private cloud resource pools as required according to the initial load balancing strategy. This improves the security of traffic resources requiring protection and saves on hybrid cloud maintenance and management costs. Furthermore, it enables unified planning and control of public and private cloud resources. Subsequently, it analyzes various resource information of the traffic in the resource pool, determines and records the traffic type, reconfigures the traffic scheduling strategy based on the records, adjusts the load balancing strategy, and analyzes and predicts traffic peak patterns to enable more accurate load balancing strategy adjustments. It also monitors traffic and node resources to ensure operational stability. This method comprehensively considers security control and resource costs in a hybrid cloud environment, analyzes and rationally plans user traffic, improves resource information utilization, and reduces user costs.
[0096] like Figure 6 As shown, in one embodiment, a load balancing device includes:
[0097] The policy configuration module 310 is used to distribute the received traffic and configure the load balancing policy. The load balancing policy is a method used to distribute the traffic load evenly across the nodes.
[0098] Specifically, traffic distribution refers to the policy configuration module 310 providing corresponding forwarding paths for the traffic based on the user's demand for the traffic; configuring a preliminary load balancing policy to distribute the traffic load evenly across nodes, ensuring the stable operation of the load balancer.
[0099] The policy execution module 320 is used to forward the traffic after it has been split to the public cloud and / or the private cloud according to the load balancing policy.
[0100] Specifically, the policy execution module 320 forwards the received traffic to the resource pools of the public cloud and / or private cloud as required, based on the initially configured load balancing policy and the traffic distribution results. This improves the security of traffic resources with protection requirements, saves the cost of hybrid cloud maintenance and management, and performs unified planning and control of public cloud and private cloud resources based on the load balancing policy.
[0101] The resource monitoring module 330 is used to acquire and update various resource information of traffic in public and private clouds for analysis, so as to determine the type of traffic and make records. The resource information includes storage cloud type, memory, CPU information, IP, disk and bandwidth.
[0102] Specifically, the resource monitoring module 330 acquires and updates resource information such as storage type, memory, CPU, IP, disk, and bandwidth of traffic in both public and private clouds, and analyzes it to determine whether the traffic belongs to one of the following types: high CPU, high memory, high bandwidth, high disk, or unknown, or a combination of several types, and records the classification accordingly. This traffic classification significantly improves the resource utilization of each node.
[0103] Resource management module 340 is used to reconfigure traffic scheduling policies and adjust load balancing policies based on the recorded traffic types. Traffic scheduling policies are methods used to combine and forward different types of traffic.
[0104] Specifically, based on the recorded traffic types, the resource management module 340 combines different types of traffic to achieve a higher load on various machine metrics, thereby improving node resource utilization. For example, some requests have high CPU requirements and can be combined with requests with lower CPU usage, both flowing to a specific node. Then, based on the remaining resources of the current node, the most suitable traffic type is estimated and traffic redirection is performed. When two or more metrics on a node have high utilization, a threshold of 80% is set, and this combination is recorded and stored in the policy database. The policy database is automatically updated periodically, retaining only records within the most recent threshold for resource estimation, saving space. Under a predetermined load balancing strategy, the load balancing strategy is dynamically adjusted to save costs and ensure security, avoiding unnecessary resource expansion.
[0105] The aforementioned load balancing device distributes traffic according to user demand and configures an initial load balancing strategy to maintain stable operation of the load balancer. Based on this strategy, it forwards received traffic to public and / or private cloud resource pools as required. This improves the security of traffic resources requiring protection and saves on hybrid cloud maintenance and management costs. Furthermore, it enables unified planning and control of public and private cloud resources. Subsequently, it acquires and analyzes various resource information from the traffic in the resource pool, determines and records the traffic type, and reconfigures the traffic scheduling strategy and adjusts the load balancing strategy based on the records. This device comprehensively considers security control and resource costs in a hybrid cloud environment, analyzes and rationally plans user traffic, improves resource information utilization, and reduces user costs.
[0106] In this embodiment, the policy configuration module 310 specifically includes a security configuration module and a policy adjustment module, wherein:
[0107] The security configuration module is used to route traffic based on the URL and security requirements.
[0108] Specifically, the security configuration module supports Layer 7 load balancing strategies. Based on the URL (supporting regular expression matching), it forwards user-uploaded task traffic with security requirements to the private cloud, and forwards traffic without security requirements in conjunction with other subsequent strategies.
[0109] The strategy adjustment module is used to configure round-robin, weighted average, or IP hash as load balancing strategies.
[0110] Specifically, after determining the traffic forwarding path, the policy adjustment module will configure common load balancing algorithms (such as round-robin, weighted average, or IP hash) as the initial load balancing strategy to distribute traffic load evenly across nodes to ensure its own stable operation.
[0111] In this embodiment, the policy adjustment module is also used to detect and record the load balancing effect, and to make preliminary adjustments to the traffic scheduling policy based on the load balancing effect. The traffic scheduling policy is a method for combining and forwarding different types of traffic.
[0112] Specifically, after stable operation, the policy adjustment module will automatically adjust according to the load balancing effect. This function is enabled by default. If the adjusted load balancing effect is not good, you can choose to turn it off, that is, the traffic will be forwarded by default according to the initially set load balancing policy.
[0113] In this embodiment, the load balancing device further includes a traffic prediction module, which is used to statistically analyze the time of received traffic to obtain the pattern of peaks and troughs of received traffic and to predict the peak values of unreceived traffic.
[0114] Specifically, the traffic prediction module records the reception time when receiving traffic, summarizes and statistically analyzes the data to determine the periods with the highest and lowest traffic density. Based on the patterns of peaks and troughs in the received traffic, it predicts potential traffic peaks. For example, if Friday evening sees the highest traffic density and Monday morning the lowest, it can be inferred that nodes can be appropriately scaled up before Friday and scaled down before Monday.
[0115] The traffic prediction module also combines the prediction results of resource costs, traffic types, and peak traffic to provide operational guidance for node scaling up and down. Specifically, the traffic prediction module analyzes and makes predictions based on traffic types, thereby adjusting scheduling strategies and enabling relatively accurate scaling up and down.
[0116] The traffic prediction module is also used to monitor and record the utilization rate of various resources when traffic reaches its peak, based on the prediction results. Specifically, the traffic prediction module monitors traffic and node resources to ensure that the number of requests does not exceed the limit when traffic reaches its peak, and then records and saves the resource utilization rate of the nodes.
[0117] In one embodiment, a computer device is provided, which may be a smart terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a load balancing method.
[0118] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0119] In one embodiment, a computer device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above-described method embodiments. In another embodiment, a computer storage medium stores a computer program, the computer program being executed by a processor to implement the steps in the above-described method embodiments.
[0120] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps in the above method embodiments.
[0121] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0122] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0123] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A load balancing method, applied to a load balancer, characterized in that, include: The received traffic is distributed and a load balancing strategy is configured, which is a method for distributing traffic evenly across nodes. Based on the load balancing strategy, the traffic after being split will be forwarded to the public cloud and / or private cloud respectively; The system acquires and updates various resource information of traffic in public and private clouds for analysis to determine the type of traffic and record it. The resource information includes storage cloud type, memory, CPU information, IP, disk and bandwidth. The traffic scheduling strategy is reconfigured based on the recorded traffic type, and the load balancing strategy is adjusted. The traffic scheduling strategy is a method for combining and forwarding different types of traffic. The step of routing the received traffic and configuring a load balancing strategy includes: Traffic is routed based on the URL and security requirements; Configure round-robin, weighted average, or IP hash as the load balancing strategy; The process of routing the received traffic and configuring a load balancing strategy further includes: The load balancing effect is detected and recorded, and the traffic scheduling strategy is initially adjusted based on the load balancing effect. The traffic scheduling strategy is a method for combining and forwarding different types of traffic. Obtain various resource information of traffic in public and private clouds, including storage cloud type, memory, CPU information, IP, disk and bandwidth.
2. The load balancing method according to claim 1, characterized in that, The process of reconfiguring the traffic scheduling strategy based on the recorded traffic type and adjusting the load balancing strategy further includes: The time of received traffic is statistically analyzed to determine the patterns of peaks and troughs in the received traffic.
3. The load balancing method according to claim 2, characterized in that, The process of statistically analyzing the received traffic over time to determine the patterns of peaks and troughs in the received traffic also includes: The peak value of unreceived traffic is predicted based on the pattern of peaks and troughs in received traffic.
4. The load balancing method according to claim 3, characterized in that, The method of predicting the peak value of unreceived traffic based on the pattern of peaks and troughs in received traffic further includes: By combining the predicted results of resource costs, traffic types, and traffic peaks, operational basis is provided for scaling up and down nodes; Based on the prediction results, monitor and record the utilization rate of various resource information when the traffic reaches its peak.
5. A load balancing device, applied to a load balancer, characterized in that, include: The strategy configuration module is used to distribute the received traffic and configure the load balancing strategy, which is a way to distribute the traffic load evenly across the nodes. The policy execution module is used to forward the traffic after it has been split to the public cloud and / or private cloud according to the load balancing policy. The resource monitoring module is used to acquire and update various resource information of traffic in public and private clouds for analysis, so as to determine the type of traffic and make a record. The resource information includes storage cloud type, memory, CPU information, IP, disk and bandwidth. The resource management module is used to reconfigure the traffic scheduling strategy and adjust the load balancing strategy according to the recorded traffic type. The traffic scheduling strategy is a method for combining and forwarding different types of traffic. The step of routing the received traffic and configuring a load balancing strategy includes: Traffic is routed based on the URL and security requirements; Configure round-robin, weighted average, or IP hash as the load balancing strategy; The process of routing the received traffic and configuring a load balancing strategy further includes: The load balancing effect is detected and recorded, and the traffic scheduling strategy is initially adjusted based on the load balancing effect. The traffic scheduling strategy is a method for combining and forwarding different types of traffic. Obtain various resource information of traffic in public and private clouds, including storage cloud type, memory, CPU information, IP, disk and bandwidth.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 4.
Citation Information
Patent Citations
Multi-queue peak-alternation scheduling model and multi-queue peak-alteration scheduling method based on task classification in cloud computing
CN104657221A
Shunting scheduling method, device and system and computer readable storage medium
CN112437015A