A server node scheduling method, device, equipment and storage medium

By calculating the weight and allocation probability based on the initial bandwidth of the server node, and determining the allocation upper limit based on bandwidth data and target factors, the problem of inaccurate node scheduling in the existing technology is solved, and service quality and utilization are improved.

CN115102958BActive Publication Date: 2024-09-06SHENZHEN ONETHING TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202210687927.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2024-09-06
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

Existing server node scheduling methods cannot achieve precise control of node scheduling, resulting in reduced service capabilities.

Method used

By determining the weight based on the initial configuration bandwidth of each node in the server cluster, calculating the allocation probability, pre-allocating the target node, and judging whether the allocation upper limit is reached based on the bandwidth data and target factors of the target node, if not, the user access request is allocated and adjusted Bandwidth and weight to achieve balanced node utilization.

Benefits of technology

It achieves precise control over node scheduling, avoids high load on a single node, ensures service quality, and maximizes node utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115102958B
    Figure CN115102958B
Patent Text Reader

Abstract

The present application discloses a server node scheduling method, device, equipment and storage medium, and relates to the field of node scheduling. The method includes: determining the weight of each node according to the initial configuration bandwidth corresponding to each node in the server cluster; obtaining the allocation probability corresponding to each node according to the weight, and pre-allocating the corresponding target node for the user access request according to the allocation probability; judging whether the target node has reached the allocation upper limit based on the current bandwidth data and target factor of the target node; the target factor is an adjustable parameter determined based on the allocation amount and full rate of the target node; if the target node has not reached the allocation upper limit, the user access request is allocated to the target node for processing. The node utilization can be balanced, and the total service amount can be prevented from exceeding the node load capacity, so as to achieve precise control of node scheduling and ensure the quality of service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of node scheduling, and in particular to a server node scheduling method, device, equipment and storage medium. Background Art

[0002] Currently, server node scheduling is usually performed based on the service bandwidth of CDN (Content Delivery Network) nodes, which makes it impossible to achieve precise control over node scheduling and reduces service capabilities. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a server node scheduling method, device, equipment and medium, which can achieve accurate control of node scheduling and ensure node service quality. The specific scheme is as follows:

[0004] In a first aspect, the present application discloses a server node scheduling method, comprising:

[0005] Determine the weight of each node according to the initial configuration bandwidth corresponding to each node in the server cluster;

[0006] Obtaining the allocation probability corresponding to each node according to the weight, and pre-allocating the corresponding target node for the user access request according to the allocation probability;

[0007] Based on the current bandwidth data and target factor of the target node, determining whether the target node has reached the upper limit of allocation; the target factor is an adjustable parameter determined based on the allocation amount and full utilization rate of the target node;

[0008] If the target node has not reached the allocation upper limit, the user access request is allocated to the target node for processing.

[0009] Optionally, determining the weight of each node according to the initial configuration bandwidth corresponding to each node in the server cluster includes:

[0010] Obtaining an initial configured bandwidth corresponding to each node in the server cluster, and using the initial configured bandwidth as an initial weight of the node;

[0011] Obtaining real-time performance parameters corresponding to each node in the server cluster, and determining parameter values ​​corresponding to each indicator type included in the real-time performance parameters, and preset indicator thresholds corresponding to the indicator type;

[0012] According to the numerical value relationship between the parameter value and the preset indicator threshold and the preset condition judgment rule, judging whether the node meets the weight adjustment condition;

[0013] If it is true, the weight adjustment type corresponding to the node is determined, and the initial weight is adjusted according to the weight adjustment rule corresponding to the weight adjustment type to obtain the weight of the node.

[0014] Optionally, judging whether the node meets the weight adjustment condition according to the numerical value relationship between the parameter value and the preset indicator threshold and a preset condition judgment rule includes:

[0015] If the parameter values ​​within the first preset time period are all greater than the preset indicator threshold, or the parameter values ​​within the first preset time period are all less than the preset indicator threshold, and the time interval from the most recent weight adjustment is greater than the second preset time period, then it is determined that the node meets the weight adjustment condition;

[0016] Accordingly, determining the weight adjustment type corresponding to the node and adjusting the initial weight according to the weight adjustment rule corresponding to the weight adjustment type includes:

[0017] If the parameter values ​​within the first preset time period are all greater than the preset indicator threshold, it is determined that the weight adjustment type corresponding to the node is an increase, and then the initial weight is adjusted according to a preset increase rule; the increase rule includes an increase amplitude and an increase frequency;

[0018] If the parameter values ​​within the first preset time period are all less than the preset indicator threshold, and the time interval from the most recent weight adjustment is greater than the second preset time period, then the weight adjustment type corresponding to the node is determined to be a downward adjustment, and then the initial weight is adjusted according to the preset downward adjustment rules; the downward adjustment rules include the downward adjustment amplitude and the downward adjustment frequency.

[0019] Optionally, after allocating the user access request to the target node for processing, the method further includes:

[0020] Obtaining the actual running volume of the target node;

[0021] The initial configuration bandwidth corresponding to the target node is adjusted according to the actual running volume.

[0022] Optionally, after allocating the user access request to the target node for processing, the method further includes:

[0023] Determine whether all lines of the target node have reached the bandwidth upper limit;

[0024] If not, the full capacity rate of each line that has not reached the bandwidth upper limit is obtained, and the line with the lowest full capacity rate is used as the target line to execute the access request;

[0025] If yes, the step of pre-allocating the corresponding target node for the user access request according to the allocation probability is performed.

[0026] Optionally, judging whether the target node reaches an allocation upper limit based on the current bandwidth data and target factor of the target node includes:

[0027] The actual served bandwidth and the maximum served bandwidth corresponding to the target node are periodically collected at preset intervals, and the actual used bandwidth generated when a single user uses the service is estimated according to the service characteristics of the target node service, so as to obtain the current bandwidth data of the target node;

[0028] Calculate the difference between the maximum service bandwidth and the actual service bandwidth, and the product of the real-time bandwidth data and the target factor, and predict the maximum number of allocations of the target node in the current cycle according to the ratio of the difference to the product;

[0029] The number of allocations of the target node in the current cycle is obtained, and according to the numerical relationship between the number of allocations and the maximum number of allocations, it is determined whether the target node has reached an allocation upper limit.

[0030] Optionally, the process of determining the target factor includes:

[0031] Obtaining a historical target factor corresponding to the target node determined most recently; wherein, if the most recently determined is an initial determination, the value of the historical target factor is a preset initial value for the target node;

[0032] Obtain the average full capacity rate corresponding to the target node within a preset time period;

[0033] If the average full utilization rate is greater than a first preset threshold value, and the full utilization rate increases within the preset time period, the value of the historical target factor is adjusted upward within a preset adjustment range according to a first preset amplitude to determine the target factor currently corresponding to the target node;

[0034] If the average full utilization rate is less than the second preset threshold value and the allocation upper limit is reached within the preset time period, the value of the historical target factor is lowered within the preset adjustment range according to the second preset amplitude to determine the target factor currently corresponding to the target node.

[0035] In a second aspect, the present application discloses a server node scheduling device, comprising:

[0036] A weight determination module, used to determine the weight of each node in the server cluster according to the initial configuration bandwidth corresponding to each node;

[0037] An allocation module, used to obtain an allocation probability corresponding to each node according to the weight, and pre-allocate a corresponding target node for a user access request according to the allocation probability;

[0038] A judgment module, used to judge whether the target node has reached the allocation upper limit based on the current bandwidth data and target factor of the target node; the target factor is an adjustable parameter determined based on the allocation amount and full utilization rate of the target node;

[0039] The scheduling module is used to receive the user access request by using the target node if the target node has not reached the allocation upper limit.

[0040] In a third aspect, the present application discloses an electronic device, comprising:

[0041] Memory, used to store computer programs;

[0042] The processor is used to execute the computer program to implement the aforementioned server node scheduling method.

[0043] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program implements the aforementioned server node scheduling method when executed by a processor.

[0044] In this application, according to the initial configuration bandwidth corresponding to each node in the server cluster, the weight of each node is determined; according to the weight, the allocation probability corresponding to each node is obtained, and the corresponding target node is pre-allocated for the user access request according to the allocation probability; based on the current bandwidth data and target factor of the target node, it is judged whether the target node has reached the allocation upper limit; the target factor is an adjustable parameter determined based on the allocation amount and full rate of the target node; if the target node has not reached the allocation upper limit, the user access request is allocated to the target node for processing. It can be seen that first, a probability weight allocation is performed with the initial configuration bandwidth of the node as the weight, which can balance the node utilization and avoid high load on a single node. Then, based on the bandwidth data and the target factor, whether the node has reached the allocation upper limit, that is, whether it can still be allocated, if it can be allocated, the node is used to receive the user access request, which can avoid the total amount of service being too high and exceeding the node load capacity, and achieve accurate control of node scheduling, and ensure the quality of service, so as to maximize the node utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0046] Figure 1 A flow chart of a server node scheduling method provided by this application;

[0047] Figure 2 A specific node scheduling system structure diagram provided for this application;

[0048] Figure 3 A specific server node line scheduling method flow chart provided in this application;

[0049] Figure 4 A flowchart of a specific node weight determination method provided in this application;

[0050] Figure 5 A schematic diagram of the structure of a server node scheduling device provided in this application;

[0051] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] In the prior art, server node scheduling is usually performed based on the service bandwidth of the CDN node, which cannot achieve precise control of node scheduling and reduces service capabilities. In order to overcome the above technical problems, the present application proposes a server node scheduling method that can achieve precise control of node scheduling and ensure node service quality.

[0054] The present application embodiment discloses a server node scheduling method, see Figure 1 As shown, the method may include the following steps:

[0055] Step S11: Determine the weight of each node in the server cluster according to the initial configuration bandwidth corresponding to each node.

[0056] In this embodiment, firstly, the weight of each node is determined according to the initial configuration bandwidth corresponding to each node in the server cluster, that is, the initial bandwidth of the node is used as the weight.

[0057] Step S12: Obtaining the allocation probability corresponding to each node according to the weight, and pre-allocating the corresponding target node for the user access request according to the allocation probability.

[0058] In this embodiment, after the weight is determined, the allocation probability corresponding to each node is obtained according to the weight, and then the corresponding target node is pre-allocated for the current user access request according to the allocation probability. This is equivalent to allocating according to the initial bandwidth of the node. The number of times the node is allocated is positively correlated with the initial bandwidth, that is, the higher the initial bandwidth, the greater the probability of the node being allocated, and the initial node utilization rate can be roughly consistent in turn, avoiding excessive utilization of a single node, resulting in a decrease in node quality.

[0059] In this embodiment, the allocation probability corresponding to each node is obtained according to the weight, and the corresponding target node is pre-allocated for the user access request according to the allocation probability, which may include: based on the weight corresponding to each node, a node ring is constructed using a consistent hashing algorithm; the node ring represents the allocation probability corresponding to each node; and the corresponding target node is allocated to the obtained user access request using the node ring. That is, based on the consistent hashing algorithm, a node ring for allocating probability is constructed with the initial bandwidth as the weight, and after the construction, node pre-allocation is performed.

[0060] Step S13: Based on the current bandwidth data and target factor of the target node, determine whether the target node has reached the allocation upper limit; the target factor is an adjustable parameter determined based on the allocation amount and full utilization rate of the target node.

[0061] In this embodiment, the target node is first pre-allocated according to the weight probability, that is, at this time it is not certain that the target node will be used to receive the request in the end, and it is also necessary to determine whether the node can still support the response. It is understandable that due to the sudden and unpredictable user requests, if the node request volume exceeds the maximum load capacity of the node pool, and each user is responded to, it will cause all nodes to be in a high load state, which will lead to a decrease in node service capacity and poor service quality. Therefore, it is necessary to determine whether the target node has reached the allocation limit.

[0062] In this embodiment, judging whether the target node has reached the upper limit of allocation based on the current bandwidth data and target factor of the target node may include: periodically collecting the actual served bandwidth and the maximum service bandwidth corresponding to the target node at preset intervals, and estimating the actual bandwidth used when a single user uses the service according to the business characteristics of the target node service, so as to obtain the current bandwidth data of the target node; calculating the difference between the maximum service bandwidth and the actual served bandwidth, and the product of the real-time bandwidth data and the target factor, and predicting the maximum number of allocations of the target node in the current period according to the ratio of the difference to the product; obtaining the number of allocations of the target node in the current period, and judging whether the target node has reached the upper limit of allocation according to the numerical relationship between the number of allocations and the maximum number of allocations.

[0063] That is, node data is collected periodically at preset intervals to obtain the actual bandwidth served by the current node (cur_band) and the maximum bandwidth that the node can serve (max_band); and based on the characteristics of the service business, the actual bandwidth that a single user can generate (band_per_req) is evaluated. Due to user differences, this bandwidth is not a completely constant value. The number of times the node has been allocated in the current collection cycle (alloc_cnt) is counted again in each cycle to record the number of times the node has been allocated. Then, the maximum number of allocations in the current cycle of the node is predicted (predict_cnt), predict_cnt = (max_band-cur_band) / (band_per_req*factor), factor is the target factor, and the target factor is a real-time automatic adjustable parameter determined based on the allocation amount and full rate of the target node, that is, the value can be automatically adjusted up and down according to the current allocation amount and full rate. In short, if the evaluation of the number of allocations is too small, resulting in the full rate failing to meet the standard, then the factor is lowered to increase the maximum number of allocations; if the evaluation of the number of allocations is too large, resulting in a high load of the full rate, then the factor is raised to reduce the maximum number of allocations, and finally a relatively smooth running volume curve is achieved. Finally, it is determined whether the number of allocations has reached the upper limit. If alloc_cnt>predict_cnt, it indicates that the number of allocations of the node has reached the upper limit, and the node cannot continue to allocate, otherwise the node can continue to allocate.

[0064] In this embodiment, the process of determining the target factor may include: obtaining the historical target factor corresponding to the target node determined most recently; wherein, if the most recent determination is the initial determination, the value of the historical target factor is a preset initial value for the target node; obtaining the average full utilization rate corresponding to the target node within a preset time period; if the average full utilization rate is greater than a first preset threshold value, and the full utilization rate increases within the preset time period, then the value of the historical target factor is increased within a preset adjustment range according to a first preset amplitude to determine the target factor currently corresponding to the target node; if the average full utilization rate is less than a second preset threshold value, and the allocation upper limit is reached within the preset time period, then the value of the historical target factor is decreased within a preset adjustment range according to a second preset amplitude to determine the target factor currently corresponding to the target node.

[0065] It can be understood that factor is maintained by each node and is not a shared parameter. Each node is pre-set with an initial value of factor, and the initial values ​​of all nodes can be the same. At the same time, the change interval [min, max] of factor will be set, and factor will be adjusted in this interval. In this embodiment, the adjustment period of factor can be the period of node data collection, such as 5s, and 5s is also the period of data collection, that is, the node's full rate data will be regularly updated every 5s, where the full rate is the current actual running bandwidth / bandwidth upper limit. Each cycle will determine whether factor is adjusted up, down or maintained. Among them, the upward adjustment condition is that the average full rate corresponding to the target node in the preset time period is greater than the first preset threshold, and the full rate increases in the preset time period. The above preset time period can be three consecutive data collection cycles, and the first preset threshold can be 90% of the maximum running bandwidth, that is, if the running bandwidth for three consecutive cycles is greater than 90% of the maximum running bandwidth, and the running bandwidth continues to be in an upward state, it means that the allocation is too much, then increase factor, and the change range is a configuration fixed step size. The increase in factor means that the current factor value is too small, the running volume is too high, and the allocation needs to be reduced. The downgrade condition is that the average full rate corresponding to the target node in the preset time period is less than the second preset threshold, and the allocation limit is reached in the preset time period, that is, if the running bandwidth is less than 90% of the maximum running bandwidth for three consecutive cycles, and the three cycles are prohibited from allocation, and the distance from the last increase period exceeds the preset configuration value, the above preset configuration value can be 5 minutes, and the configuration value is mainly to avoid a downgrade just after the increase, because there will be some fluctuations after the increase, at this time, the factor is reduced, and the change range is also a configuration fixed step. In other words, the running volume is low in several cycles, but due to the limitation of the maximum number of allocations, the running volume cannot be further allocated to increase, so the factor is lowered, which means that the current factor value is too large, the control is too strict, and the running volume is too low.

[0066] For example Figure 2 As shown, the server node can be scheduled and allocated after registration. The above scheduling method is applied to the quality scheduling center and is suitable for the scenario of renting service nodes. In order to maximize the utilization of the rented service nodes when the load can be supported, the target node is first pre-allocated based on the probability allocation of the initial configuration bandwidth to try to make the tenant income evenly distributed. On this basis, in order to make the service stable and efficient, the target factor is used to judge the operating capacity of the target node, that is, based on the node's bandwidth data, allocation amount, and full rate, it is judged whether the node can process the request.

[0067] Step S14: If the target node has not reached the allocation upper limit, the user access request is allocated to the target node for processing.

[0068] In this embodiment, if the target node has not reached the allocation upper limit, that is, the load can support receiving the request, the user access request is allocated to the target node for processing.

[0069] In this embodiment, after assigning the user access request to the target node for processing, it may also include: determining whether all lines of the target node have reached the bandwidth upper limit; if not, obtaining the full capacity rate of each line that has not reached the bandwidth upper limit, and using the line with the lowest full capacity rate as the target line to execute the access request; if so, executing the step of pre-allocating the corresponding target node for the user access request according to the allocation probability. It can be understood that since all nodes have corresponding export bandwidths, for example, if the uplink bandwidth of node A is limited to 1G, then the actual running bandwidth of the node needs to be controlled not to exceed 1G. In addition, node A may have multiple lines, and each line has a corresponding uplink bandwidth upper limit. For example, if node A has 10 lines, the upper limit bandwidth of each line is 100M, and the corresponding actual running bandwidth of each line cannot exceed 100M. Therefore, for example Figure 3 As shown, when a node has multiple lines, after judging whether the node has reached the bandwidth upper limit, that is, judging whether the allocation upper limit has been reached, it is also necessary to judge whether the line of the node has reached the bandwidth upper limit. In addition, to ensure that the running volume of each line is basically the same, the distribution will be based on the real-time full rate collected, and the distribution volume of the line with low full rate will be high, and the distribution volume of the line with high full rate will be small, so as to achieve uniform running volume of each line.

[0070] In this embodiment, after assigning the user access request to the target node for processing, the process may further include: obtaining the actual running volume of the target node; and adjusting the initial configuration bandwidth corresponding to the target node according to the actual running volume. It is understandable that the initial configuration bandwidth can be adjusted according to the actual running volume of the node and the node service situation reported by the customer. For example, if the initial configuration bandwidth is 1G, but the actual running volume is 600M, the initial configuration bandwidth can be lowered according to the actual running volume. Similarly, if the actual running volume is close to or equal to the initial configuration bandwidth, the initial configuration bandwidth can be increased.

[0071] As can be seen from the above, in this embodiment, the weight of each node is determined according to the initial configuration bandwidth corresponding to each node in the server cluster; the allocation probability corresponding to each node is obtained according to the weight, and the corresponding target node is pre-allocated for the user access request according to the allocation probability; based on the current bandwidth data and target factor of the target node, it is judged whether the target node has reached the allocation upper limit; the target factor is an adjustable parameter determined based on the allocation amount and full rate of the target node; if the target node has not reached the allocation upper limit, the user access request is allocated to the target node for processing. It can be seen that first, a probability weight allocation is performed with the initial configuration bandwidth of the node as the weight, which can balance the node utilization and avoid high load on a single node. Then, based on the bandwidth data and the target factor, whether the node has reached the allocation upper limit, that is, whether it can still be allocated, if it can be allocated, the node is used to receive the user access request, which can avoid the total amount of service being too high and exceeding the node load capacity, realize accurate control of node scheduling, and ensure the quality of service, so as to maximize the node utilization.

[0072] Based on the above embodiment, for the above step S11, the present application embodiment discloses a specific method for determining node weights, see Figure 4 As shown, the method may include the following steps:

[0073] Step S21: obtaining the initial configured bandwidth corresponding to each node in the server cluster, and using the initial configured bandwidth as the initial weight of the node.

[0074] In this embodiment, the initial configuration bandwidth corresponding to each node is used as the initial weight of the node.

[0075] Step S22: obtaining the real-time performance parameters corresponding to each node in the server cluster, and determining the parameter value corresponding to each indicator type included in the real-time performance parameters, and the preset indicator threshold corresponding to the indicator type.

[0076] In this embodiment, real-time performance parameters corresponding to each node in the server cluster are also obtained in real time. The above real-time performance parameters include node basic data and business data. The node basic data includes but is not limited to CPU load, retransmission rate, and disk IO. The business data includes but is not limited to user response status code, that is, weight adjustment is performed based on the initial weights based on the above indicators.

[0077] Step S23: judging whether the node meets the weight adjustment condition according to the numerical value relationship between the parameter value and the preset index threshold value and the preset condition judgment rule.

[0078] That is, for each indicator data, according to the corresponding preset indicator threshold, if it exceeds the threshold, it is considered that the node has problems and needs to be downgraded. The preset indicator threshold can be set based on historical data. In addition, for each value of the above basic data and business data, the average data of the last 10 cycles can be used as a judgment indicator.

[0079] In this embodiment, judging whether the node meets the weight adjustment condition according to the numerical value relationship between the parameter value and the preset indicator threshold and the preset condition judgment rule may include: if the parameter value within the first preset time length is greater than the preset indicator threshold, or the parameter value within the first preset time length is less than the preset indicator threshold, and the time interval from the most recent weight adjustment is greater than the second preset time length, then judging that the node meets the weight adjustment condition. For example, if a certain indicator is triggered three times in a row to reach the upper threshold limit, it is judged that the weight needs to be lowered; if it is triggered three times in a row to be less than the upper threshold limit, and there is a certain time interval between the last increase, then it is judged that the weight needs to be increased.

[0080] Step S24: If it is in compliance, the weight adjustment type corresponding to the node is determined, and the initial weight is adjusted according to the weight adjustment rule corresponding to the weight adjustment type to obtain the weight of the node.

[0081] That is, by collecting the basic service data of the nodes and the actual service situation of the customers, the node weights are evaluated and adjusted in real time. Similarly, when the node ring is used for pre-allocation, the node ring will be updated according to the weights fed back in real time.

[0082] In this embodiment, the determination of the weight adjustment type corresponding to the node and the adjustment of the initial weight according to the weight adjustment rule corresponding to the weight adjustment type may include: if the parameter values ​​are all greater than the preset index threshold value within the first preset time length, the weight adjustment type corresponding to the node is determined to be an increase, and then the initial weight is adjusted according to the preset increase rule; the increase rule includes an increase amplitude and an increase frequency; if the parameter values ​​are all less than the preset index threshold value within the first preset time length, and the time interval from the last weight adjustment is greater than the second preset time length, the weight adjustment type corresponding to the node is determined to be a decrease, and then the initial weight is adjusted according to the preset decrease rule; the decrease rule includes a decrease amplitude and a decrease frequency. Among them, the above-mentioned increase rule and decrease rule can be set according to the weight adjustment principle of fast decrease and slow increase. If it is a decrease, the decrease amplitude is 5% each time, and it is continuously decreased within the preset weight change range. It can be understood that if the data does not meet the standard, the weight gradually decreases and eventually decreases to a minimum threshold, which is equivalent to blacklisting the node and no longer using it; if the node indicator is normal, the node weight is restored. By adjusting up and down, we can finally reach a balance value, and a balance value of node running volume and quality. In this way, we can optimize the service quality, make full use of high-quality nodes, and downgrade or blacklist nodes with poor quality, so as to achieve the best effect of user service.

[0083] As can be seen from the above, in this embodiment, the initial configuration bandwidth corresponding to each node in the server cluster is obtained, and the initial configuration bandwidth is used as the initial weight of the node. The real-time performance parameters corresponding to each node in the server cluster are obtained, and the parameter value corresponding to each indicator type contained in the real-time performance parameters and the preset indicator threshold corresponding to the indicator type are determined; according to the numerical size relationship between the parameter value and the preset indicator threshold and the preset condition judgment rule, it is judged whether the node meets the weight adjustment condition; if it meets, the weight adjustment type corresponding to the node is determined, and the initial weight is adjusted according to the weight adjustment rule corresponding to the weight adjustment type to obtain the weight of the node. Therefore, by collecting the real-time performance parameters of the node and evaluating the node weight in real time, the service quality can be optimized, the nodes with higher quality can be fully utilized, and the nodes with poor quality can be downgraded and blacklisted to achieve the best effect on user service.

[0084] Correspondingly, the embodiment of the present application also discloses a server node scheduling device, see Figure 5 As shown, the device comprises:

[0085] The weight determination module 11 is used to determine the weight of each node in the server cluster according to the initial configuration bandwidth corresponding to each node;

[0086] An allocation module 12, configured to obtain an allocation probability corresponding to each node according to the weight, and pre-allocate a corresponding target node for a user access request according to the allocation probability;

[0087] A judgment module 13 is used to judge whether the target node has reached the upper limit of allocation based on the current bandwidth data and target factor of the target node; the target factor is an adjustable parameter determined based on the allocation amount and full utilization rate of the target node;

[0088] The scheduling module 14 is configured to receive the user access request using the target node if the target node has not reached the allocation upper limit.

[0089] As can be seen from the above, in this embodiment, the weight of each node is determined according to the initial configuration bandwidth corresponding to each node in the server cluster; the allocation probability corresponding to each node is obtained according to the weight, and the corresponding target node is pre-allocated for the user access request according to the allocation probability; based on the current bandwidth data and target factor of the target node, it is judged whether the target node has reached the allocation upper limit; the target factor is an adjustable parameter determined based on the allocation amount and full rate of the target node; if the target node has not reached the allocation upper limit, the user access request is allocated to the target node for processing. It can be seen that first, a probability weight allocation is performed with the initial configuration bandwidth of the node as the weight, which can balance the node utilization and avoid high load on a single node. Then, based on the bandwidth data and the target factor, whether the node has reached the allocation upper limit, that is, whether it can still be allocated, if it can be allocated, the node is used to receive the user access request, which can avoid the total amount of service being too high and exceeding the node load capacity, realize accurate control of node scheduling, and ensure the quality of service, so as to maximize the node utilization.

[0090] In some specific embodiments, the weight determination module 11 may specifically include:

[0091] An initial weight determination unit, used to obtain an initial configured bandwidth corresponding to each node in the server cluster, and use the initial configured bandwidth as an initial weight of the node;

[0092] A real-time performance parameter acquisition unit, used to acquire the real-time performance parameters corresponding to each node in the server cluster, and determine the parameter value corresponding to each indicator type included in the real-time performance parameters, and the preset indicator threshold corresponding to the indicator type;

[0093] A weight adjustment condition judgment unit, used to judge whether the node meets the weight adjustment condition according to the numerical value relationship between the parameter value and the preset indicator threshold and the preset condition judgment rule;

[0094] The weight adjustment unit is used to determine the weight adjustment type corresponding to the node if it meets the requirements, and adjust the initial weight according to the weight adjustment rule corresponding to the weight adjustment type to obtain the weight of the node.

[0095] In some specific embodiments, the weight adjustment condition judgment unit can be specifically used to determine that the node meets the weight adjustment condition if the parameter values ​​within the first preset time length are all greater than the preset indicator threshold, or the parameter values ​​within the first preset time length are all less than the preset indicator threshold, and the time interval from the most recent weight adjustment is greater than the second preset time length;

[0096] Accordingly, the weight adjustment unit includes:

[0097] A first adjustment unit, configured to determine that the weight adjustment type corresponding to the node is an increase if the parameter values ​​are all greater than the preset indicator threshold within a first preset time period, and then adjust the initial weight according to a preset increase rule; the increase rule includes an increase amplitude and an increase frequency;

[0098] The second adjustment unit is used to determine that the weight adjustment type corresponding to the node is a downward adjustment if the parameter values ​​within the first preset time period are all less than the preset indicator threshold, and the time interval from the most recent weight adjustment is greater than the second preset time period, and then adjust the initial weight according to the preset downward adjustment rules; the downward adjustment rules include the downward adjustment amplitude and the downward adjustment frequency.

[0099] In some specific embodiments, the server node scheduling device may specifically include:

[0100] An actual running amount obtaining unit, used to obtain the actual running amount of the target node;

[0101] The initial configuration bandwidth adjustment unit is used to adjust the initial configuration bandwidth corresponding to the target node according to the actual running volume.

[0102] In some specific embodiments, the server node scheduling device may specifically include:

[0103] A line bandwidth determination unit, used to determine whether all lines of the target node have reached the bandwidth upper limit;

[0104] a target line determination unit, configured to obtain the full capacity rate of each line that has not reached the bandwidth upper limit if the judgment result of the line bandwidth judgment unit is no, and use the line with the lowest full capacity rate as the target line to execute the access request;

[0105] The target node allocation starting unit is used to execute the step of pre-allocating the corresponding target node for the user access request according to the allocation probability if the judgment result of the line bandwidth judgment unit is yes.

[0106] In some specific embodiments, the determination module 13 may specifically include:

[0107] A bandwidth data acquisition unit, used to periodically collect the actual served bandwidth and the maximum served bandwidth corresponding to the target node at a preset interval, and estimate the actual used bandwidth generated when a single user uses the service according to the service characteristics of the target node service, so as to obtain the current bandwidth data of the target node;

[0108] a maximum allocation times prediction unit, configured to calculate a difference between the maximum service bandwidth and the actual service bandwidth, and a product of the real-time bandwidth data and the target factor, and predict a maximum allocation times of the target node in the current cycle according to a ratio of the difference to the product;

[0109] The allocation upper limit judgment unit is used to obtain the number of allocations of the target node in the current cycle, and judge whether the target node has reached the allocation upper limit according to the numerical relationship between the number of allocations and the maximum number of allocations.

[0110] In some specific embodiments, the server node scheduling device may specifically include:

[0111] A historical target factor acquisition unit, used to acquire the historical target factor corresponding to the target node determined most recently; wherein, if the most recent determination is an initial determination, the value of the historical target factor is a preset initial value for the target node;

[0112] An average full utilization rate acquisition unit, used to acquire an average full utilization rate corresponding to the target node within a preset time period;

[0113] an upward adjustment unit, configured to increase the value of the historical target factor within a preset adjustment range according to a first preset amplitude if the average full utilization rate is greater than a first preset threshold value and the full utilization rate increases within the preset time period, so as to determine the target factor currently corresponding to the target node;

[0114] The downward adjustment unit is used to adjust the value of the historical target factor downward within the preset adjustment range according to the second preset amplitude if the average full utilization rate is less than the second preset threshold value and the allocation upper limit is reached within the preset time period, so as to determine the target factor currently corresponding to the target node.

[0115] Furthermore, the present application also discloses an electronic device, see Figure 6 As shown, the contents in the drawings should not be considered as any limitation on the scope of use of the present application.

[0116] Figure 6A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the server node scheduling method disclosed in any of the aforementioned embodiments.

[0117] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0118] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222, and data 223 including allocation probabilities, etc. The storage method can be temporary storage or permanent storage.

[0119] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the server node scheduling method executed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0120] Furthermore, an embodiment of the present application also discloses a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the server node scheduling method steps disclosed in any of the aforementioned embodiments are implemented.

[0121] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0122] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0123] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0124] The above is a detailed introduction to a server node scheduling method, device, equipment and medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A server node scheduling method, characterized in that: include: Determine the weight of each node according to the initial configuration bandwidth corresponding to each node in the server cluster; Obtaining the allocation probability corresponding to each node according to the weight, and pre-allocating the corresponding target node for the user access request according to the allocation probability; Based on the current bandwidth data and target factor of the target node, determining whether the target node has reached an allocation upper limit; The target factor is an adjustable parameter determined based on the allocation amount and the full utilization rate of the target node; the full utilization rate is the current actual running bandwidth / bandwidth upper limit; If the target node has not reached the allocation upper limit, the user access request is allocated to the target node for processing; The step of judging whether the target node reaches an allocation upper limit based on the current bandwidth data and the target factor of the target node includes: The actual served bandwidth and the maximum served bandwidth corresponding to the target node are periodically collected at preset intervals, and the actual used bandwidth generated when a single user uses the service is estimated according to the service characteristics of the target node service, so as to obtain the current bandwidth data of the target node; Calculate the difference between the maximum service bandwidth and the actual service bandwidth, and the product of the current bandwidth data of the target node and the target factor, and predict the maximum number of allocations of the target node in the current cycle according to the ratio of the difference to the product; Obtaining the number of allocations of the target node in the current cycle, and judging whether the target node has reached the upper limit of allocations according to the numerical relationship between the number of allocations and the maximum number of allocations; The process of determining the target factor includes: Obtaining a historical target factor corresponding to the target node determined most recently; wherein, if the most recently determined is an initial determination, the value of the historical target factor is a preset initial value for the target node; Obtain the average full capacity rate corresponding to the target node within a preset time period; If the average full utilization rate is greater than a first preset threshold value, and the full utilization rate increases within the preset time period, the value of the historical target factor is adjusted upward within a preset adjustment range according to a first preset amplitude to determine the target factor currently corresponding to the target node; If the average full utilization rate is less than the second preset threshold value and the allocation upper limit is reached within the preset time period, the value of the historical target factor is lowered within the preset adjustment range according to the second preset amplitude to determine the target factor currently corresponding to the target node.

2. The server node scheduling method according to claim 1, characterized in that: Determining the weight of each node according to the initial configuration bandwidth corresponding to each node in the server cluster includes: Obtaining an initial configured bandwidth corresponding to each node in the server cluster, and using the initial configured bandwidth as an initial weight of the node; Obtaining real-time performance parameters corresponding to each node in the server cluster, and determining parameter values ​​corresponding to each indicator type included in the real-time performance parameters, and preset indicator thresholds corresponding to the indicator type; According to the numerical value relationship between the parameter value and the preset indicator threshold and the preset condition judgment rule, judging whether the node meets the weight adjustment condition; If it is true, the weight adjustment type corresponding to the node is determined, and the initial weight is adjusted according to the weight adjustment rule corresponding to the weight adjustment type to obtain the weight of the node.

3. The server node scheduling method according to claim 2, characterized in that: The determining whether the node meets the weight adjustment condition according to the numerical value relationship between the parameter value and the preset indicator threshold and the preset condition determination rule includes: If the parameter values ​​within the first preset time period are all greater than the preset indicator threshold, or the parameter values ​​within the first preset time period are all less than the preset indicator threshold, and the time interval from the most recent weight adjustment is greater than the second preset time period, then it is determined that the node meets the weight adjustment condition; Accordingly, determining the weight adjustment type corresponding to the node and adjusting the initial weight according to the weight adjustment rule corresponding to the weight adjustment type includes: If the parameter values ​​within the first preset time period are all greater than the preset indicator threshold, it is determined that the weight adjustment type corresponding to the node is an increase, and then the initial weight is adjusted according to a preset increase rule; the increase rule includes an increase amplitude and an increase frequency; If the parameter values ​​within the first preset time period are all less than the preset indicator threshold, and the time interval from the most recent weight adjustment is greater than the second preset time period, then the weight adjustment type corresponding to the node is determined to be a downward adjustment, and then the initial weight is adjusted according to the preset downward adjustment rules; the downward adjustment rules include the downward adjustment amplitude and the downward adjustment frequency.

4. The server node scheduling method according to claim 1, characterized in that: After allocating the user access request to the target node for processing, the method further includes: Obtaining the actual running volume of the target node; The initial configuration bandwidth corresponding to the target node is adjusted according to the actual running volume.

5. The server node scheduling method according to claim 1, characterized in that: After allocating the user access request to the target node for processing, the method further includes: Determine whether all lines of the target node have reached the bandwidth upper limit; If not, the full capacity rate of each line that has not reached the bandwidth upper limit is obtained, and the line with the lowest full capacity rate is used as the target line to execute the access request; If yes, the step of pre-allocating the corresponding target node for the user access request according to the allocation probability is performed.

6. A server node scheduling device, characterized in that: include: A weight determination module, used to determine the weight of each node in the server cluster according to the initial configuration bandwidth corresponding to each node; An allocation module, used to obtain an allocation probability corresponding to each node according to the weight, and pre-allocate a corresponding target node for a user access request according to the allocation probability; A judgment module, used to judge whether the target node has reached an allocation upper limit based on the current bandwidth data and target factor of the target node; The target factor is an adjustable parameter determined based on the allocation amount and the full utilization rate of the target node; the full utilization rate is the current actual running bandwidth / bandwidth upper limit; A scheduling module, configured to receive the user access request using the target node if the target node has not reached the allocation upper limit; The judgment module is further used to periodically collect the actual served bandwidth and the maximum service bandwidth corresponding to the target node at preset intervals, and estimate the actual bandwidth used when a single user uses the service according to the service characteristics of the target node service, so as to obtain the current bandwidth data of the target node; calculate the difference between the maximum service bandwidth and the actual served bandwidth, and the product of the current bandwidth data of the target node and the target factor, and predict the maximum number of allocations of the target node in the current period according to the ratio of the difference to the product; obtain the number of allocations of the target node in the current period, and judge whether the target node has reached the allocation upper limit according to the numerical relationship between the number of allocations and the maximum number of allocations; Among them, the determination process of the target factor includes: obtaining the historical target factor corresponding to the target node determined most recently; wherein, if the most recent determination is the initial determination, the value of the historical target factor is a preset initial value for the target node; obtaining the average full capacity rate corresponding to the target node within a preset time period; if the average full capacity rate is greater than a first preset threshold value, and the full capacity rate increases within the preset time period, then the value of the historical target factor is increased within a preset adjustment range according to a first preset amplitude to determine the target factor currently corresponding to the target node; if the average full capacity rate is less than a second preset threshold value, and the allocation upper limit is reached within the preset time period, then the value of the historical target factor is decreased within a preset adjustment range according to a second preset amplitude to determine the target factor currently corresponding to the target node.

7. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the server node scheduling method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein when the computer programs are executed by a processor, the server node scheduling method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Request scheduling method, system, electronic device and storage medium

    CN109032801A

  • Data scheduling method and device and computer readable storage medium

    CN110290009A

  • Node adjustment method and related equipment thereof

    CN110769272A

  • Intelligent gateway method and system based on distributed object storage

    CN112422610A

  • Service data load balancing method and device

    CN113504974A