CN110881058A - Request scheduling method, device, server and storage medium - Google Patents

Request scheduling method, device, server and storage medium Download PDF

Info

Publication number
CN110881058A
CN110881058A CN201811037916.9A CN201811037916A CN110881058A CN 110881058 A CN110881058 A CN 110881058A CN 201811037916 A CN201811037916 A CN 201811037916A CN 110881058 A CN110881058 A CN 110881058A
Authority
CN
China
Prior art keywords
server
partition
sub
data processing
system resource
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
CN201811037916.9A
Other languages
Chinese (zh)
Other versions
CN110881058B (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811037916.9A priority Critical patent/CN110881058B/en
Publication of CN110881058A publication Critical patent/CN110881058A/en
Application granted granted Critical
Publication of CN110881058B publication Critical patent/CN110881058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The embodiment of the application provides a request scheduling method, a request scheduling device, a server and a storage medium. In the embodiment of the application, the consumed first system resource of a first processing server is obtained; determining whether the first system resource meets a preset condition; if the first system resource meets the preset condition, splitting the target partition bound with the first processing server into a plurality of sub-partitions so as to enable second system resources occupied by the data processing request of each sub-partition to tend to be balanced; and dispatching the data processing requests of partial sub-partitions in the plurality of sub-partitions to the second processing server. According to the embodiment of the application, the limit of the processing capacity of the first processing server can be avoided from being triggered, the limit of the processing capacity of the second processing server can be avoided from being triggered, and further, the problem that an enterprise can not normally provide data services to the outside can be avoided.

Description

Request scheduling method, device, server and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a request scheduling method, apparatus, server, and storage medium.
Background
Currently, each large enterprise needs to provide data services to the outside, in order to improve the data service capability of the enterprise, a data set of the enterprise for providing data services to the outside is often divided into a plurality of partitions, and a processing server is bound to each partition, when a scheduling server receives a data access request for certain data, the partition where the data is located may be determined, then the processing server bound to the partition is determined, and then the data access request is scheduled to the processing server, so that the processing server processes the data access request.
However, if a large number of users need to access data in a certain partition in a short time, a processing server bound to the partition may receive a large number of data access requests in a short time, which may trigger a limit of the processing capacity of the processing server, cause the processing server to crash, and further cause an enterprise to fail to provide data services to the outside normally.
In order to avoid the crash of the processing server, the scheduling server may count the number of data access requests of each partition key in the partition, split the partition into two sub-partitions according to the partition key, so that the number of data access requests of each sub-partition tends to be balanced, and then schedule the data access request of one sub-partition to other processing servers.
However, the inventor found that after a data access request of one of the sub-partitions is dispatched to another processing server, the limit of the processing capability of the processing server may still be triggered to cause the processing server to crash, or the limit of the processing capability of another processing server may still be triggered to cause the other processing server to crash, which still causes the enterprise to fail to normally provide data services to the outside.
Disclosure of Invention
In order to solve the foregoing technical problem, embodiments of the present application provide a request scheduling method, apparatus, server, and storage medium.
In a first aspect, an embodiment of the present application illustrates a request scheduling method, where the method includes:
acquiring consumed first system resources of a first processing server;
determining whether the first system resource meets a preset condition;
if the first system resource meets a preset condition, splitting the target partition bound with the first processing server into a plurality of sub-partitions so as to enable second system resources occupied by the data processing request of each sub-partition to tend to be balanced;
and dispatching the data processing requests of partial sub-partitions in the plurality of sub-partitions to a second processing server.
In an optional implementation manner, after the scheduling the data processing requests of the partial sub-partitions in the plurality of sub-partitions to the second processing server, the method further includes:
receiving a new data processing request of the partial sub-partition;
and dispatching the new data processing request to the second processing server.
In an optional implementation manner, the obtaining currently consumed first system resources of the first processing server includes:
and searching the system resource corresponding to the server identification of the first server in the first corresponding relation between the server identification of the server and the consumed system resource of the server, and taking the system resource as the first system resource.
In an optional implementation manner, the splitting the target partition bound to the first processing server into a plurality of sub-partitions includes:
determining a target partition bound with the first processing server;
acquiring a third system resource occupied by a data processing request of a fragment key in the target partition;
determining at least two dividing points among a plurality of slicing keys included in the target partition;
for each division point, in a plurality of fragment keys included in the target partition, counting absolute values of differences between system resources respectively occupied by the fragment keys positioned at two sides of the division point;
determining a target segmentation point corresponding to the minimum absolute value in the at least two segmentation points;
and respectively forming different sub-partitions by the slicing keys positioned at the two sides of the target dividing point.
In an alternative implementation, the determining the target partition bound to the first processing server includes:
searching a partition identifier corresponding to the server identifier of the first processing server in a second corresponding relation between the server identifier of the server and the partition identifier of the partition;
and determining the partition corresponding to the partition identification as the target partition.
In an optional implementation manner, the obtaining of the third system resource occupied by the data processing request of the fragment key in the target partition includes:
and searching system resources respectively corresponding to each fragment key in the target partition in a third corresponding relation between the fragment key and the system resources occupied by the data processing request of the fragment key, and taking the system resources as the third system resources.
In an optional implementation manner, the obtaining of the third system resource occupied by the data processing request of the fragment key in the target partition includes:
and searching system resources respectively corresponding to each fragment key set in the target partition in a third corresponding relation between the fragment key set and the system resources occupied by the data processing requests of the fragment key set, and taking the system resources as the third system resources.
In an optional implementation manner, the scheduling, to the second processing server, the data processing requests of a part of the sub-partitions in the plurality of sub-partitions includes:
for each sub-partition in the partial sub-partitions, acquiring a second system resource occupied by a data processing request of the sub-partition;
selecting a second processing server from a plurality of processing servers which are arranged in advance;
acquiring consumed fourth system resources of the second server;
and if the difference value between the preset system resource and the fourth system resource is larger than the second system resource, scheduling the data processing request of the sub-partition to the selected second processing server.
In an optional implementation manner, the scheduling, to the second processing server, the data processing requests of a part of the sub-partitions in the plurality of sub-partitions includes:
for each sub-partition in the partial sub-partitions, selecting a second processing server with the minimum consumed system resource from a plurality of processing servers which are arranged in advance;
and dispatching the data processing request of the sub-partition to the selected second processing server.
In a second aspect, an embodiment of the present application shows a request scheduling apparatus, where the apparatus includes:
an acquisition module, configured to acquire consumed first system resources of a first processing server;
the determining module is used for determining whether the first system resource meets a preset condition;
the splitting module is used for splitting the target partition bound with the first processing server into a plurality of sub-partitions if the first system resource meets a preset condition so as to enable second system resources occupied by the data processing request of each sub-partition to tend to be balanced;
and the first scheduling module is used for scheduling the data processing requests of part of the sub-partitions to the second processing server.
In an optional implementation, the apparatus further comprises:
a receiving module, configured to receive a new data processing request of the partial sub-partition;
and the second scheduling module is used for scheduling the new data processing request to the second processing server.
In an optional implementation manner, the obtaining module is specifically configured to: and searching the system resource corresponding to the server identification of the first server in the first corresponding relation between the server identification of the server and the consumed system resource of the server, and taking the system resource as the first system resource.
In an optional implementation manner, the splitting module includes:
a first determination unit configured to determine a target partition bound to the first processing server;
the first acquisition unit is used for acquiring a third system resource occupied by the data processing request of the fragment key in the target partition;
a second determining unit, configured to determine at least two partitioning points between the slicing keys included in the target partition;
the counting unit is used for counting the absolute value of the difference value between the system resources respectively occupied by the slicing keys positioned at the two sides of each dividing point in the plurality of slicing keys included in the target partition for each dividing point;
a third determining unit, configured to determine a target segmentation point corresponding to a minimum absolute value among the at least two segmentation points;
and the composition unit is used for respectively composing the fragment keys positioned at the two sides of the target division point into different sub-partitions.
In an optional implementation manner, the first determining unit includes:
a searching subunit, configured to search, in a second correspondence between a server identifier of a server and a partition identifier of a partition, a partition identifier corresponding to the server identifier of the first processing server;
and the determining subunit is configured to determine the partition corresponding to the partition identifier as the target partition.
In an optional implementation manner, the first obtaining unit is specifically configured to: and searching system resources respectively corresponding to each fragment key in the target partition in a third corresponding relation between the fragment key and the system resources occupied by the data processing request of the fragment key, and taking the system resources as the third system resources.
In an optional implementation manner, the first obtaining unit is specifically configured to: and searching system resources respectively corresponding to each fragment key set in the target partition in a third corresponding relation between the fragment key set and the system resources occupied by the data processing requests of the fragment key set, and taking the system resources as the third system resources.
In an optional implementation manner, the first scheduling module includes:
a second obtaining unit, configured to obtain, for each sub-partition in the partial sub-partitions, a second system resource occupied by the data processing request of the sub-partition;
a first selection unit configured to select a second processing server among a plurality of processing servers set in advance;
a third acquiring unit, configured to acquire a consumed fourth system resource of the second server;
and the first scheduling unit is used for scheduling the data processing request of the sub-partition to the selected second processing server if the difference value between the preset system resource and the fourth system resource is greater than the second system resource.
In an optional implementation manner, the first scheduling module includes:
a second selection unit configured to select, for each of the partial sub-partitions, a second processing server that has a smallest consumed system resource among a plurality of processing servers that are set in advance;
and the second scheduling unit is used for scheduling the data processing requests of the sub-partitions to the selected second processing server.
In a third aspect, an embodiment of the present application shows a server, including:
a processor; and
a memory having executable code stored thereon, which when executed causes the processor to perform the request scheduling method of the first aspect.
In a fourth aspect, embodiments of the present application show one or more machine-readable media having executable code stored thereon, which when executed, cause a processor to perform the request scheduling method according to the first aspect.
Compared with the prior art, the embodiment of the application has the following advantages:
wherein, different data processing requests often occupy different system resources. According to the method in the prior art, the target partition is split into two sub-partitions according to the fragment key, so that the number of data access requests of each sub-partition tends to be balanced, but the difference between the system resources occupied by the data processing requests of different sub-partitions may be very large.
If the data processing request of one sub-partition which occupies very little system resources is dispatched to the second processing server, the data processing request of another sub-partition which occupies very much system resources is retained in the first processing server, and at this time, only a small part of the system resources in the first processing server is released, which may still trigger the limit of the processing capability of the first processing server, resulting in the crash of the first processing server, and further resulting in that the enterprise cannot provide data services to the outside normally.
If the data processing request of another sub-partition, which occupies a large amount of system resources, is dispatched to the second processing server, and the data processing request of another sub-partition needs to occupy a large amount of system resources in the second processing server, the limit of the processing capability of the second processing server may be triggered, so that the second processing server is crashed, and further, the enterprise cannot normally provide data services to the outside.
However, in the embodiment of the present application, the consumed first system resource of the first processing server is acquired; determining whether the first system resource meets a preset condition; if the first system resource meets the preset condition, splitting the target partition bound with the first processing server into a plurality of sub-partitions so as to enable second system resources occupied by the data processing request of each sub-partition to tend to be balanced; and dispatching the data processing requests of partial sub-partitions in the plurality of sub-partitions to the second processing server.
By means of the method and the device, the data processing request of the first processing server is divided into two parts, and system resources occupied by the two parts of data processing requests tend to be balanced, namely, differences among the system resources occupied by the data processing requests of different sub-partitions are very small.
Therefore, after the data processing request of one sub-partition is dispatched to the second processing server, firstly, compared with the prior art, more system resources in the first processing server can be released, so that the limit of the processing capacity of the first processing server can be avoided from being triggered, the first processing server is prevented from being crashed, and further, an enterprise can be prevented from providing data services to the outside normally. Secondly, compared with the prior art, the data processing request of the sub-partition can occupy less system resources in the second processing server, so that the limit of the processing capacity of the second processing server can be avoided from being triggered, the second processing server is prevented from being crashed, and further, an enterprise can not provide data services to the outside normally.
Drawings
FIG. 1 is a block diagram illustrating a request scheduling system in accordance with an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method of request scheduling in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating a method of splitting a target partition in accordance with an exemplary embodiment;
FIG. 4 is a flow chart illustrating a method of request scheduling in accordance with an exemplary embodiment;
FIG. 5 is a flow chart illustrating a method of request scheduling in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating a request scheduling apparatus in accordance with an exemplary embodiment;
fig. 7 is a block diagram illustrating a request scheduling apparatus according to an example embodiment.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
Fig. 1 is a block diagram illustrating a request scheduling system according to an exemplary embodiment, where the system includes a scheduling server 01 and a plurality of processing servers 02, and the scheduling server 01 is communicatively connected to each processing server.
The scheduling server 01 may receive a data processing request transmitted from the outside and schedule the data processing request to one processing server 02 so that the processing server 02 processes the data processing request.
Fig. 2 is a flowchart illustrating a request scheduling method according to an exemplary embodiment, which is used in the scheduling server 01 shown in fig. 1, as shown in fig. 2, and includes the following steps.
In step S101, a consumed first system resource of a first processing server is acquired;
for any processing server in the system shown in fig. 1, the scheduling server may maintain a corresponding table entry between the server identifier of the processing server and the consumed system resource of the processing server in a first corresponding relationship between the server identifier of the server and the consumed system resource of the server, and then the processing server may count the consumed system resource of the processing server in real time or periodically and notify the scheduling server of the consumed system resource, and after the scheduling server obtains the consumed system resource of the processing server, the scheduling server may update the consumed system resource of the processing server in the corresponding table entry in the first corresponding relationship. The same is true for each of the other processing servers in the system shown in fig. 1.
Therefore, in this step, the scheduling server may search for a system resource corresponding to the server identifier of the first processing server in the first correspondence between the server identifier of the server and the consumed system resource of the server, and use the system resource as the consumed first system resource of the first processing server. The first processing server is any processing server in the plurality of processing servers.
In the embodiment of the present application, in order to avoid triggering the limit of the processing capability of the first processing server, so as to avoid that the first processing server cannot provide data services to the outside normally, the scheduling server may execute the process from step S101 to step S104 in real time, or execute the process from step S101 to step S104 at a short periodic timing.
In step S102, determining whether the first system resource satisfies a preset condition;
in the embodiment of the present application, when the limit of the processing capability of a certain processing server is triggered, the processing server may be crashed, and thus the processing server may not provide data services to the outside normally, in general, if the consumed system resource of a certain processing server is close to the total system resource of the processing server, the limit of the processing capability of the processing server may be triggered.
Therefore, in the embodiment of the present application, it may be determined whether the first system resource is greater than or equal to the preset system resource; if the first system resource is greater than or equal to the preset system resource, determining that the first system resource meets the preset condition, and then executing step S103; and if the first system resource is smaller than the preset system resource, determining that the first system resource does not meet the preset condition, and ending the process.
When the preset system resources are set in advance, if the total system resources of each processing server are the same, a uniform preset system resource can be set, and if the total system resources of each processing server are not all the same, different preset system resources can be set by different processing servers.
If the first system resource meets the preset condition, in step S103, splitting the target partition bound to the first processing server into a plurality of sub-partitions, so that the second system resources occupied by the data processing request of each sub-partition tend to be balanced;
in this embodiment of the present application, different processing servers are bound with different partitions, a partition bound by a first processing server is a target partition, the target partition includes a plurality of fragment keys, a total of system resources occupied by data processing requests of the fragment keys of each target partition is equal to system resources occupied by the data processing requests of the target partition, the target partition can be split into a plurality of sub-partitions according to the fragment keys, and second system resources occupied by the data processing requests of each sub-partition tend to be balanced.
When the target partition is split according to the fragment key, multiple splitting modes can be provided, after the target partition is split according to any one splitting mode, multiple sub-partitions can be obtained, differences often exist between system resources occupied by data processing requests of each sub-partition, each splitting mode corresponds to one difference, and after the target partition is split into multiple sub-partitions according to the splitting mode corresponding to the minimum difference, second system resources occupied by the data processing requests of each sub-partition tend to be balanced.
The specific splitting manner can be seen in the embodiment shown in fig. 3, and is not described in detail here.
It can be understood that the embodiment shown in fig. 3 is only one splitting manner for splitting the target partition, and other manners may also be used for splitting the target partition, and only the second system resources occupied by the data processing request of each sub-partition need to be split and obtained and tend to be balanced, and the specific splitting manner is not limited in the embodiment of the present application.
In step S104, data processing requests of a part of the plurality of sub-partitions are scheduled to the second processing server.
The second processing server can process the data processing request of the partial sub-partition, and the first processing server does not need to process the data processing request of the partial sub-partition, so that partial system resources in the first processing server can be released, consumed system resources of the first processing server can be reduced, the limit of the processing capacity of the first processing server can be avoided from being triggered, and the first processing server can be prevented from providing data service to the outside normally.
The dispatch server may then receive a new data processing request for the portion of the child partition if the new data processing request for the portion of the child partition is received; the new data processing request may be dispatched to the second processing server to cause the second processing server to process the new data processing request for the portion of the child partition.
In the embodiment of the present application, there may be one or more second processing servers.
The number of the second servers may be determined according to the number of the sub-partitions obtained by splitting the target partition, and optionally, the number of the second servers may be a difference value between the number of the sub-partitions obtained by splitting the target partition and a value 1.
Assuming that the target partition is split into two sub-partitions, a second processing server may be used, for example, the data processing request of one sub-partition is still retained in the first processing server, and the data processing request of the other sub-partition is dispatched to the second processing server.
Assuming that the target partition is split into three sub-partitions, two second processing servers may be used at this time, for example, data processing requests of one sub-partition are still retained in the first processing server, data processing requests of another sub-partition are scheduled to one second processing server, and data processing requests of yet another sub-partition are scheduled to another second processing server.
Wherein, different data processing requests often occupy different system resources. According to the method in the prior art, the target partition is split into two sub-partitions according to the fragment key, so that the number of data access requests of each sub-partition tends to be balanced, but the difference between the system resources occupied by the data processing requests of different sub-partitions may be very large.
If the data processing request of one sub-partition which occupies very little system resources is dispatched to the second processing server, the data processing request of another sub-partition which occupies very much system resources is retained in the first processing server, and at this time, only a small part of the system resources in the first processing server is released, which may still trigger the limit of the processing capability of the first processing server, resulting in the crash of the first processing server, and further resulting in that the enterprise cannot provide data services to the outside normally.
If the data processing request of another sub-partition, which occupies a large amount of system resources, is dispatched to the second processing server, and the data processing request of another sub-partition needs to occupy a large amount of system resources in the second processing server, the limit of the processing capability of the second processing server may be triggered, so that the second processing server is crashed, and further, the enterprise cannot normally provide data services to the outside.
However, in the embodiment of the present application, the consumed first system resource of the first processing server is acquired; determining whether the first system resource meets a preset condition; if the first system resource meets the preset condition, splitting the target partition bound with the first processing server into a plurality of sub-partitions so as to enable second system resources occupied by the data processing request of each sub-partition to tend to be balanced; and dispatching the data processing requests of partial sub-partitions in the plurality of sub-partitions to the second processing server.
By means of the method and the device, the data processing request of the first processing server is divided into two parts, and system resources occupied by the two parts of data processing requests tend to be balanced, namely, differences among the system resources occupied by the data processing requests of different sub-partitions are very small.
Therefore, after the data processing request of one sub-partition is dispatched to the second processing server, firstly, compared with the prior art, more system resources in the first processing server can be released, so that the limit of the processing capacity of the first processing server can be avoided from being triggered, the first processing server is prevented from being crashed, and further, an enterprise can be prevented from providing data services to the outside normally. Secondly, compared with the prior art, the data processing request of the sub-partition can occupy less system resources in the second processing server, so that the limit of the processing capacity of the second processing server can be avoided from being triggered, the second processing server is prevented from being crashed, and further, an enterprise can not provide data services to the outside normally.
In order to make the system resources occupied by the split sub-partitions tend to be balanced, in an optional implementation manner, referring to fig. 3, step S103 may be implemented by the following process, including:
in step S201, a target partition bound to a first processing server is determined;
in the embodiment of the present application, each processing server in the system shown in fig. 1 is bound to one or more partitions, and the partitions bound by different processing servers are different.
For any processing server, when the processing server is bound to a certain partition in advance, the server identifier of the processing server and the partition identifier of the partition may be combined into a corresponding table entry, and the corresponding table entry is stored in the second corresponding relationship between the server identifier of the server and the partition identifier of the partition, so as to bind the processing server to the partition, and the same is true for each of the other processing servers.
Therefore, in this step, the partition identifier corresponding to the server identifier of the first processing server may be searched for in the second correspondence between the server identifier of the server and the partition identifier of the partition; and determining the partition corresponding to the partition identification as a target partition bound with the first processing server.
In step S202, a third system resource occupied by the data processing request of the fragment key in the target partition is obtained;
in this embodiment, the target partition often includes one or more fragment keys, and a system resource occupied by a data processing request of the target partition is equal to a sum of system resources occupied by data processing requests of each fragment key in the target partition.
For any one fragment key in the target partition, the scheduling server maintains a corresponding table entry between the fragment key and the system resource occupied by the data processing request of the fragment key in a third corresponding relationship between the fragment key and the system resource occupied by the data processing request of the fragment key, secondly, the first processing server counts the system resource occupied by the data processing request of the fragment key in real time or periodically, notifies the scheduling server of the system resource occupied by the data processing request of the fragment key, and updates the system resource occupied by the data processing request of the fragment key in the corresponding table entry in the third corresponding relationship after the scheduling server obtains the system resource occupied by the data processing request of the fragment key. The same is true for every other sharded key in the target partition.
Therefore, in this step, in the third corresponding relationship between the fragment key and the system resource occupied by the data processing request of the fragment key, the system resource corresponding to each fragment key in the target partition may be searched and used as the third system resource.
However, sometimes, the number of the sharded keys included in the target partition is very large, and thus, each sharded key maintains a corresponding table entry between the sharded key and the system resource occupied by the data processing request of the sharded key in the third corresponding relationship, which occupies a large storage space.
Therefore, in order to save storage space, in another embodiment of the present application, among the plurality of sharding keys included in the target partition, any at least two sharding keys may be grouped into a sharding key set, and the sharding keys in different sharding key sets are different.
Thus, for any one sharded key set in the target partition, the scheduling server maintains a corresponding table entry between the sharded key set and the system resource occupied by the data processing request of the sharded key set in a third corresponding relationship between the sharded key set and the system resource occupied by the data processing request of the sharded key set, secondly, the first processing server counts the system resource occupied by the data processing request of the sharded key set in real time or periodically, notifies the scheduling server of the system resource occupied by the data processing request of the sharded key set, and updates the system resource occupied by the data processing request of the sharded key set in the corresponding table entry in the third corresponding relationship after the scheduling server obtains the system resource occupied by the data processing request of the sharded key set. The same is true for each of the other sharded key sets in the target partition.
Therefore, in this step, in the third corresponding relationship between the fragmentation key set and the system resources occupied by the data processing request of the fragmentation key set, the system resources respectively corresponding to each fragmentation key set in the target partition may be searched and used as the third system resources.
In step S203, at least two dividing points are determined among the slicing keys included in the target partition;
in an embodiment of the present application, if in step S202, the system resources corresponding to each shard key in the target partition are searched for in the third corresponding relationship between the shard key and the system resources occupied by the data processing request of the shard key, a dividing point may be set between every two adjacent shard keys, where the number of the dividing points is a difference between the number of shard keys included in the target partition and the value 1.
In another embodiment of the present application, if in step S202, system resources corresponding to each shard key set in the target partition are searched in the third correspondence between the shard key set and the system resources occupied by the data processing request of the shard key set, a dividing point may be set between every two adjacent shard key sets, where the number of the dividing points is a difference between the number of shard key sets included in the target partition and the value 1.
In an example, the distance is described by taking an example that a dividing point is arranged between every two adjacent slicing keys, but the distance is not taken as a limitation to the scope of the present application.
For example, assuming that the target partition includes a slice key a, a slice key c, a slice key f, a slice key h, and a slice key z, a separation point 1 may be provided between the slice key a and the slice key c, a separation point 2 may be provided between the slice key c and the slice key f, a separation point 3 may be provided between the slice key f and the slice key h, and a separation point 4 may be provided between the slice key h and the slice key z.
In step S204, for each partition point, in a plurality of fragment keys included in the target partition, counting absolute values of differences between system resources respectively occupied by the fragment keys located on both sides of the partition point;
for any one division point, the division point divides a plurality of fragment keys included by the target partition into two parts, one part of the fragment keys is positioned at one side of the division point, the other part of the fragment keys is positioned at the other side of the division point, system resources occupied by data processing requests of one part of the fragment keys positioned at one side of the division point are counted, system resources occupied by data processing requests of the other part of the fragment keys positioned at the other side of the division point are counted, and then the absolute value of the difference value between the two counted system resources is calculated. The same is true for each of the other segmentation points.
For example, in the target partition, it is assumed that the system resource occupied by the data processing request of the fragment key a is 30, the system resource occupied by the data processing request of the fragment key c is 20, the system resource occupied by the data processing request of the fragment key f is 50, the system resource occupied by the data processing request of the fragment key h is 30, and the system resource occupied by the data processing request of the fragment key z is 40.
The division point 1 divides a plurality of fragment keys included in the target partition into two part fragment keys, wherein one part of the fragment keys comprise a fragment key a, and the other part of the fragment keys comprise a fragment key c, a fragment key f, a fragment key h and a fragment key z. The system resources occupied by the data processing requests of a part of the fragment keys on one side of the partition point 1 comprise: the system resource occupied by the data processing request of the fragment key a is as follows: 30. the system resources occupied by the data processing request of the other part of the fragment key positioned on the other side of the division point 1 comprise: the sum of the system resources occupied by the data processing requests of the sharding key c, the sharding key f, the sharding key h and the sharding key z respectively is as follows: 140. the absolute value of the difference between system resource 30 and system resource 140 is calculated to be 110.
The division point 2 divides a plurality of fragment keys included in the target partition into two part fragment keys, wherein one part of the fragment keys comprise a fragment key a and a fragment key c, and the other part of the fragment keys comprise a fragment key f, a fragment key h and a fragment key z. The system resources occupied by the data processing requests of a part of the fragment keys on one side of the partition point 2 comprise: the sum of the system resources occupied by the data processing requests of the sharding key a and the sharding key c respectively is as follows: 50. the system resources occupied by the data processing request of the other part of the fragment key positioned on the other side of the division point 2 comprise: the sum of the system resources occupied by the data processing requests of the sharding key f, the sharding key h and the sharding key z respectively is as follows: 120. the absolute value of the difference between the computing system resource 50 and the system resource 120 is 70.
The division point 3 divides a plurality of slicing keys included in the target partition into two parts of slicing keys, wherein one part of slicing keys comprise a slicing key a, a slicing key c and a slicing key f, and the other part of slicing keys comprise a slicing key h and a slicing key z. The system resources occupied by the data processing requests of a part of the fragment keys positioned on one side of the partition point 3 comprise: the sum of the system resources occupied by the data processing requests of the fragmentation key a, the fragmentation key c and the fragmentation key f respectively is as follows: 100. the system resources occupied by the data processing request of the other part of the fragment key positioned on the other side of the division point 3 comprise: the sum of the system resources occupied by the data processing requests of the sharding key h and the sharding key z respectively: 70. the absolute value of the difference between the computing system resource 100 and the system resource 70 is 30.
The division point 4 divides a plurality of fragment keys included in the target partition into two part fragment keys, wherein one part of the fragment keys comprise a fragment key a, a fragment key c, a fragment key f and a fragment key h, and the other part of the fragment keys comprise a fragment key z. The system resources occupied by the data processing requests of a part of the fragment keys positioned on one side of the division point 4 comprise: the sum of the system resources occupied by the data processing requests of the fragment key a, the fragment key c, the fragment key f and the fragment key h is as follows: 130. the system resources occupied by the data processing request of the other part of the fragment key positioned on the other side of the division point 4 include: the sum of the system resources occupied by the data processing request of the sharded key z is as follows: 20. the absolute value of the difference between the computing system resource 130 and the system resource 20 is 110.
In step S205, a target division point corresponding to the smallest absolute value is determined among the at least two division points;
in the present application, each of the counted absolute values corresponds to one of the at least two segmentation points, and the segmentation point corresponding to the smallest absolute value among the at least two segmentation points is the target segmentation point.
For example, in the foregoing example, among the counted absolute values of the differences between the system resources 110, 70, 30, and 110, the smallest absolute value 30 corresponds to the division point being the division point 3, and therefore, the division point 3 can be determined as the target division point.
In step S206, the slice keys on both sides of the target division point are respectively grouped into different sub-partitions.
In this embodiment, the target dividing point divides the plurality of segment keys included in the target partition into two parts, one part of the segment keys is located on one side of the target dividing point, the other part of the segment keys is located on the other side of the target dividing point, and the segment keys located on one side of the target dividing point may be grouped into one sub-partition, and the segment keys located on the other side of the target dividing point may be grouped into another sub-partition.
For example, in the foregoing example, the slice key a, the slice key c, and the slice key f located on one side of the division point 3 constitute one sub-partition, and the slice key h and the slice key z located on the other side of the division point 3 constitute another sub-partition.
In the foregoing embodiment, if the consumed system resources of the second processing server are more, after the data processing requests of the partial sub-partitions in the plurality of sub-partitions are dispatched to the second processing server, the second server needs to process the data processing requests of the partial sub-partitions in the plurality of sub-partitions, since processing the data processing requests of the partial sub-partitions in the plurality of sub-partitions needs to occupy partial system resources, the consumed system resources of the second processing server may be continuously increased, and if the consumed system resources of the second processing server are already many, the consumed system resources of the second processing server may possibly meet the preset requirement, for example, the consumed system resources of the second processing server is greater than or equal to the preset system resources, so that the limit of the processing capacity of the second processing server is easily triggered, thereby causing the second processing server to fail to provide data service to the outside normally.
Therefore, in order to avoid the above problem, in another embodiment of the present application, when scheduling the data processing request of the partial sub-partition of the plurality of sub-partitions to the second processing server, for each sub-partition of the partial sub-partitions of the plurality of sub-partitions, referring to fig. 4, the scheduling the data processing request of the sub-partition to the second processing server may be performed according to the following procedures, including:
in step S301, a second system resource occupied by the data processing request of the sub-partition is obtained;
determining the fragment keys included by the sub-partition, then searching the system resources respectively corresponding to each fragment key included by the sub-partition in a third corresponding relation between the fragment keys and the system resources occupied by the data processing requests of the fragment keys, then counting the sum of the searched system resources, and taking the sum as the second system resource occupied by the data processing requests of the sub-partition.
In step S302, a second processing server is selected among a plurality of processing servers set in advance;
wherein, one processing server can be randomly selected from the plurality of processing servers as the second processing server.
In step S303, the consumed fourth system resource of the second server is acquired;
the scheduling server may search for a system resource corresponding to the server identifier of the second server in the first correspondence between the server identifier of the server and the consumed system resource of the server, and use the system resource as the fourth system resource.
In step S304, if the difference between the preset system resource and the fourth system resource is greater than the second system resource, the data processing request of the sub-partition is scheduled to the selected second processing server.
And calculating a difference value between the preset system resource and the fourth system resource, comparing the difference value with the second system resource, and if the difference value is greater than the second system resource, even if the data processing request of the sub-partition is dispatched to the selected second processing server, the consumed system resource of the second processing server cannot be greater than or equal to the preset system resource, the limit of the processing capacity of the second processing server cannot be triggered, and the second processing server cannot normally provide data service to the outside, so that the data processing request of the sub-partition can be dispatched to the selected second processing server.
If the difference is smaller than the second system resource, if the data processing request of the sub-partition is scheduled to the selected second processing server, the consumed system resource of the second processing server may be greater than or equal to the preset system resource, and then the limit of the processing capability of the second processing server may be triggered, and the second processing server may not provide data service to the outside normally, so that if the difference is smaller than the second system resource, the step S302 needs to be executed again.
In another embodiment of the present application, in order to balance the load among the processing servers, that is, balance the consumed system resources of the processing servers, for each sub-partition in the partial sub-partitions, referring to fig. 5, the scheduling the data processing request of the sub-partition to the second processing server according to the following process may include:
in step 401, selecting a second processing server with the minimum consumed system resource from a plurality of processing servers set in advance;
the scheduling server may look up a system resource corresponding to the server identification of each of the plurality of processing servers in the first correspondence between the server identification of the server and the consumed system resource of the server as the consumed system resource of each of the plurality of processing servers. A processing server with the smallest consumed system resource is selected from the plurality of processing servers and used as a second processing server.
In step 402, the data processing request of the sub-partition is dispatched to the selected second processing server.
FIG. 6 is a block diagram illustrating a request scheduling apparatus in accordance with an exemplary embodiment; referring to fig. 6, the apparatus includes:
an obtaining module 11, configured to obtain consumed first system resources of a first processing server;
a determining module 12, configured to determine whether the first system resource meets a preset condition;
a splitting module 13, configured to split the target partition bound to the first processing server into multiple sub-partitions if the first system resource meets a preset condition, so that second system resources occupied by the data processing request of each sub-partition tend to be balanced;
a first scheduling module 14, configured to schedule the data processing request of a part of the sub-partitions in the plurality of sub-partitions to the second processing server.
In an optional implementation, the apparatus further comprises:
a receiving module, configured to receive a new data processing request of the partial sub-partition;
and the second scheduling module is used for scheduling the new data processing request to the second processing server.
In an optional implementation manner, the obtaining module 11 is specifically configured to: and searching the system resource corresponding to the server identification of the first server in the first corresponding relation between the server identification of the server and the consumed system resource of the server, and taking the system resource as the first system resource.
In an optional implementation manner, the splitting module 13 includes:
a first determination unit configured to determine a target partition bound to the first processing server;
the first acquisition unit is used for acquiring a third system resource occupied by the data processing request of the fragment key in the target partition;
a second determining unit, configured to determine at least two partitioning points between the slicing keys included in the target partition;
the counting unit is used for counting the absolute value of the difference value between the system resources respectively occupied by the slicing keys positioned at the two sides of each dividing point in the plurality of slicing keys included in the target partition for each dividing point;
a third determining unit, configured to determine a target segmentation point corresponding to a minimum absolute value among the at least two segmentation points;
and the composition unit is used for respectively composing the fragment keys positioned at the two sides of the target division point into different sub-partitions.
In an optional implementation manner, the first determining unit includes:
a searching subunit, configured to search, in a second correspondence between a server identifier of a server and a partition identifier of a partition, a partition identifier corresponding to the server identifier of the first processing server;
and the determining subunit is configured to determine the partition corresponding to the partition identifier as the target partition.
In an optional implementation manner, the first obtaining unit is specifically configured to: and searching system resources respectively corresponding to each fragment key in the target partition in a third corresponding relation between the fragment key and the system resources occupied by the data processing request of the fragment key, and taking the system resources as the third system resources.
In an optional implementation manner, the first obtaining unit is specifically configured to: and searching system resources respectively corresponding to each fragment key set in the target partition in a third corresponding relation between the fragment key set and the system resources occupied by the data processing requests of the fragment key set, and taking the system resources as the third system resources.
In an optional implementation manner, the first scheduling module 14 includes:
a second obtaining unit, configured to obtain, for each sub-partition in the partial sub-partitions, a second system resource occupied by the data processing request of the sub-partition;
a first selection unit configured to select a second processing server among a plurality of processing servers set in advance;
a third acquiring unit, configured to acquire a consumed fourth system resource of the second server;
and the first scheduling unit is used for scheduling the data processing request of the sub-partition to the selected second processing server if the difference value between the preset system resource and the fourth system resource is greater than the second system resource.
In an optional implementation manner, the first scheduling module 14 includes:
a second selection unit configured to select, for each of the partial sub-partitions, a second processing server that has a smallest consumed system resource among a plurality of processing servers that are set in advance;
and the second scheduling unit is used for scheduling the data processing requests of the sub-partitions to the selected second processing server.
Wherein, different data processing requests often occupy different system resources. According to the method in the prior art, the target partition is split into two sub-partitions according to the fragment key, so that the number of data access requests of each sub-partition tends to be balanced, but the difference between the system resources occupied by the data processing requests of different sub-partitions may be very large.
If the data processing request of one sub-partition which occupies very little system resources is dispatched to the second processing server, the data processing request of another sub-partition which occupies very much system resources is retained in the first processing server, and at this time, only a small part of the system resources in the first processing server is released, which may still trigger the limit of the processing capability of the first processing server, resulting in the crash of the first processing server, and further resulting in that the enterprise cannot provide data services to the outside normally.
If the data processing request of another sub-partition, which occupies a large amount of system resources, is dispatched to the second processing server, and the data processing request of another sub-partition needs to occupy a large amount of system resources in the second processing server, the limit of the processing capability of the second processing server may be triggered, so that the second processing server is crashed, and further, the enterprise cannot normally provide data services to the outside.
However, in the embodiment of the present application, the consumed first system resource of the first processing server is acquired; determining whether the first system resource meets a preset condition; if the first system resource meets the preset condition, splitting the target partition bound with the first processing server into a plurality of sub-partitions so as to enable second system resources occupied by the data processing request of each sub-partition to tend to be balanced; and dispatching the data processing requests of partial sub-partitions in the plurality of sub-partitions to the second processing server.
By means of the method and the device, the data processing request of the first processing server is divided into two parts, and system resources occupied by the two parts of data processing requests tend to be balanced, namely, differences among the system resources occupied by the data processing requests of different sub-partitions are very small.
Therefore, after the data processing request of one sub-partition is dispatched to the second processing server, firstly, compared with the prior art, more system resources in the first processing server can be released, so that the limit of the processing capacity of the first processing server can be avoided from being triggered, the first processing server is prevented from being crashed, and further, an enterprise can be prevented from providing data services to the outside normally. Secondly, compared with the prior art, the data processing request of the sub-partition can occupy less system resources in the second processing server, so that the limit of the processing capacity of the second processing server can be avoided from being triggered, the second processing server is prevented from being crashed, and further, an enterprise can not provide data services to the outside normally.
The present application further provides a non-transitory, readable storage medium, where one or more modules (programs) are stored, and when the one or more modules are applied to a device, the device may execute instructions (instructions) of method steps in this application.
The present embodiments provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause an electronic device to perform a request scheduling method as described in one or more of the above embodiments. In the embodiment of the application, the electronic device comprises a server, a gateway, a sub-device and the like, wherein the sub-device is a device such as an internet of things device.
Embodiments of the present disclosure may be implemented as an apparatus, which may include electronic devices such as servers (clusters), terminal devices such as IoT devices, and the like, using any suitable hardware, firmware, software, or any combination thereof, for a desired configuration.
Fig. 7 schematically illustrates an example apparatus 1300 that can be used to implement various embodiments described herein.
For one embodiment, fig. 7 illustrates an example apparatus 1300 having one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the processor(s) 1302, memory 1306 coupled to the control module 1304, non-volatile memory (NVM)/storage 1308 coupled to the control module 1304, one or more input/output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1306.
Processor 1302 may include one or more single-core or multi-core processors, and processor 1302 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1300 can be a server device such as a gateway described in the embodiments of the present application.
In some embodiments, apparatus 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM/storage 1308) having instructions 1314 and one or more processors 1302, which in combination with the one or more computer-readable media, are configured to execute instructions 1314 to implement modules to perform actions described in this disclosure.
For one embodiment, control module 1304 may include any suitable interface controllers to provide any suitable interface to at least one of the processor(s) 1302 and/or any suitable device or component in communication with control module 1304.
The control module 1304 may include a memory controller module to provide an interface to the memory 1306. The memory controller module may be a hardware module, a software module, and/or a firmware module.
Memory 1306 may be used, for example, to load and store data and/or instructions 1314 for device 1300. For one embodiment, memory 1306 may comprise any suitable volatile memory, such as suitable DRAM. In some embodiments, the memory 1306 may comprise a double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
For one embodiment, control module 1304 may include one or more input/output controllers to provide an interface to NVM/storage 1308 and input/output device(s) 1310.
For example, NVM/storage 1308 may be used to store data and/or instructions 1314. NVM/storage 1308 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more Digital Versatile Disc (DVD) drives).
NVM/storage 1308 may include storage resources that are physically part of the device on which apparatus 1300 is installed, or it may be accessible by the device and need not be part of the device. For example, NVM/storage 1308 may be accessible over a network via input/output device(s) 1310.
Input/output device(s) 1310 may provide an interface for apparatus 1300 to communicate with any other suitable device, input/output device(s) 1310 may include communication components, audio components, sensor components, and so forth. The network interface 1312 may provide an interface for the device 1300 to communicate over one or more networks, and the device 1300 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, such as access to a communication standard-based wireless network, e.g., WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof.
For one embodiment, at least one of the processor(s) 1302 may be packaged together with logic for one or more controllers (e.g., memory controller modules) of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be packaged together with logic for one or more controllers of the control module 1304 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with logic for one or more controller(s) of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with logic of one or more controllers of the control module 1304 to form a system on chip (SoC).
In various embodiments, apparatus 1300 may be, but is not limited to being: a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.), among other terminal devices. In various embodiments, apparatus 1300 may have more or fewer components and/or different architectures. For example, in some embodiments, device 1300 includes one or more cameras, a keyboard, a Liquid Crystal Display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an Application Specific Integrated Circuit (ASIC), and speakers.
An embodiment of the present application provides a server, including: one or more processors; and one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause the server to perform a request scheduling method as described in one or more of the embodiments of the present application.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The request scheduling method, apparatus, server and storage medium provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and implementation of the present application, and the description of the above embodiment is only used to help understand the method and core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (18)

1. A method for request scheduling, the method comprising:
acquiring consumed first system resources of a first processing server;
determining whether the first system resource meets a preset condition;
if the first system resource meets a preset condition, splitting the target partition bound with the first processing server into a plurality of sub-partitions so as to enable second system resources occupied by the data processing request of each sub-partition to tend to be balanced;
and dispatching the data processing requests of partial sub-partitions in the plurality of sub-partitions to a second processing server.
2. The method of claim 1, wherein after scheduling the data processing requests of the partial sub-partitions of the plurality of sub-partitions onto the second processing server, further comprising:
receiving a new data processing request of the partial sub-partition;
and dispatching the new data processing request to the second processing server.
3. The method of claim 1, wherein obtaining the currently consumed first system resources of the first processing server comprises:
and searching the system resource corresponding to the server identification of the first server in the first corresponding relation between the server identification of the server and the consumed system resource of the server, and taking the system resource as the first system resource.
4. The method of claim 1, wherein splitting the target partition bound to the first processing server into a plurality of child partitions comprises:
determining a target partition bound with the first processing server;
acquiring a third system resource occupied by a data processing request of a fragment key in the target partition;
selecting at least two segmentation points among a plurality of slicing keys included in the target partition;
for each division point, in a plurality of fragment keys included in the target partition, counting absolute values of differences between system resources respectively occupied by the fragment keys positioned at two sides of the division point;
determining a target segmentation point corresponding to the minimum absolute value in the at least two segmentation points;
and respectively forming different sub-partitions by the slicing keys positioned at the two sides of the target dividing point.
5. The method of claim 4, wherein determining the target partition bound to the first processing server comprises:
searching a partition identifier corresponding to the server identifier of the first processing server in a second corresponding relation between the server identifier of the server and the partition identifier of the partition;
and determining the partition corresponding to the partition identification as the target partition.
6. The method according to claim 4, wherein the obtaining of the third system resource occupied by the data processing request of the fragment key in the target partition comprises:
and searching system resources respectively corresponding to each fragment key in the target partition in a third corresponding relation between the fragment key and the system resources occupied by the data processing request of the fragment key, and taking the system resources as the third system resources.
7. The method according to claim 4, wherein the obtaining of the third system resource occupied by the data processing request of the fragment key in the target partition comprises:
and searching system resources respectively corresponding to each fragment key set in the target partition in a third corresponding relation between the fragment key set and the system resources occupied by the data processing requests of the fragment key set, and taking the system resources as the third system resources.
8. The method of claim 1, wherein scheduling data processing requests for a portion of the plurality of sub-partitions onto a second processing server comprises:
for each sub-partition in the partial sub-partitions, acquiring a second system resource occupied by a data processing request of the sub-partition;
selecting a second processing server from a plurality of processing servers which are arranged in advance;
acquiring consumed fourth system resources of the second server;
and if the difference value between the preset system resource and the fourth system resource is larger than the second system resource, scheduling the data processing request of the sub-partition to the selected second processing server.
9. The method of claim 1, wherein scheduling data processing requests for a portion of the plurality of sub-partitions onto a second processing server comprises:
for each sub-partition in the partial sub-partitions, selecting a second processing server with the minimum consumed system resource from a plurality of processing servers which are arranged in advance;
and dispatching the data processing request of the sub-partition to the selected second processing server.
10. A request scheduling apparatus, the apparatus comprising:
an acquisition module, configured to acquire consumed first system resources of a first processing server;
the determining module is used for determining whether the first system resource meets a preset condition;
the splitting module is used for splitting the target partition bound with the first processing server into a plurality of sub-partitions if the first system resource meets a preset condition so as to enable second system resources occupied by the data processing request of each sub-partition to tend to be balanced;
and the first scheduling module is used for scheduling the data processing requests of part of the sub-partitions to the second processing server.
11. The apparatus of claim 10, further comprising:
a receiving module, configured to receive a new data processing request of the partial sub-partition;
and the second scheduling module is used for scheduling the new data processing request to the second processing server.
12. The apparatus of claim 10, wherein the obtaining module is specifically configured to: and searching the system resource corresponding to the server identification of the first server in the first corresponding relation between the server identification of the server and the consumed system resource of the server, and taking the system resource as the first system resource.
13. The apparatus of claim 10, wherein the splitting module comprises:
a first determination unit configured to determine a target partition bound to the first processing server;
the first acquisition unit is used for acquiring a third system resource occupied by the data processing request of the fragment key in the target partition;
a second determining unit, configured to determine at least two partitioning points between the slicing keys included in the target partition;
the counting unit is used for counting the absolute value of the difference value between the system resources respectively occupied by the slicing keys positioned at the two sides of each dividing point in the plurality of slicing keys included in the target partition for each dividing point;
a third determining unit, configured to determine a target segmentation point corresponding to a minimum absolute value among the at least two segmentation points;
and the composition unit is used for respectively composing the fragment keys positioned at the two sides of the target division point into different sub-partitions.
14. The apparatus of claim 13, wherein the first determining unit comprises:
a searching subunit, configured to search, in a second correspondence between a server identifier of a server and a partition identifier of a partition, a partition identifier corresponding to the server identifier of the first processing server;
and the determining subunit is configured to determine the partition corresponding to the partition identifier as the target partition.
15. The apparatus according to claim 13, wherein the first obtaining unit is specifically configured to: and searching system resources respectively corresponding to each fragment key in the target partition in a third corresponding relation between the fragment key and the system resources occupied by the data processing request of the fragment key, and taking the system resources as the third system resources.
16. The apparatus according to claim 13, wherein the first obtaining unit is specifically configured to: and searching system resources respectively corresponding to each fragment key set in the target partition in a third corresponding relation between the fragment key set and the system resources occupied by the data processing requests of the fragment key set, and taking the system resources as the third system resources.
17. The apparatus of claim 10, wherein the first scheduling module comprises:
a second obtaining unit, configured to obtain, for each sub-partition in the partial sub-partitions, a second system resource occupied by the data processing request of the sub-partition;
a first selection unit configured to select a second processing server among a plurality of processing servers set in advance;
a third acquiring unit, configured to acquire a consumed fourth system resource of the second server;
and the first scheduling unit is used for scheduling the data processing request of the sub-partition to the selected second processing server if the difference value between the preset system resource and the fourth system resource is greater than the second system resource.
18. The apparatus of claim 10, wherein the first scheduling module comprises:
a second selection unit configured to select, for each of the partial sub-partitions, a second processing server that has a smallest consumed system resource among a plurality of processing servers that are set in advance;
and the second scheduling unit is used for scheduling the data processing requests of the sub-partitions to the selected second processing server.
CN201811037916.9A 2018-09-06 2018-09-06 Request scheduling method, device, server and storage medium Active CN110881058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811037916.9A CN110881058B (en) 2018-09-06 2018-09-06 Request scheduling method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811037916.9A CN110881058B (en) 2018-09-06 2018-09-06 Request scheduling method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN110881058A true CN110881058A (en) 2020-03-13
CN110881058B CN110881058B (en) 2022-04-12

Family

ID=69727883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811037916.9A Active CN110881058B (en) 2018-09-06 2018-09-06 Request scheduling method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN110881058B (en)

Citations (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090235097A1 (en) * 2008-03-14 2009-09-17 Microsoft Corporation Data Center Power Management
CN101539871A (en) * 2008-03-18 2009-09-23 大唐移动通信设备有限公司 Device for balancedly processing load, data processing system and method and main control panel
US20100274893A1 (en) * 2009-04-27 2010-10-28 Sonus Networks, Inc. Methods and apparatus for detecting and limiting focused server overload in a network
EP2284700A1 (en) * 1997-12-19 2011-02-16 Avaya Inc. Dynamic load balancer for multiple network servers
US20110099403A1 (en) * 2009-10-26 2011-04-28 Hitachi, Ltd. Server management apparatus and server management method
CN102098270A (en) * 2009-12-15 2011-06-15 上海威乾视频技术有限公司 System and method for realizing load balance of streaming media server
CN102207891A (en) * 2011-06-10 2011-10-05 浙江大学 Method for achieving dynamic partitioning and load balancing of data-partitioning distributed environment
CN102622275A (en) * 2012-04-19 2012-08-01 吴常国 Load balancing realization method in cloud computing environment
CN102664789A (en) * 2012-04-09 2012-09-12 北京百度网讯科技有限公司 Method and system for processing large-scale data
CN102882900A (en) * 2011-07-11 2013-01-16 阿里巴巴集团控股有限公司 Application and deployment method for large-scale server cluster and large-scale server cluster
EP2553638A1 (en) * 2010-03-29 2013-02-06 Amazon Technologies, Inc. Managing committed request rates for shared resources
CN103259739A (en) * 2012-02-15 2013-08-21 株式会社日立制作所 Load balancing device and load balancing method
CN103516807A (en) * 2013-10-14 2014-01-15 中国联合网络通信集团有限公司 Cloud computing platform server load balancing system and method
CN103905500A (en) * 2012-12-27 2014-07-02 腾讯数码(天津)有限公司 Method and apparatus for accessing to application server
CN104052811A (en) * 2014-06-17 2014-09-17 华为技术有限公司 Service scheduling method and device and system
CN104184673A (en) * 2013-05-24 2014-12-03 中国电信股份有限公司 Load balancing method based on instant communication service and system
CN104636348A (en) * 2013-11-08 2015-05-20 ***股份有限公司 Load balancing method and system in data processing system
US20150236974A1 (en) * 2013-04-26 2015-08-20 Hitachi, Ltd. Computer system and load balancing method
CN105204945A (en) * 2015-09-28 2015-12-30 四川神琥科技有限公司 Load balance device under big data background
CN105468764A (en) * 2015-12-02 2016-04-06 广州华多网络科技有限公司 Data processing method and apparatus and cluster service system
CN105791148A (en) * 2014-12-26 2016-07-20 北大医疗信息技术有限公司 System and method for automatically equalizing load of server
CN105791245A (en) * 2014-12-26 2016-07-20 北京航天测控技术有限公司 Data sending and receiving method and device
US20160301765A1 (en) * 2013-12-27 2016-10-13 Le Holdings (Beijing) Co., Ltd. Method and device for processing service access
CN106255154A (en) * 2016-08-03 2016-12-21 上海斐讯数据通信技术有限公司 A kind of SiteServer LBS based on resource utilization and method
CN106534284A (en) * 2016-10-26 2017-03-22 航天恒星科技有限公司 Resource load balancing method and device in distributed system
US20170201574A1 (en) * 2016-01-11 2017-07-13 Alibaba Group Holding Limited Method, system, and device for allocating resources in a server
CN107205030A (en) * 2017-05-31 2017-09-26 成都博视美达文化传播有限公司 Server resource dispatching method and system
CN107273185A (en) * 2017-06-19 2017-10-20 成都鼎智汇科技有限公司 A kind of control method for equalizing load based on virtual machine
CN107819861A (en) * 2017-11-16 2018-03-20 中国银行股份有限公司 Business data processing method, apparatus and system
CN107861811A (en) * 2017-10-24 2018-03-30 平安科技(深圳)有限公司 Mission bit stream transmission method, device and computer equipment in Workflow system
CN107967173A (en) * 2016-10-20 2018-04-27 阿里巴巴集团控股有限公司 A kind of methods, devices and systems of scheduling of resource
CN107968810A (en) * 2016-10-20 2018-04-27 阿里巴巴集团控股有限公司 A kind of resource regulating method of server cluster, device and system

Patent Citations (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2284700A1 (en) * 1997-12-19 2011-02-16 Avaya Inc. Dynamic load balancer for multiple network servers
US20090235097A1 (en) * 2008-03-14 2009-09-17 Microsoft Corporation Data Center Power Management
CN101539871A (en) * 2008-03-18 2009-09-23 大唐移动通信设备有限公司 Device for balancedly processing load, data processing system and method and main control panel
US20100274893A1 (en) * 2009-04-27 2010-10-28 Sonus Networks, Inc. Methods and apparatus for detecting and limiting focused server overload in a network
US20110099403A1 (en) * 2009-10-26 2011-04-28 Hitachi, Ltd. Server management apparatus and server management method
CN102098270A (en) * 2009-12-15 2011-06-15 上海威乾视频技术有限公司 System and method for realizing load balance of streaming media server
EP2553638A1 (en) * 2010-03-29 2013-02-06 Amazon Technologies, Inc. Managing committed request rates for shared resources
CN102207891A (en) * 2011-06-10 2011-10-05 浙江大学 Method for achieving dynamic partitioning and load balancing of data-partitioning distributed environment
CN102882900A (en) * 2011-07-11 2013-01-16 阿里巴巴集团控股有限公司 Application and deployment method for large-scale server cluster and large-scale server cluster
CN103259739A (en) * 2012-02-15 2013-08-21 株式会社日立制作所 Load balancing device and load balancing method
CN102664789A (en) * 2012-04-09 2012-09-12 北京百度网讯科技有限公司 Method and system for processing large-scale data
CN102622275A (en) * 2012-04-19 2012-08-01 吴常国 Load balancing realization method in cloud computing environment
CN103905500A (en) * 2012-12-27 2014-07-02 腾讯数码(天津)有限公司 Method and apparatus for accessing to application server
US20150236974A1 (en) * 2013-04-26 2015-08-20 Hitachi, Ltd. Computer system and load balancing method
CN104184673A (en) * 2013-05-24 2014-12-03 中国电信股份有限公司 Load balancing method based on instant communication service and system
CN103516807A (en) * 2013-10-14 2014-01-15 中国联合网络通信集团有限公司 Cloud computing platform server load balancing system and method
CN104636348A (en) * 2013-11-08 2015-05-20 ***股份有限公司 Load balancing method and system in data processing system
US20160301765A1 (en) * 2013-12-27 2016-10-13 Le Holdings (Beijing) Co., Ltd. Method and device for processing service access
CN104052811A (en) * 2014-06-17 2014-09-17 华为技术有限公司 Service scheduling method and device and system
CN105791148A (en) * 2014-12-26 2016-07-20 北大医疗信息技术有限公司 System and method for automatically equalizing load of server
CN105791245A (en) * 2014-12-26 2016-07-20 北京航天测控技术有限公司 Data sending and receiving method and device
CN105204945A (en) * 2015-09-28 2015-12-30 四川神琥科技有限公司 Load balance device under big data background
CN105468764A (en) * 2015-12-02 2016-04-06 广州华多网络科技有限公司 Data processing method and apparatus and cluster service system
US20170201574A1 (en) * 2016-01-11 2017-07-13 Alibaba Group Holding Limited Method, system, and device for allocating resources in a server
CN106255154A (en) * 2016-08-03 2016-12-21 上海斐讯数据通信技术有限公司 A kind of SiteServer LBS based on resource utilization and method
CN107967173A (en) * 2016-10-20 2018-04-27 阿里巴巴集团控股有限公司 A kind of methods, devices and systems of scheduling of resource
CN107968810A (en) * 2016-10-20 2018-04-27 阿里巴巴集团控股有限公司 A kind of resource regulating method of server cluster, device and system
CN106534284A (en) * 2016-10-26 2017-03-22 航天恒星科技有限公司 Resource load balancing method and device in distributed system
CN107205030A (en) * 2017-05-31 2017-09-26 成都博视美达文化传播有限公司 Server resource dispatching method and system
CN107273185A (en) * 2017-06-19 2017-10-20 成都鼎智汇科技有限公司 A kind of control method for equalizing load based on virtual machine
CN107861811A (en) * 2017-10-24 2018-03-30 平安科技(深圳)有限公司 Mission bit stream transmission method, device and computer equipment in Workflow system
CN107819861A (en) * 2017-11-16 2018-03-20 中国银行股份有限公司 Business data processing method, apparatus and system

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
D. DHIVYA;U. GOWRISANKAR: ""Load balancing in multimedia system using generic and Fibonacci approach"", 《2015 IEEE 9TH INTERNATIONAL CONFERENCE ON INTELLIGENT SYSTEMS AND CONTROL (ISCO)》 *
MOONA YAKHCHI; SEYED MOHSSEN GHAFARI; SHAHPAR YAKHCHI; MAHDI FAZ: ""Proposing a load balancing method based on Cuckoo Optimization Algorithm for energy management in cloud computing infrastructures"", 《2015 6TH INTERNATIONAL CONFERENCE ON MODELING, SIMULATION, AND APPLIED OPTIMIZATION (ICMSAO)》 *
N.V. RAJEESH KUMAR;G. GAYATHRI: ""Effective resource handling data splitting and cache implementation for multi-threaded application"", 《2016 INTERNATIONAL CONFERENCE ON CIRCUIT, POWER AND COMPUTING TECHNOLOGIES (ICCPCT)》 *
孙耀; 刘杰; 叶丹; 钟华: ""分布式文件***元数据服务的负载均衡框架"", 《软件学报》 *
张栗粽;崔园;罗光春;陈爱国;卢国明: ""面向大数据分布式存储的动态负载均衡算法"", 《计算机科学》 *
赵耀; 杨放春: ""一种业务部署的负载平衡优化算法"", 《计算机工程》 *
陈亮; 王加阳: ""基于粗糙集的负载均衡算法研究"", 《计算机工程与科学》 *

Also Published As

Publication number Publication date
CN110881058B (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN106933534B (en) Data synchronization method and device
US9712835B2 (en) Video encoding system and method
CN110046137B (en) System and method for grouping and storing data streams into cloud storage files
WO2017166643A1 (en) Method and device for quantifying task resources
CN110708377A (en) Data transmission method, device and storage medium
CN110881058B (en) Request scheduling method, device, server and storage medium
CN110891033B (en) Network resource processing method, device, gateway, controller and storage medium
CN110837499B (en) Data access processing method, device, electronic equipment and storage medium
CN108833532B (en) Service processing method, device and system based on Internet of things
CN113051245A (en) Method, device and system for migrating data
CN113849524B (en) Data processing method and device
CN113448739B (en) Data processing method and device
CN115344350A (en) Node equipment of cloud service system and resource processing method
CN109117423B (en) Table partition configuration method, device and system of database system
CN114816789A (en) File processing method based on cloud application, electronic device and storage medium
CN114942833A (en) Method and related device for dynamically scheduling timing task resources
CN113703906A (en) Data processing method, device and system
CN113296977B (en) Message processing method and device
CN112583721B (en) Service request routing method, device and medium
CN113554458B (en) Object pushing method and device, electronic equipment and storage medium
CN110795215A (en) Data processing method, computer equipment and storage medium
CN115086234B (en) Message processing method, system, equipment and storage medium
CN116962496A (en) Search service framework, search service request processing method, service isolation method and equipment
CN110069220B (en) Distributed scheduling method, device, equipment and computer readable storage medium
CN111290850B (en) Data storage method, device and equipment

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