CN110795250B - Load scheduling method, device, equipment and storage medium - Google Patents

Load scheduling method, device, equipment and storage medium Download PDF

Info

Publication number
CN110795250B
CN110795250B CN201911047958.5A CN201911047958A CN110795250B CN 110795250 B CN110795250 B CN 110795250B CN 201911047958 A CN201911047958 A CN 201911047958A CN 110795250 B CN110795250 B CN 110795250B
Authority
CN
China
Prior art keywords
load
sub
node
loads
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911047958.5A
Other languages
Chinese (zh)
Other versions
CN110795250A (en
Inventor
任长城
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911047958.5A priority Critical patent/CN110795250B/en
Publication of CN110795250A publication Critical patent/CN110795250A/en
Application granted granted Critical
Publication of CN110795250B publication Critical patent/CN110795250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Abstract

The application discloses a load scheduling method, a device, equipment and a storage medium, and relates to the technical field of communication, wherein the method comprises the following steps: when the load of a first node is higher than a scheduling condition, acquiring a load set to be scheduled on the first node; splitting the load set into n sub-loads; determining at least two sets of candidate allocation schemes for allocating the n sub-loads to other nodes; determining a target allocation scheme in the at least two groups of candidate allocation schemes, wherein the target allocation scheme is the allocation scheme with the largest minimum residual capacity value corresponding to the other nodes; and distributing the n sub-loads to the other nodes according to the target distribution scheme. The application provides a load scheduling method for a routing system in a server, which ensures that when routing switching occurs, as few loads as possible are affected, reduces the frequency of load distribution operation and is beneficial to the stability of the routing system.

Description

Load scheduling method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a load scheduling method, apparatus, device, and storage medium.
Background
Many background service solutions require distributed deployment of servers, often requiring support by a routing system when the background services deployed on different servers communicate. In the routing system, a node that assumes a traffic forwarding task generated by a service process of a background service is referred to as a routing node (hereinafter simply referred to as a node). In a routing system, there are multiple nodes, each carrying traffic that is a fraction of the total traffic.
When traffic on a certain node is too large to bear the weight of the traffic, a part of the traffic borne by the traffic needs to be transferred to other nodes, and the process is called load scheduling. The process of distributing a portion of the diverted traffic among the remaining nodes within the routing system is referred to as load distribution. In the related art, a maximum margin allocation scheme is adopted, and in a load scheduling stage, transferable load sets are selected on high load nodes, and the load sets are ordered from small to large, namely L 1 ,L 2 ,L 3 ,…,L n . In the load distribution stage, selecting a node R with the largest load margin from the rest nodes m The smallest load set L 1 Transfer to node R m And (5) going up.
In the above load distribution scheme, if the load margin is the largest node R m Yet insufficient to carry the minimum load set L 1 If so, the load distribution fails; meanwhile, the transferred load set is distributed to one node, so that the load of the node is easier to exceed the safety limit again, and the load needs to be frequently adjusted, which is not beneficial to the stability of the routing system.
Disclosure of Invention
The embodiment of the application provides a load scheduling method, device, equipment and storage medium, which can be used for solving the problems that a security limit is easy to appear again when a load set is distributed to a transfer, so that the load needs to be frequently adjusted, and a routing system is unstable. The technical scheme is as follows:
according to one aspect of the present application, there is provided a load scheduling method, the method comprising:
when the load of a first node is higher than a scheduling condition, acquiring a load set to be scheduled on the first node;
splitting the load set into n sub-loads;
determining at least two sets of candidate allocation schemes for allocating the n sub-loads to other nodes;
determining a target allocation scheme in the at least two groups of candidate allocation schemes, wherein the target allocation scheme is the allocation scheme with the largest minimum residual capacity value corresponding to the other nodes;
and distributing the n sub-loads to the other nodes according to the target distribution scheme.
In an alternative embodiment, determining at least two sets of candidate allocation schemes for allocating n sub-loads includes: when the ith sub-load in the n sub-loads is not greater than the residual capacity of the second node, the ith sub-load is distributed to the second node, and the second node is one of other nodes, so that at least one group of ith candidate distribution for distributing the ith sub-load is obtained; when i is not equal to n, adding one to i, and then executing the previous step again to obtain at least one group of i+1 candidate allocation for allocating the i+1 sub-load; combining all candidate allocations between the 1 st sub-load and the nth sub-load to obtain at least two groups of candidate allocation schemes for allocating the n sub-loads; wherein n is an integer greater than 1, and i is an integer no greater than n.
In an alternative embodiment, the at least one set of i+1 candidate allocations for the i+1 th sub-load is obtained by allocating the i+1 th sub-load to the second node according to the at least one set of i candidate allocations for the i-th sub-load.
In an alternative embodiment, when the ith sub-load of the n sub-loads is not greater than the remaining capacity of the second node, the method includes: when the ith sub-load is not greater than the residual capacity of the second node, the ith sub-load is moved out of the load set and is distributed to the second node; and updating the residual capacity of the second node.
In an alternative embodiment, splitting the load set into n sub-loads includes: dividing the loads in the load set into n sub-loads according to the load independence; and sequencing the n sub-loads according to the sizes of the loads to obtain a sequenced load set.
In an optional embodiment, when the ith sub-load is greater than the remaining capacity of the second node, the ith sub-load is not moved out of the load set, the current allocation to the load set is ended, and the candidate allocation scheme corresponding to the current allocation is discarded.
According to one aspect of the present application, there is provided a load distribution apparatus comprising: the device comprises an acquisition module, a splitting module and an allocation module;
the acquisition module is configured to acquire a load set to be scheduled on the first node when the load of the first node is higher than the condition;
a splitting module configured to split the load set into n sub-loads;
a distribution module configured to distribute an ith sub-load to a second node, which is a node having a maximum remaining capacity, when the ith sub-load of the n sub-loads is not greater than the remaining capacity of the second node;
the distribution module is configured to add one to i and then execute the previous step again when i is not equal to n;
wherein n is an integer greater than 1, and i is an integer no greater than n.
In another aspect, a computer device is provided, the computer device including a processor and a memory, where the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, and the at least one instruction, the at least one program, the set of codes, or the set of instructions are loaded and executed by the processor to implement a load scheduling method as provided in an embodiment of the present application.
In another aspect, a computer readable storage medium is provided, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored, where the at least one instruction, the at least one program, the set of codes, or the set of instructions are loaded and executed by the processor to implement a load scheduling method as provided in an embodiment of the present application.
In another aspect, a computer program product is provided which, when run on a computer, causes the computer to perform the load scheduling method as provided in the embodiments of the present application described above.
The beneficial effects that technical scheme that this application embodiment provided include at least:
the load set to be scheduled is split into the sub-loads, the sub-loads are distributed to other nodes, so that the load as little as possible is affected when the route switching occurs, the frequency of load distribution operation is reduced, the load set to be shifted out is prevented from being distributed to one node, the load of the node exceeds a safety limit, the load is distributed again, and meanwhile, the target distribution scheme with the maximum minimum residual capacity value corresponding to the other nodes is determined, so that the stability of the routing system is facilitated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a routing system provided in an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a load scheduling method provided by an exemplary embodiment of the present application;
FIG. 3 is a flow chart of a load scheduling method provided by an exemplary embodiment of the present application;
FIG. 4 is a flow chart of a load scheduling method provided by an exemplary embodiment of the present application;
FIG. 5 is a flow chart of a load scheduling method provided by an exemplary embodiment of the present application;
FIG. 6 is a block diagram of a load scheduling apparatus provided by an exemplary embodiment of the present application;
fig. 7 is a block diagram of a routing node according to an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, the terms involved in the embodiments of the present application will be briefly described:
route (routing): an activity of transferring information from a source address to a destination address over an interconnected network. The hardware corresponding to the route is called a router. Routing typically directs packet forwarding according to a routing table (a table of best paths stored to each destination).
And a routing node (router), namely a node which specifically bears a traffic forwarding task in the routing system, and is called the node for short.
Cluster (cluster): several nodes in the service network that together perform a certain function are collectively referred to as a cluster.
Load scheduling (load scheduling): the nodes for butting front-end traffic form a cluster, each node shares a part of the total traffic, and when the traffic on a certain node is too large to bear the load, a part of the load traffic needs to be transferred to other nodes, and the process is called load scheduling.
Load dispatch: when the load of a node in a cluster is too high, part of the load of the node needs to be transferred to other nodes to reduce the risk of overload of the node, and the process of distributing the transferred load among other nodes in the cluster is called load distribution.
Fig. 1 shows a schematic diagram of a routing system according to an exemplary embodiment of the present application, where the implementation environment includes a plurality of nodes 120, and the plurality of nodes 120 provide routing services for a service process 140.
A large number of nodes 120 form a cluster.
n nodes 120 (R1-Rn) carry traffic for m service processes 140 (C1-Cm). One service process 140 corresponds to one load set. The more service processes a node carries, the higher the load level of the node.
In the example shown in fig. 1, the node R1 carries traffic of the service process C1, and the node Rn carries traffic of the service process Cm. The node R2 carries traffic of three service processes C2, C4, C5. The load level carried by node R2 has reached a dangerous level and it is necessary to transfer part of the load to other nodes within the cluster.
Fig. 2 shows a flowchart of a load scheduling method according to an exemplary embodiment of the present application, which is applied to a first node in a routing system including a plurality of nodes as shown in fig. 1, where the first node is any node in the routing system. The method comprises the following steps:
step 201, when the load of the first node is higher than the scheduling condition, acquiring a load set to be scheduled on the first node;
the routing system includes a plurality of nodes. The nodes are in charge of forwarding traffic generated by the service process in the routing system.
The first node is a node above a scheduling condition among a plurality of nodes in the routing system.
Alternatively, the scheduling condition is N% of the node capacity value (bearer capability). The value of N is system default or, alternatively, the value of N is administrator set.
Illustratively, N is 90, and the scheduling condition is 90% of the node's bearing capacity. When a node is currently loaded by more than 90% of its load-bearing capacity, the node is defined as the first node and a portion of the load of the node needs to be distributed to other nodes.
Optionally, after the obtained load set to be scheduled on the first node is distributed to other nodes, the load of the first node is lower than the scheduling condition.
Step 202, splitting a load set into n sub-loads;
the set of loads is a set of loads determined to be distributed from the first node to other nodes.
Optionally, the load set is a load corresponding to a service process carried by the first node.
Optionally, the loads in the load set are split into n sub-loads. The n sub-loads are independent from each other, i.e. the distribution of the n sub-loads to different nodes does not affect the service process of the front end. The n sub-loads may be ordered or unordered.
Exemplary, the load set Li is { Li 1 ,Li 2 ,…,Li n Comprises n sub-loads Li 1 To Li (lithium) n
Step 203, determining at least two groups of candidate allocation schemes for allocating n sub-loads to other nodes;
the candidate allocation scheme is an allocation scheme that successfully allocates n sub-loads to other nodes. The other nodes are nodes of the node cluster other than the first node.
It should be noted that, n sub-loads are allocated to at least two sets of candidate allocation schemes on other nodes. The candidate allocation scheme includes relevant information of the node to which each sub-load is allocated.
Step 204, determining a target allocation scheme in at least two groups of candidate allocation schemes, wherein the target allocation scheme is the allocation scheme with the largest minimum residual capacity value corresponding to other nodes;
the target allocation scheme is an allocation scheme determined from the candidate allocation schemes.
Illustratively, there are 3 sets of candidate allocation schemes: candidate allocation scheme 1, candidate allocation scheme 2, and candidate allocation scheme 3. Of the remaining capacity values of all the nodes in the candidate allocation scheme 1, the remaining capacity value C1 of the node R1 is the smallest. Of the remaining capacity values of all the nodes in the candidate allocation scheme 2, the remaining capacity value C2 of the node R2 is the smallest. Of the remaining capacity values of all the nodes in the candidate allocation scheme 3, the remaining capacity value C3 of the node R3 is the smallest. Of C1, C2 and C3, C1 is the largest. The allocation scheme having the largest value of the minimum remaining capacity among the 3 sets of candidate allocation schemes is the candidate allocation scheme 1, i.e., the target allocation scheme is the candidate allocation scheme 1.
Optionally, the routing system will distribute n sub-loads in the load set that needs to be transferred by the first node to other nodes according to the target distribution scheme.
After one sub-load is allocated to the other node, the remaining capacity value of that node will decrease.
Illustratively, there are m other nodes (R1 to Rm) in the routing system, with corresponding residual capacity values { C1, C2,..cm }.
In summary, according to the method provided by the embodiment, the load set to be scheduled is split into the sub-loads, and the sub-loads are distributed to other nodes, so that as few loads as possible are affected when the route is switched, the frequency of performing load distribution operation is reduced, the load set transferred out is prevented from being distributed to one node, the load of the node exceeds the safety limit, so that the load is distributed again, and meanwhile, the target distribution scheme with the maximum minimum residual capacity value corresponding to other nodes is determined, so that the stability of the routing system is facilitated.
Referring to fig. 3 in combination, in an alternative embodiment based on fig. 2, fig. 3 illustrates a load scheduling method according to an exemplary embodiment of the present application, which is applied to a routing system including a plurality of nodes. In the present embodiment, step 203 is instead implemented as step 2031, step 2032 and step 2033:
step 2031, when the ith sub-load of the n sub-loads is not greater than the remaining capacity of the second node, allocating the ith sub-load to the second node, where the second node is one of the other nodes, to obtain at least one group of ith candidate allocations for allocating the ith sub-load;
the ith candidate allocation is used to indicate allocation of the ith sub-load to the second node.
Alternatively, in the current routing system, the set of loads to be scheduled is Li, which is Li including n sub-loads 1 To Li (lithium) n {Li 1 ,Li 2 ,…,Li n }. There are m other nodes (R1 to Rm) in the routing system, the values of the residual capacities corresponding to the nodes R1 to Rm are { C1, C2, & gt, cm }. Wherein m is an integer.
Exemplary, the ith sub-load Li allocated i If the remaining capacity value of the node R1, R2 and Rm is not greater than the remaining capacity value, the ith sub-load Li is allocated i There are 3 sets of i-th candidate allocations, respectively: will be the ith sub-load Li i Assigned to node R1; will be the ith sub-load Li i Assigned to node R2; will be the ith sub-load Li i Assigned to node Rm.
In one example, when the ith sub-load is not greater than the remaining capacity of the second node, shifting the ith sub-load out of the load set, and allocating to the second node; and updating the residual capacity of the second node.
Exemplary, the ith sub-load Li allocated i Not greater than the value of the residual capacity of the node R1, the ith sub-load Li i Assigned to node R1. The remaining capacity of node R1 needs to be updated, i.e. the remaining capacity of node R1 minus the i-th sub-load Li i And obtaining the updated residual capacity value of the node R1.
In one example, when the ith sub-load is greater than the remaining capacity of the second node, the ith sub-load is not moved out of the load set, the current allocation to the load set is ended, and the candidate allocation scheme corresponding to the current allocation is discarded.
When the ith sub-load is greater than the remaining capacity of the second node, that is, the ith sub-load can be borne by no node in other nodes, the candidate allocation scheme corresponding to the current allocation cannot be executed, the candidate allocation scheme corresponding to the current allocation needs to be discarded, and other candidate allocation schemes are considered.
Step 2032, when i is not equal to n, adding one to i, and then executing the previous step again to obtain at least one group of i+1 candidate allocation for allocating the i+1 sub-load;
the i+1 candidate allocation is used to indicate that the i+1 th sub-load is allocated to the second node.
Since the load set to be scheduled includes n sub-loads, step 2031 needs to be repeatedly performed to determine the node to which each sub-load is allocated.
In one example, at least one set of i+1 candidate allocations for the i+1 th sub-load is obtained by allocating the i+1 th sub-load to the second node according to the at least one set of i candidate allocations for the i-th sub-load.
Exemplary, the ith sub-load Li allocated i If the remaining capacity value of the node R1, R2 and Rm is not greater than the remaining capacity value, the ith sub-load Li is allocated i There are 3 sets of i-th candidate allocations, respectively: will be the ith sub-load Li i Assigned to node R1; will be the ith sub-load Li i Assigned to node R2; will be the ith sub-load Li i Assigned to node Rm.
In a group of i-th candidate allocations, the i-th sub-load is allocated to the node R1, and the remaining capacity of the node R1 needs to be updated, so as to obtain the remaining capacity values { C1, C2, & gt, cm } corresponding to the updated nodes R1 to Rm. At least one set of i+1 candidate allocations for allocation of the i+1 th sub-load is to determine which of the other nodes the second node of the i+1 th sub-load allocation is based on the updated remaining capacity values { C1, C2, & Cm }.
Step 2033, combining all the candidate allocations between the 1 st sub-load and the nth sub-load to obtain at least two groups of candidate allocation schemes for allocating the n sub-loads;
wherein n is an integer greater than 1, and i is an integer no greater than n.
The candidate allocation scheme is a scheme of allocating n sub-loads in the load set of the first node.
Schematically, n is 2 and m is 3, i.e. negativeThe carrier set Li is divided into two sub-loads: li (Li) 1 And Li (lithium) 2 And there are 3 other nodes in the routing system: r1, R2 and R3. Wherein, the sub-load Li 1 The corresponding load size is 3, the sub-load Li 2 The corresponding load size is 1. The current remaining capacity of nodes R1, R2, R3 is {4,2,1}.
First, selecting sub-load Li in load set 1 Scheduling, sub-load Li 1 For the 1 st sub-load, at least one set of 1 st candidate allocations allocating the 1 st sub-load is obtained. Sub-load Li 1 The corresponding load size is 3, the sub-load Li 1 The remaining capacity of the second node is not greater than the remaining capacity of the first node, so the node R1 with the remaining capacity of 4 is determined as the first node, the sub-load Li is determined 1 To node R1, resulting in a set of 1 st candidate assignments. The remaining capacity values corresponding to the nodes R1 to R3 become {1,2,1}.
Then, selecting the sub-load Li in the load set 2 Scheduling, sub-load Li 2 For the 2 nd sub-load, at least one set of 2 nd candidate allocations allocating the 2 nd sub-load is obtained. At least one set of 2 nd candidate assignments for assigning the 2 nd sub-load is obtained by assigning the 2 nd sub-load to the second node based on at least one set of 1 st candidate assignments for assigning the 1 st sub-load.
Since the only set of 1 st candidate allocations is to sub-load Li 1 To the node R1, the remaining capacity values corresponding to the updated nodes R1 to R3 become {1,2,1}. Sub-load Li 2 The corresponding load size is 1, the sub-load Li 1 Is not greater than the remaining capacity of the second node, so will sub-load Li 2 To node R1 with a residual capacity of 1, or to sub-load Li 2 To node R2 of remaining capacity 2, or to sub-load Li 2 And allocating to the node R3 with the residual capacity of 1 to obtain three groups of 2 nd candidate allocation.
Combining all candidate allocations between the 1 st sub-load and the 2 nd sub-load to obtain three groups of candidate allocation schemes for allocating the 2 sub-loads:
1. will sub-load Li 1 To node R1, sub-load Li 2 Distributed to the nodesPoint R1. The remaining capacity values corresponding to the nodes R1 to R3 become {0,2,1}.
2. Will sub-load Li 1 To node R1, sub-load Li 2 Assigned to node R2. The remaining capacity values corresponding to the nodes R1 to R3 become {1, 1}.
3. Will sub-load Li 1 To node R1, sub-load Li 2 Assigned to node R2. The remaining capacity values corresponding to the nodes R1 to R3 become {1,2,0}.
In the three sets of candidate allocation schemes, the minimum residual capacity values corresponding to other nodes are respectively 0,1 and 0. The minimum residual capacity value corresponding to other nodes of the second group of candidate allocation schemes is the largest, and the second group of candidate allocation schemes are taken as target allocation schemes.
In summary, according to the method provided by the embodiment, the load set to be scheduled is split into the sub-loads, and the sub-loads are distributed to other nodes, so that as few loads as possible are affected when the route is switched, the frequency of performing load distribution operation is reduced, the load set transferred out is prevented from being distributed to one node, the load of the node exceeds the safety limit, so that the load is distributed again, and meanwhile, the target distribution scheme with the maximum minimum residual capacity value corresponding to other nodes is determined, so that the stability of the routing system is facilitated.
And removing the successfully allocated sub-load from the load set, repeating the allocation steps, and iterating to obtain a candidate allocation scheme, so that the allocation efficiency is ensured, and the determination of a target allocation scheme favorable for the stability of the routing system is facilitated.
Referring to fig. 4 in combination, in an alternative embodiment based on fig. 2, fig. 4 shows a load scheduling method provided in an exemplary embodiment of the present application, which is applied to a routing system including a plurality of nodes. In the present embodiment, step 202 is instead implemented as step 2021 and step 2022:
step 2021, dividing the loads in the load set into n sub-loads according to the load independence;
the set of loads is a set of loads determined to be distributed from the first node to other nodes.
Optionally, the loads in the load set are split into n sub-loads. The n sub-loads are independent from each other, i.e. the distribution of the n sub-loads to different nodes does not affect the service process of the front end.
Exemplary, the load set Li is { Li 1 ,Li 2 ,…,Li n Comprises n sub-loads Li 1 To Li (lithium) n
In step 2022, the n sub-loads are sorted according to the load sizes, so as to obtain a sorted load set.
In one example, n sub-loads are ordered from large to small, resulting in an ordered set of loads.
Illustratively, n has a value of 4, i.e., the load in the load set is divided into 4 sub-loads: li (Li) 1 ,Li 2 ,Li 3 And Li (lithium) 4 . Wherein, the sub-load Li 1 The corresponding load size is 3, the sub-load Li 2 The corresponding load size is 1, the sub-load Li 3 The corresponding load size is 2, the sub-load Li 4 The corresponding load size is 6, and the ordered load set is { Li } 4 ,Li 1 ,Li 3 ,Li 2 }. In scheduling, sub-load Li is allocated first 4 Re-gamete loading Li 1 Re-gamete loading Li 3 Finally, sub-load Li is distributed 2
In summary, according to the method provided by the embodiment, the load set to be scheduled is split into the sub-loads, and the sub-loads are distributed to other nodes, so that as few loads as possible are affected when the route is switched, the frequency of performing load distribution operation is reduced, the load set transferred out is prevented from being distributed to one node, the load of the node exceeds the safety limit, so that the load is distributed again, and meanwhile, the target distribution scheme with the maximum minimum residual capacity value corresponding to other nodes is determined, so that the stability of the routing system is facilitated.
The sub-loads are ordered from big to small, so that the order in the allocation process is determined, the candidate allocation schemes which cannot be successfully allocated can be eliminated conveniently and quickly, and the efficiency of load scheduling is improved.
In a routing system in a gaming service, there are multiple nodes that carry traffic generated by the progress of the gaming service. If the load of one node is higher than the scheduling condition, the partial load of the node needs to be scheduled to other nodes in the routing system. There are multiple candidate allocation schemes for the scheduling process. Referring to fig. 5 in combination, fig. 5 shows a flowchart for determining a set of candidate allocation schemes provided by an exemplary embodiment of the present application, including:
step 501, initializing a residual capacity set;
and initializing the residual capacity of other nodes in the routing system into a residual capacity set, so that the sub-load can be conveniently distributed to other nodes according to the relation between the sub-load and the residual capacity of other nodes.
Step 502, selecting one sub-load Li in the load set j Carrying out the distribution;
the set of loads is a set of loads determined to be distributed from the first node to other nodes.
Optionally, splitting the load in the load set into n sub-loads, which are independent of each other, selecting sub-load Li of the n sub-loads j And carrying out the distribution.
Step 503, determining a second node, wherein the remaining capacity of the second node is Ci;
will sub-load Li j Assigned to a second node, which is one of the other nodes.
Step 504, judge Li j Whether or not it is not greater than Ci;
if Li j If not greater than Ci, then go to step 506; if Li j Less than Ci, then step 505 is skipped.
Step 505, discarding a group of candidate allocation schemes corresponding to the current allocation;
Li j less than Ci, will not load Li j And (5) moving out the load set, and ending the distribution of the load set.
Step 506, delete Li in the load set j Updating Ci;
Li j not greater than Ci, sub-load Li j Can be successfully distributed to the second node to carry out the sub-load Li j The load set is removed. Updating Ci means subtracting Li from the remaining capacity Ci of the second node j And obtaining the updated residual capacity of the second node.
Step 507, judging whether the load set is empty;
after all the sub-loads in the load set are successfully allocated, the load set is empty. If the load set is empty, then jump to step 508; if the load set is not empty, steps 502 to 506 are continued.
Step 508, a set of candidate allocation schemes is obtained.
Fig. 6 shows a block diagram of a load scheduling apparatus according to an exemplary embodiment of the present application, the apparatus includes: an acquisition module 601, a splitting module 602, a determination module 603 and an allocation module 604;
an obtaining module 601, configured to obtain a load set to be scheduled on the first node when the load of the first node is higher than the scheduling condition;
a splitting module 602 configured to split the load set into n sub-loads;
a determining module 603 configured to determine at least two sets of candidate allocation schemes for allocating n sub-loads to other nodes;
a determining module 603, configured to determine a target allocation scheme of the at least two sets of candidate allocation schemes, where the target allocation scheme is an allocation scheme with a maximum minimum residual capacity value corresponding to other nodes;
an allocation module 604 is configured to allocate the n sub-loads to other nodes according to a target allocation scheme.
In one example, the allocation module 604 is configured to allocate an ith sub-load to the second node when the ith sub-load of the n sub-loads is not greater than the remaining capacity of the second node, the second node being one of the other nodes, resulting in at least one set of ith candidate allocations to which the ith sub-load is allocated; an allocation module 604 configured to, when i is not equal to n, add one to i and then execute the previous step again, to obtain at least one group of i+1 candidate allocations for allocating the i+1 sub-load; a determining module 603 configured to combine all the candidate allocations between the 1 st sub-load and the nth sub-load to obtain at least two sets of candidate allocation schemes for allocating the n sub-loads; wherein n is an integer greater than 1, and i is an integer no greater than n.
In one example, at least one set of i+1 candidate allocations for the i+1 th sub-load is obtained by allocating the i+1 th sub-load to the second node based on at least one set of i candidate allocations for the i-th sub-load.
Optionally, the apparatus further comprises an update module 605 and a ranking module 606.
In one example, the allocation module 604 is configured to allocate the ith sub-load to the second node by moving the ith sub-load out of the load set when the ith sub-load is not greater than the remaining capacity of the second node; the updating module 605 is configured to update the remaining capacity of the second node.
In one example, the splitting module 602 is configured to divide the loads in the load set into n sub-loads according to load independence; the sorting module 606 is configured to sort the n sub-loads according to the sizes of the loads, to obtain a sorted load set.
In one example, the ordering module 606 is configured to order the n sub-loads from large to small, resulting in an ordered first load set.
In one example, the determining module 603 is configured to, when the ith sub-load is greater than the remaining capacity of the second node, not move the ith sub-load out of the load set, end the current allocation to the load set, and discard the candidate allocation scheme corresponding to the current allocation.
Referring to fig. 7, a block diagram of a routing node (node) according to an embodiment of the present invention is shown. The node may include: a processor 710, at least one network interface 720, and a memory 730. Wherein the processor 710 is electrically connected to at least one network interface 720 and a memory 730, respectively. Memory 730 has stored therein one or more instructions for execution by processor 710.
A processor 710, configured to obtain a load set to be scheduled on a first node when a load of the first node is higher than a scheduling condition; splitting the load set into n sub-loads; determining at least two sets of candidate allocation schemes for allocating the n sub-loads to other nodes; determining a target allocation scheme in the at least two groups of candidate allocation schemes, wherein the target allocation scheme is the allocation scheme with the largest minimum residual capacity value corresponding to the other nodes; and distributing the n sub-loads to the other nodes according to the target distribution scheme.
A processor 710 configured to allocate an ith sub-load of the n sub-loads to a second node when the ith sub-load is not greater than a remaining capacity of the second node, where the second node is one of the other nodes, to obtain at least one set of ith candidate allocations for allocating the ith sub-load; when the i is not equal to n, adding one to the i, and then executing the previous step again to obtain at least one group of i+1 candidate allocation for allocating the i+1 sub-load; combining all candidate allocations between the 1 st sub-load and the nth sub-load to obtain at least two groups of candidate allocation schemes for allocating the n sub-loads; wherein n is an integer greater than 1, and i is an integer no greater than n.
Optionally, the at least one set of i+1 candidate allocations for the i+1 th sub-load is obtained by allocating the i+1 th sub-load to the second node according to the at least one set of i candidate allocations for the i+1 th sub-load.
Optionally, the processor 710 is configured to, when the ith sub-load is not greater than the remaining capacity of the second node, move the ith sub-load out of the load set and allocate the ith sub-load to the second node; and updating the residual capacity of the second node.
A processor 710, configured to divide the loads in the load set into n sub-loads according to load independence; and sequencing the n sub-loads according to the size of the load to obtain the sequenced load set.
Optionally, the processor 710 is further configured to sort the n sub-loads from large to small, to obtain the sorted first load set.
The processor 710 is further configured to, when the ith sub-load is greater than the remaining capacity of the second node, not move the ith sub-load out of the load set, end the current allocation to the load set, and discard a candidate allocation scheme corresponding to the current allocation.
The embodiment of the application also provides a computer device, which comprises a memory and a processor, wherein at least one instruction, at least one section of program, code set or instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded by the processor and realizes the load scheduling method.
The embodiment of the application also provides a computer readable storage medium, wherein at least one instruction, at least one section of program, a code set or an instruction set is stored in the readable storage medium, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by a processor to realize the load scheduling method.
The present application also provides a computer program product which, when run on a computer, causes the computer to perform the load scheduling method provided by the above-mentioned respective method embodiments.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing related hardware, and the program may be stored in a computer readable storage medium, which may be a computer readable storage medium included in the memory of the above embodiments; or may be a computer-readable storage medium, alone, that is not incorporated into the terminal. The computer readable storage medium has at least one instruction, at least one program, a code set, or a set of instructions stored therein, the at least one instruction, the at least one program, the set of code, or the set of instructions being loaded and executed by a processor to implement the load scheduling method described above.
Alternatively, the computer-readable storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), solid state disk (SSD, solid State Drives), or optical disk, etc. The random access memory may include resistive random access memory (ReRAM, resistance Random Access Memory) and dynamic random access memory (DRAM, dynamic Random Access Memory), among others. The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing is illustrative of the present invention and is not to be construed as limiting thereof, but rather as being included within the spirit and principles of the present invention.

Claims (9)

1. A load scheduling method, applied to a routing system including a plurality of nodes, the method comprising:
when the load of a first node is higher than a scheduling condition, acquiring a load set to be scheduled on the first node;
splitting the load set into n sub-loads;
when the ith sub-load in the n sub-loads is not greater than the residual capacity of a second node, the ith sub-load is distributed to the second node, at least one group of ith candidate distribution of the ith sub-load is obtained, the second node is one of other nodes, and the number of the ith candidate distribution is equal to the number of other nodes of which the ith sub-load is not greater than the residual capacity;
when the i is not equal to n, adding one to the i, and then executing the previous step again to obtain at least one group of i+1 candidate allocation for allocating the i+1 th sub-load, wherein the at least one group of i+1 th candidate allocation for allocating the i+1 th sub-load is obtained by allocating the i+1 th sub-load to the second node according to the at least one group of i candidate allocation for the i+1 th sub-load;
combining all candidate allocations between the 1 st sub-load and the nth sub-load to obtain at least two groups of candidate allocation schemes for allocating the n sub-loads; wherein n is an integer greater than 1, i is an integer no greater than n;
determining a target allocation scheme in the at least two groups of candidate allocation schemes, wherein the target allocation scheme is the allocation scheme with the largest minimum residual capacity value corresponding to the other nodes;
and distributing the n sub-loads to the other nodes according to the target distribution scheme.
2. The method of claim 1, wherein said distributing the ith sub-load to a second node when the ith sub-load of the n sub-loads is not greater than a remaining capacity of the second node comprises:
when the ith sub-load is not greater than the residual capacity of the second node, moving the ith sub-load out of the load set and distributing the ith sub-load to the second node;
and updating the residual capacity of the second node.
3. The method of claim 1, wherein splitting the set of loads into n sub-loads comprises:
dividing the loads in the load set into n sub-loads according to load independence;
and sequencing the n sub-loads according to the size of the load to obtain the sequenced load set.
4. A method according to claim 3, wherein ordering the n sub-loads according to the size of the load, resulting in the ordered set of loads, comprises:
and sequencing the n sub-loads from large to small to obtain a sequenced first load set.
5. The method according to any one of claims 1 to 4, further comprising:
and when the ith sub-load is larger than the residual capacity of the second node, the ith sub-load is not moved out of the load set, the current distribution of the load set is ended, and the candidate distribution scheme corresponding to the current distribution is discarded.
6. A load scheduling apparatus for use in a routing system comprising a plurality of nodes, the apparatus comprising: the device comprises an acquisition module, a splitting module, a determining module and an allocation module;
the acquisition module is configured to acquire a load set to be scheduled on a first node when the load of the first node is higher than a scheduling condition;
the splitting module is configured to split the load set into n sub-loads;
the allocation module is configured to allocate the ith sub-load to a second node when the ith sub-load in the n sub-loads is not greater than the residual capacity of the second node, so as to obtain at least one group of ith candidate allocation for allocating the ith sub-load, wherein the second node is one of other nodes, and the number of the ith candidate allocation is equal to the number of other nodes of which the ith sub-load is not greater than the residual capacity;
the allocation module is configured to, when the i is not equal to n, add one to the i and then execute the previous step again to obtain at least one group of i+1 candidate allocation for allocating the i+1 th sub-load, where the at least one group of i+1 th candidate allocation for allocating the i+1 th sub-load is obtained by allocating the i+1 th sub-load to the second node according to the at least one group of i candidate allocation for allocating the i th sub-load;
the determining module is configured to combine all candidate allocations between the 1 st sub-load and the n th sub-load to obtain at least two groups of candidate allocation schemes for allocating the n sub-loads, wherein n is an integer greater than 1, and i is an integer not greater than n;
the determining module is configured to determine a target allocation scheme in the at least two sets of candidate allocation schemes, wherein the target allocation scheme is an allocation scheme with the largest minimum residual capacity value corresponding to the other nodes;
the allocation module is configured to allocate the n sub-loads to the other nodes according to the target allocation scheme.
7. The apparatus of claim 6, wherein the apparatus further comprises an update module;
the allocation module is configured to move the ith sub-load out of the load set and allocate the ith sub-load to the second node when the ith sub-load is not greater than the residual capacity of the second node;
the updating module is configured to update the remaining capacity of the second node.
8. A computer device comprising a processor and a memory having stored therein at least one instruction that is loaded and executed by the processor to implement the load scheduling method of any one of claims 1 to 5.
9. A computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the load scheduling method of any one of claims 1 to 5.
CN201911047958.5A 2019-10-30 2019-10-30 Load scheduling method, device, equipment and storage medium Active CN110795250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911047958.5A CN110795250B (en) 2019-10-30 2019-10-30 Load scheduling method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911047958.5A CN110795250B (en) 2019-10-30 2019-10-30 Load scheduling method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110795250A CN110795250A (en) 2020-02-14
CN110795250B true CN110795250B (en) 2023-05-12

Family

ID=69442212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911047958.5A Active CN110795250B (en) 2019-10-30 2019-10-30 Load scheduling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110795250B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117349035B (en) * 2023-12-05 2024-03-15 中电云计算技术有限公司 Workload scheduling method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724100A (en) * 2011-03-29 2012-10-10 中国科学院声学研究所 Board resource distribution system and method aiming at combination service
CN104270322A (en) * 2014-10-30 2015-01-07 中电海康集团有限公司 Self-adaptive load balance scheduling mechanism for internet-of-things device access processing platform

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158513A (en) * 2010-02-11 2011-08-17 联想(北京)有限公司 Service cluster and energy-saving method and device thereof
CN102546355A (en) * 2010-12-09 2012-07-04 上海杉达学院 Load balancing method of routers
US10069903B2 (en) * 2013-04-16 2018-09-04 Amazon Technologies, Inc. Distributed load balancer
CN109936606A (en) * 2017-12-18 2019-06-25 浙江宇视科技有限公司 Method for allocating tasks and device
CN108769271A (en) * 2018-08-20 2018-11-06 北京百度网讯科技有限公司 Method, apparatus, storage medium and the terminal device of load balancing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724100A (en) * 2011-03-29 2012-10-10 中国科学院声学研究所 Board resource distribution system and method aiming at combination service
CN104270322A (en) * 2014-10-30 2015-01-07 中电海康集团有限公司 Self-adaptive load balance scheduling mechanism for internet-of-things device access processing platform

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A parallel router based on load-balanced region partition strategy;Changxu Du等;《2009 International Conference on Communications, Circuits and Systems》;第1047-1051页 *
基于历史数据的虚拟机资源分配方法;王海涛等;《计算机研究与发展》;第56卷(第4期);第779-789页 *
基于服务功能链的交换机架构研究;杜炯;《中国优秀硕士学位论文全文数据库信息科技辑》;I139-48 *

Also Published As

Publication number Publication date
CN110795250A (en) 2020-02-14

Similar Documents

Publication Publication Date Title
CN108306971B (en) Method and system for sending acquisition request of data resource
US10397117B2 (en) System and method for packet distribution on a network
CN112269641B (en) Scheduling method, scheduling device, electronic equipment and storage medium
CN103731883B (en) A kind of method and device of load balancing
CZ287029B6 (en) Method of assignment frequencies to base stations of a communication network with mobile radio telecommunication devices
US9729382B2 (en) Method and apparatus for realizing load balance in distributed Hash table network
JP5517701B2 (en) Resource scheduling method and apparatus for uplink transmission
CN109936606A (en) Method for allocating tasks and device
US20230266999A1 (en) Resource scheduling method, resource scheduling system, and device
CN110795250B (en) Load scheduling method, device, equipment and storage medium
CN112543151B (en) SDN controller deployment method and device, electronic equipment and storage medium
CN101651598A (en) Method and device for allocating network resources
CN112261125B (en) Centralized unit cloud deployment method, device and system
JP6778146B2 (en) Service slice allocation device and service slice allocation method
CN109598411A (en) A kind of processing method and electronic equipment of product design task
CN115361349B (en) Resource using method and device
CN113259440B (en) Load balancing-based dynamic deployment method and system for virtual network functions
CN101651572A (en) Method and device for achieving topology search in network management system
CN113672347A (en) Container group scheduling method and device
CN111193607B (en) Method, device and storage medium for transmission resource management
CN109600251B (en) Virtual network deployment method, system and device
CN106982169B (en) Message forwarding method and device
CN102055651A (en) Task allocation method and device of distributed control plane of extensible router
Gharbaoui et al. An orchestrator of network and cloud resources for dynamic provisioning of mobile virtual network functions
CN112559115A (en) Method, device and equipment for deleting container mirror image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant