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

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

Info

Publication number
CN110795250A
CN110795250A CN201911047958.5A CN201911047958A CN110795250A CN 110795250 A CN110795250 A CN 110795250A CN 201911047958 A CN201911047958 A CN 201911047958A CN 110795250 A CN110795250 A CN 110795250A
Authority
CN
China
Prior art keywords
load
sub
node
loads
candidate
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.)
Granted
Application number
CN201911047958.5A
Other languages
Chinese (zh)
Other versions
CN110795250B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a load scheduling method, a device, equipment and a storage medium, which relate to the technical field of communication, and the method comprises the following steps: when the load of a first node is higher than a scheduling condition, acquiring a load set needing 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 sets of candidate allocation schemes, wherein the target allocation scheme is an allocation scheme with the largest minimum remaining capacity value corresponding to the other nodes; 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, so that when routing switching occurs, as few loads as possible are affected, the frequency of load distribution operation is reduced, and the stability of the routing system is facilitated.

Description

Load scheduling method, device, equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a load scheduling method, apparatus, device, and storage medium.
Background
Many solutions for background services require distributed deployment of servers, and background services deployed on different servers often need to be supported by a routing system when communicating. In the routing system, a node that takes charge of a traffic forwarding task generated by a service process of a background service is called a routing node (hereinafter, referred to as a node for short). There are multiple nodes in a routing system, each carrying a fraction of the total traffic.
When the traffic on a certain node is too large and the possibility of no bearing occurs, the node needs to be connected with the networkA part of the traffic it carries is transferred to other nodes, a process called load scheduling. The process by which a portion of the diverted traffic is distributed among the remaining nodes in the routing system is referred to as load distribution. In the related technology, a maximum margin allocation scheme is adopted, transferable load sets are selected on high-load nodes in a load scheduling stage, and the load sets are sorted from small to large and are respectively L1,L2,L3,…,Ln. In the load distribution stage, a node R with the largest load margin is selected from the rest nodesmAggregate the minimum load L1Transfer to node RmAnd (6) going upwards.
In the above load distribution scheme, if the load margin is the largest, the node RmIs still not sufficient to carry the minimum set of loads L1If so, the load distribution fails; meanwhile, the load set transferred out is distributed to one node, so that the load of the node easily exceeds the safety limit again, the load needs to be adjusted frequently, and the stability of the routing system is not facilitated.
Disclosure of Invention
The embodiment of the application provides a load scheduling method, a load scheduling device, load scheduling equipment and a storage medium, which can be used for solving the problems that a safety limit is easy to reappear in a load set distributed to a transfer-out part, so that the load needs to be adjusted frequently, and a routing system is unstable. The technical scheme is as follows:
according to an aspect of the present application, there is provided a load scheduling method, including:
when the load of a first node is higher than a scheduling condition, acquiring a load set needing 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 sets of candidate allocation schemes, wherein the target allocation scheme is an allocation scheme with the largest minimum remaining capacity value corresponding to the other nodes;
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 comprises: when the ith sub-load in the n sub-loads is not larger than the residual capacity of the second node, distributing the ith sub-load to the second node, wherein the second node is one of other nodes, and obtaining at least one group of ith candidate distribution for distributing the ith sub-load; 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 th candidate allocations for allocating 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, and i is an integer no greater than n.
In an alternative embodiment, the i +1 th candidate allocation of the i +1 th sub-load is obtained by allocating the i +1 th sub-load to the second node according to the i +1 th candidate allocation of the i +1 th sub-load.
In an optional embodiment, 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 includes: when the ith sub-load is not larger 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.
In an optional embodiment, splitting the load set into n sub-loads includes: dividing the load in the load set into n sub-loads according to load independence; and sorting the n sub-loads according to the sizes of the loads to obtain a sorted 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 distribution of the load set is ended, and the candidate distribution scheme corresponding to the current distribution is discarded.
According to an aspect of the present application, there is provided a load distribution apparatus, the apparatus comprising: the system comprises an acquisition module, a splitting module and a distribution module;
the obtaining module is configured to obtain a load set needing to be scheduled on the first node when the load of the first node is higher than a condition;
a splitting module configured to split the load set into n sub-loads;
the distribution module is configured to distribute the ith sub-load to the second node when the ith sub-load in the n sub-loads is not larger than the residual capacity of the second node, and the second node is the node with the largest residual capacity;
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, which includes a processor and a memory, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the load scheduling method as provided in the embodiments of the present application.
In another aspect, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a set of codes, or a set of instructions is stored, which is loaded and executed by the processor to implement the load scheduling method as provided in the embodiments 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.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
the load set needing to be scheduled is split into the sub-loads, and the sub-loads are distributed to other nodes, so that the loads as few as possible are influenced when the routing switching occurs, the frequency of load distribution operation is reduced, the load set which is transferred out is prevented from being distributed to one node, the load of the node exceeds a safety limit, and the load is distributed again, meanwhile, a target distribution scheme with the maximum minimum residual capacity value corresponding to other nodes is determined, and the stability of a routing system is facilitated.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a routing system provided by an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a method of load scheduling provided by an exemplary embodiment of the present application;
FIG. 3 is a flow chart of a method of load scheduling provided by an exemplary embodiment of the present application;
FIG. 4 is a flowchart of a method for load scheduling provided by an exemplary embodiment of the present application;
FIG. 5 is a flowchart of a method for load scheduling provided by an exemplary embodiment of the present application;
fig. 6 is a block diagram of a load scheduling apparatus according to 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
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, terms referred to in the embodiments of the present application are briefly described:
routing: the activity of transmitting information from a source address to a destination address through an interconnected network. The hardware to which the route corresponds is called a router. Routing typically directs packet forwarding based on a routing table (a table that stores the best paths to various destinations).
A routing node (router), which is a node in the routing system that specifically undertakes the task of traffic forwarding, and is called a node for short.
Cluster (cluster): several nodes that together perform a certain function in a service network are collectively referred to as a cluster.
Load scheduling (load scheduling): a plurality of nodes for interfacing front-end traffic form a cluster, each node shares a part of total traffic, and when the traffic on a certain node is too large and the possibility of not being able to be carried occurs, a part of the carrying traffic needs to be transferred to other nodes, which is called as load scheduling.
Load dispatching: 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 the rest nodes in the cluster is called load distribution.
Fig. 1 is a schematic diagram illustrating a routing system provided in an exemplary embodiment of the present application, where the routing system 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.
The 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, node R1 carries traffic for service process C1, and node Rn carries traffic for service process Cm. The node R2 carries the traffic of three service processes C2, C4 and C5. The load level carried by node R2 has already reached a dangerous level and it is necessary to divert some of the load to other nodes within the cluster.
Fig. 2 is a flowchart illustrating 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 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 a first node is higher than a scheduling condition, acquiring a load set needing to be scheduled on the first node;
the routing system includes a plurality of nodes. The nodes undertake the forwarding task of traffic generated by the service process in the routing system.
The first node is a node above the scheduling condition among the plurality of nodes in the routing system.
Optionally, the scheduling condition is N% of the node capacity value (carrying capacity). The value of N is a system default, or the value of N is set by the administrator.
Illustratively, N is 90, and the scheduling condition is 90% of the node's carrying capacity. When the current load of a node is higher than 90% of the bearing capacity of the node, the node is defined as a first node, and a part of the load of the node needs to be distributed to other nodes.
Optionally, after the acquired 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;
a load set is a set of loads that are determined to be distributed from a first node to other nodes.
Optionally, the load set is a load corresponding to one service process carried by the first node.
Optionally, the load in the load set is split into n sub-loads. The n sub-loads are independent of 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-payloads may be ordered or unordered.
Illustratively, the load set Li is { Li1,Li2,…,LinComprises n sub-loads Li1To Lin
Step 203, determining at least two groups of candidate allocation schemes for allocating the n sub-loads to other nodes;
the candidate allocation scheme is an allocation scheme that successfully allocates the n sub-loads to other nodes. The other nodes are nodes in the node cluster other than the first node.
It should be noted that, the n sub-loads are distributed to at least two groups of candidate distribution schemes on other nodes. The candidate allocation scheme includes information about 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 an allocation scheme with the maximum 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 assignment 1, candidate assignment 2, and candidate assignment 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, the largest is C1. Then the allocation with the largest value of the minimum remaining capacity among the 3 sets of candidate allocations is candidate allocation 1, i.e. the target allocation is candidate allocation 1.
Optionally, the routing system allocates n sub-loads in the load set to be transferred by the first node to other nodes according to the target allocation scheme.
After a sub-load is distributed to other nodes, the remaining capacity value of the node is reduced.
Illustratively, there are m other nodes (R1 to Rm) in the routing system, corresponding to residual capacity values { C1, C2.
In summary, in the method provided in this 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 routing switch occurs, the frequency of load distribution operations is reduced, the load set that is shifted out is prevented from being distributed to one node, and the load of the node exceeds a safety limit, so that the load is redistributed.
Referring to fig. 3 in combination, in an alternative embodiment based on fig. 2, fig. 3 illustrates a load scheduling method provided by 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, distributing the ith sub-load to the second node, wherein the second node is one of other nodes, and obtaining at least one group of ith candidate distributions for distributing the ith sub-load;
the ith candidate allocation is used to indicate allocation of the ith sub-load to the second node.
Optionally, in the current routing system, the load set to be scheduled is Li, where Li includes n sub-loads Li1To Lin{Li1,Li2,…,Lin}. There are m other nodes (R1 to Rm) in the routing system, and the remaining capacity values corresponding to the nodes R1 to Rm are { C1, C2. Wherein m is an integer.
Exemplarily, the ith sub-load Li assignediNot greater than the residual capacity values of the nodes R1, R2 and Rm, the ith sub-load Li is distributediThere are 3 sets of ith candidate assignments, respectively: loading the ith sub-load LiiTo node R1; loading the ith sub-load LiiTo node R2; loading the ith sub-load LiiTo node Rm.
In one example, when the ith sub-load is not greater than the remaining capacity of the second node, moving the ith sub-load out of the load set, allocating to the second node; and updating the residual capacity of the second node.
Exemplarily, the ith sub-load Li assignediNot greater than the residual capacity value of the node R1, and loading the ith sub-load LiiTo node R1. The remaining capacity of the node R1 needs to be updated, i.e. the node R1Minus the ith sub-load LiiThe updated value of the remaining capacity of the node R1 is obtained.
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 distribution of the load set is ended, and the candidate distribution scheme corresponding to the current distribution is discarded.
When the ith sub-load is greater than the remaining capacity of the second node, that is, it indicates that no node exists in other nodes and can carry the ith sub-load, the candidate allocation scheme corresponding to the current allocation cannot be executed, and 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 th candidate allocations for allocating the i +1 th sub-load;
the i +1 th 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, the at least one group of i +1 th candidate allocations for the i +1 th sub-load is a result of allocating the i +1 th sub-load to the second node according to the at least one group of i +1 th candidate allocations for the i th sub-load.
Exemplarily, the ith sub-load Li assignediNot greater than the residual capacity values of the nodes R1, R2 and Rm, the ith sub-load Li is distributediThere are 3 sets of ith candidate assignments, respectively: loading the ith sub-load LiiTo node R1; loading the ith sub-load LiiTo node R2; loading the ith sub-load LiiTo node Rm.
In the ith candidate allocation, the ith 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 updated remaining capacity values { C1, C2.., Cm } corresponding to the nodes R1 to Rm. At least one group of i +1 th candidate allocations for allocating the i +1 th sub-load determines which nodes the second node of the i +1 th sub-load allocation is among other nodes according to the updated remaining capacity values { C1, C2.., Cm }, corresponding to the nodes R1 to Rm.
Step 2033, 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.
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. the load set Li is divided into two sub-loads: li1And Li2And there are 3 other nodes in the routing system: r1, R2 and R3. Wherein, Li is sub-loaded1Corresponding load size of 3, sub-load Li2The corresponding load size is 1. The current remaining capacity of the nodes R1, R2, R3 is {4,2,1 }.
Firstly, selecting a sub-load Li in a load set1Scheduling, sub-loading Li1And obtaining at least one group of 1 st candidate distribution for distributing the 1 st sub load for the 1 st sub load. Sub-loaded with Li1Corresponding load size of 3, sub-load Li1The remaining capacity not greater than the second node is required, so the node R1 having a remaining capacity of 4 is determined as the second node, and the sub-load Li is applied1Assign 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 set2Scheduling, sub-loading Li2For the 2 nd sub-load, at least one group of 2 nd candidate allocations for allocating the 2 nd sub-load is obtained. The at least one group of 2 nd candidate allocations for allocating the 2 nd sub-load is obtained by allocating the 2 nd sub-load to the second node according to the at least one group of 1 st candidate allocations for allocating the 1 st sub-load.
Since the only set of 1 st candidate assignments is to assign the sub-loads Li1The updated remaining capacity values corresponding to the nodes R1 to R3 are assigned to the node R1, and are {1,2,1 }. Sub-loaded with Li2Corresponding load size of 1, sub-load Li1Need not be greater than secondThe remaining capacity of the node, so the sub-load is Li2To node R1 with a remaining capacity of 1, or, to load Li2To node R2 with a residual capacity of 2, or, to load Li2To node R3 with a remaining capacity of 1, resulting in three sets of 2 nd candidate allocations.
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 2 sub-loads:
loading Li to the son1Distributed to node R1, and load Li2To node R1. The remaining capacity values corresponding to the nodes R1 to R3 become {0,2,1 }.
II, loading Li on the son1Distributed to node R1, and load Li2To node R2. The remaining capacity values corresponding to the nodes R1 to R3 become {1,1,1 }.
Thirdly, loading Li on the son1Distributed to node R1, and load Li2To node R2. The remaining capacity values corresponding to the nodes R1 to R3 become {1,2,0 }.
In the above three candidate allocation schemes, the minimum remaining capacity values corresponding to other nodes are 0,1, and 0, respectively. The minimum remaining capacity values corresponding to other nodes of the second set of candidate allocations are the largest, taking the second set of candidate allocations as the target allocation.
In summary, in the method provided in this 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 routing switch occurs, the frequency of load distribution operations is reduced, the load set that is shifted out is prevented from being distributed to one node, and the load of the node exceeds a safety limit, so that the load is redistributed.
By removing the sub-loads which are successfully distributed from the load set and repeating the distribution steps, the candidate distribution scheme is obtained through iteration, the distribution efficiency is ensured, and the target distribution scheme which is beneficial to the stability of the routing system is helped to be determined.
Referring to fig. 4 in combination, in an alternative embodiment based on fig. 2, fig. 4 shows a load scheduling method provided by 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 load in the load set into n sub-loads according to load independence;
a load set is a set of loads that are determined to be distributed from a first node to other nodes.
Optionally, the load in the load set is split into n sub-loads. The n sub-loads are independent of each other, i.e. the distribution of the n sub-loads to different nodes does not affect the service process of the front end.
Illustratively, the load set Li is { Li1,Li2,…,LinComprises n sub-loads Li1To Lin
Step 2022, sorting the n sub-loads according to the sizes of the loads to obtain a sorted load set.
In one example, the n sub-loads are sorted from large to small to obtain a sorted load set.
Exemplarily, n takes a value of 4, i.e., the load in the load set is divided into 4 sub-loads: li1,Li2,Li3And Li4. Wherein, Li is sub-loaded1Corresponding load size of 3, sub-load Li2Corresponding load size of 1, sub-load Li3Corresponding load size of 2, sub-load Li4If the corresponding load size is 6, the ordered load set is { Li4,Li1,Li3,Li2}. When scheduling, the sub-load Li is firstly distributed4Redistribution of gametes loaded with Li1Redistribution of gametes loaded with Li3Finally, the sub-load Li is distributed2
In summary, in the method provided in this 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 routing switch occurs, the frequency of load distribution operations is reduced, the load set that is shifted out is prevented from being distributed to one node, and the load of the node exceeds a safety limit, so that the load is redistributed.
By sequencing the sub-loads from large to small, the sequence during distribution is determined, candidate distribution schemes which cannot be distributed successfully are eliminated conveniently and quickly, and the efficiency of load scheduling is improved.
In a routing system in a game service, there are a plurality of nodes that carry traffic generated by a game service process. If the load of a node is higher than the scheduling condition, part of the load on 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 is conveniently distributed to other nodes according to the relation between the sub-load and the residual capacity of other nodes.
502, selecting a sub-load Li in the load setjPerforming the distribution;
a load set is a set of loads that are determined to be distributed from a first node to other nodes.
Optionally, the load in the load set is split into n sub-loads, the n sub-loads are independent of each other, and a sub-load Li of the n sub-loads is selectedjThe allocation is performed.
Step 503, determining a second node, wherein the residual capacity of the second node is Ci;
loading Li to the sonjTo a second node, which is one of the other nodes.
Step 504, judge LijWhether or not toNot more than Ci;
if LijIf not, jumping to step 506; if LijIf less than Ci, go to step 505.
Step 505, discarding a group of candidate allocation schemes corresponding to the current allocation;
Lijless than Ci, no loading of Li to the sub-unitjAnd moving out the load set and finishing the distribution of the load set.
Step 506, delete Li in the load setjUpdating Ci;
Lijnot greater than Ci, then Li is sub-loadedjCan be successfully distributed to the second node to load the sub-load LijThe load set is shifted out. Updating Ci means that Li is subtracted from the residual capacity Ci of the second nodejAnd obtaining the updated remaining 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 will be empty. If the load set is empty, go to step 508; if the load set is not empty, then steps 502-506 continue.
Step 508, a set of candidate allocation schemes is obtained.
Fig. 6 is a block diagram illustrating a load scheduling apparatus according to an exemplary embodiment of the present application, where 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 that needs to be scheduled on a first node when a load of the first node is higher than a 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 the n sub-loads to other nodes;
a determining module 603 configured to determine a target allocation scheme in the at least two sets of candidate allocation schemes, where the target allocation scheme is an allocation scheme with a largest minimum remaining capacity value corresponding to other nodes;
an allocation module 604 configured to allocate the n sub-loads to other nodes according to a target allocation scheme.
In one example, the allocating module 604 is configured to allocate the 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 group of ith candidate allocations for allocating the ith sub-load; the allocating module 604 is configured to add one to i and then execute the previous step again when i is not equal to n, so as to obtain at least one group of i +1 th candidate allocations for allocating the i +1 th sub-loads; a determining module 603 configured to combine 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 one example, the at least one group of i +1 th candidate assignments for the i +1 th sub-load is based on assigning the i +1 th sub-load to the second node according to the at least one group of i +1 th candidate assignments for the i +1 th sub-load.
Optionally, the apparatus further comprises an updating module 605 and a sorting module 606.
In one example, the allocating module 604 is configured to shift the ith sub-load out of the load set to be allocated to the second node when the ith sub-load is not greater than the remaining capacity of the second node; an updating module 605 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; a sorting module 606 configured to sort the n sub-loads according to the sizes of the loads, so as to obtain a sorted load set.
In one example, the sorting module 606 is configured to sort the n sub-loads from large to small, resulting in a sorted first load set.
In an 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 of 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 comprise: a processor 710, at least one network interface 720, and memory 730. The processor 710 is electrically connected to at least one network interface 720 and the memory 730 respectively. One or more instructions are stored in memory 730 for execution by processor 710.
A processor 710, configured to obtain a load set that needs 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 sets of candidate allocation schemes, wherein the target allocation scheme is an allocation scheme with the largest minimum remaining capacity value corresponding to the other nodes; 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 to a second node when the ith sub-load in the n sub-loads is not greater than a remaining capacity of the second node, where the second node is one of the other nodes, and obtain at least one group of ith candidate allocations for allocating the ith sub-load; 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 allocations for allocating the i +1 sub-loads; 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 not greater than n.
Optionally, the at least one group of i +1 th candidate allocations of 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 +1 th candidate allocations of the i th sub-load.
Optionally, the processor 710 is configured to shift 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 remaining capacity of 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 sorting the n sub-loads according to the sizes of the loads to obtain the sorted load set.
Optionally, the processor 710 is further configured to sort the n sub-loads from large to small, so as 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 distribution of the load set, and discard the candidate distribution scheme corresponding to the current distribution.
The embodiment of the present application further provides a computer device, where the computer device includes a memory and a processor, where the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded by the processor and implements the load scheduling method.
Embodiments of the present application further provide a computer-readable storage medium, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the computer-readable storage medium, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the load scheduling method.
The present application further provides a computer program product, which when running on a computer, causes the computer to execute the load scheduling method provided by the above method embodiments.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, which may be a computer readable storage medium contained in a memory of the above embodiments; or it may be a separate computer-readable storage medium not incorporated in the terminal. The computer readable storage medium has stored therein at least one instruction, at least one program, set of codes, or set of instructions that is loaded and executed by a processor to implement the load scheduling method described above.
Optionally, the computer-readable storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a Solid State Drive (SSD), or an optical disc. The Random Access Memory may include a resistive Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM). The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits 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 instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The present application is intended to cover various modifications, alternatives, and equivalents, which may be included within the spirit and scope of the present application.

Claims (13)

1. A load scheduling method is applied to a routing system comprising a plurality of nodes, and the method comprises the following steps:
when the load of a first node is higher than a scheduling condition, acquiring a load set needing 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 sets of candidate allocation schemes, wherein the target allocation scheme is an allocation scheme with the largest minimum remaining capacity value corresponding to the other nodes;
distributing the n sub-loads to the other nodes according to the target distribution scheme.
2. The method of claim 1, wherein determining at least two candidate allocation schemes for allocating the n sub-loads comprises:
when the ith sub-load in the n sub-loads is not larger than the remaining capacity of a second node, distributing the ith sub-load to the second node, wherein the second node is one of the other nodes, and obtaining at least one group of ith candidate distribution for distributing the ith sub-load;
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 allocations for allocating the i +1 sub-loads;
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 not greater than n.
3. The method of claim 2,
the i +1 th candidate allocation of the i +1 th sub-load is obtained by allocating the i +1 th sub-load to the second node according to the i +1 th candidate allocation of the i +1 th sub-load.
4. The method of claim 2, wherein the allocating the ith sub-load to the 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 remaining capacity of the second node, shifting 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.
5. The method of claim 1, wherein splitting the load set into n sub-loads comprises:
dividing the load in the load set into n sub-loads according to load independence;
and sorting the n sub-loads according to the sizes of the loads to obtain the sorted load set.
6. The method of claim 5, wherein sorting the n sub-loads according to load size to obtain the sorted load set comprises:
and sorting the n sub-loads from large to small to obtain the sorted first load set.
7. The method of any of claims 2 to 6, further comprising:
and when the ith sub-load is larger than the residual capacity of the second node, not moving the ith sub-load out of the load set, ending the current distribution of the load set, and discarding the candidate distribution scheme corresponding to the current distribution.
8. A load scheduling apparatus, applied in a routing system including a plurality of nodes, the apparatus comprising: the system comprises an acquisition module, a splitting module, a determining module and a distributing module;
the obtaining module is configured to obtain a load set needing to be scheduled on a first node when the load of the first node is higher than a scheduling condition;
the splitting module configured to split the set of loads into n sub-loads;
the determining module configured to determine at least two sets of candidate allocation schemes to allocate the n sub-loads to other nodes;
the determining module is configured to determine a target allocation scheme in the at least two sets of candidate allocation schemes, where the target allocation scheme is an allocation scheme with a largest minimum remaining capacity value corresponding to the other nodes;
the distribution module is configured to distribute the n sub-loads to the other nodes according to the target distribution scheme.
9. The apparatus of claim 8,
the distributing module is configured to distribute the ith sub-load to a second node when the ith sub-load in the n sub-loads is not greater than the remaining capacity of the second node, wherein the second node is one of the other nodes, and at least one group of ith candidate distribution for distributing the ith sub-load is obtained;
the distribution module is configured to add one to the i and then execute the previous step again when the i is not equal to the n to obtain at least one group of i +1 th candidate distribution for distributing the i +1 th sub-load;
the determining module is configured to combine all candidate allocations between the 1 st sub-load and the nth sub-load to obtain the 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.
10. The apparatus of claim 9,
the i +1 th candidate distribution for distributing the i +1 th sub-load is obtained by distributing the i +1 th sub-load to the second node according to the i +1 th candidate distribution for distributing the i th sub-load.
11. The apparatus of claim 9, further comprising an update module;
the distribution module is configured to shift the ith sub-load out of the load set and distribute the ith sub-load to the second node when the ith sub-load is not greater than the remaining capacity of the second node;
the update module is configured to update the remaining capacity of the second node.
12. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement a load scheduling method as claimed in any one of claims 1 to 7.
13. A computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement a load scheduling method as claimed in any one of claims 1 to 7.
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 true CN110795250A (en) 2020-02-14
CN110795250B 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)

Cited By (1)

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

Citations (7)

* 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
CN102724100A (en) * 2011-03-29 2012-10-10 中国科学院声学研究所 Board resource distribution system and method aiming at combination service
US20140310418A1 (en) * 2013-04-16 2014-10-16 Amazon Technologies, Inc. Distributed load balancer
CN104270322A (en) * 2014-10-30 2015-01-07 中电海康集团有限公司 Self-adaptive load balance scheduling mechanism for internet-of-things device access processing platform
CN108769271A (en) * 2018-08-20 2018-11-06 北京百度网讯科技有限公司 Method, apparatus, storage medium and the terminal device of load balancing
CN109936606A (en) * 2017-12-18 2019-06-25 浙江宇视科技有限公司 Method for allocating tasks and device

Patent Citations (7)

* 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
CN102724100A (en) * 2011-03-29 2012-10-10 中国科学院声学研究所 Board resource distribution system and method aiming at combination service
US20140310418A1 (en) * 2013-04-16 2014-10-16 Amazon Technologies, Inc. Distributed load balancer
CN104270322A (en) * 2014-10-30 2015-01-07 中电海康集团有限公司 Self-adaptive load balance scheduling mechanism for internet-of-things device access processing platform
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

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CHANGXU DU等: "A parallel router based on load-balanced region partition strategy", 《2009 INTERNATIONAL CONFERENCE ON COMMUNICATIONS, CIRCUITS AND SYSTEMS》 *
杜炯: "基于服务功能链的交换机架构研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
王海涛等: "基于历史数据的虚拟机资源分配方法", 《计算机研究与发展》 *

Cited By (2)

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

Also Published As

Publication number Publication date
CN110795250B (en) 2023-05-12

Similar Documents

Publication Publication Date Title
US10397117B2 (en) System and method for packet distribution on a network
CN108011817B (en) Method and system for redeploying power communication private network service route
US7752628B2 (en) Method and apparatus for reassigning objects to processing units
US8730794B2 (en) Priority service protection
US10660069B2 (en) Resource allocation device and resource allocation method
CN110888407B (en) Task allocation method and device in AGV (automatic guided vehicle) scheduling system
CN106130920A (en) A kind of message forwarding method and device
CN110795250A (en) Load scheduling method, device, equipment and storage medium
CN101651598A (en) Method and device for allocating network resources
JP6778146B2 (en) Service slice allocation device and service slice allocation method
US7647592B2 (en) Methods and systems for assigning objects to processing units
CN117176638A (en) Routing path determining method and related components
CN113259440B (en) Load balancing-based dynamic deployment method and system for virtual network functions
CN113760549A (en) Pod deployment method and device
CN101651572A (en) Method and device for achieving topology search in network management system
CN111628943B (en) Intelligent Internet of things method based on communication and perception technology
CN111193607B (en) Method, device and storage medium for transmission resource management
CN106982169B (en) Message forwarding method and device
CN109643248A (en) For method that is automatic in highly distributed data processing system and dynamically will distributing to available computation module for the responsibility of task
US11397618B2 (en) Resource allocation device, resource allocation method, and resource allocation program
CN113672347A (en) Container group scheduling method and device
CN113326099A (en) Resource management method, device, electronic equipment and storage medium
Gharbaoui et al. An orchestrator of network and cloud resources for dynamic provisioning of mobile virtual network functions
CN112948104A (en) Load balancing data acquisition method and device
G∤ ąbowski et al. Simulation studies of communication systems with mutual overflows and threshold mechanisms

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