CN113411390B - Scheduling method and device of content distribution network and electronic equipment - Google Patents
Scheduling method and device of content distribution network and electronic equipment Download PDFInfo
- Publication number
- CN113411390B CN113411390B CN202110666904.8A CN202110666904A CN113411390B CN 113411390 B CN113411390 B CN 113411390B CN 202110666904 A CN202110666904 A CN 202110666904A CN 113411390 B CN113411390 B CN 113411390B
- Authority
- CN
- China
- Prior art keywords
- state value
- cdn node
- idle state
- cdn
- load
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 85
- 230000005540 biological transmission Effects 0.000 claims description 17
- 230000006870 function Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 17
- 238000012360 testing method Methods 0.000 description 13
- 238000004590 computer program Methods 0.000 description 12
- 238000012545 processing Methods 0.000 description 12
- 238000004364 calculation method Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 238000012544 monitoring process Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1029—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The disclosure discloses a scheduling method and device of a content distribution network and electronic equipment, relates to the technical field of computers, particularly relates to the technical field of content distribution networks, and can be used in the fields of cloud computing and cloud. The specific implementation scheme is as follows: acquiring load parameters of each resource in the CDN node in the current time period; determining an idle state value of the CDN node in the current time period based on the load parameter; and if the idle state value meets the preset sending condition, sending the idle state value to the CDN scheduling server so that the CDN scheduling server schedules CDN nodes based on the idle state value. In the scheme, the CDN node scheduling is performed according to the idle state value of each CDN node, so that the scheduling rationality of the CDN nodes can be improved, and the use experience of a user is guaranteed.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a scheduling method and apparatus for a content distribution network, and an electronic device.
Background
A CDN (Content Delivery Network) is a distributed Network constructed and overlaid on an existing bearer Network and composed of edge node servers distributed in different areas.
When the CDN is scheduled, a CDN node needs to be reasonably scheduled to provide service. If the scheduled CDN nodes have the problems of weak service capability or too high load, the quality of service is seriously affected, which results in poor user experience, and therefore a CDN node scheduling method capable of reasonably scheduling the CDN nodes and ensuring user experience is urgently needed.
Disclosure of Invention
The disclosure provides a scheduling method, a scheduling device, scheduling equipment and electronic equipment for a content distribution network.
According to a first aspect of the present disclosure, there is provided a scheduling method of a content distribution network, the method comprising:
acquiring load parameters of each resource in the CDN node in the current time period;
determining an idle state value of the CDN node in the current time period based on the load parameter;
and if the idle state value meets the preset sending condition, sending the idle state value to the CDN scheduling server so that the CDN scheduling server schedules CDN nodes based on the idle state value.
According to a second aspect of the present disclosure, there is provided another scheduling method of a content distribution network, the method including:
receiving an idle state value of the CDN node, wherein the idle state value is determined by the CDN node based on load parameters of each resource in the CDN node in the current time period and is sent by the CDN node when the idle state value meets preset sending conditions;
and when a CDN node scheduling request is received, scheduling the CDN node based on the idle state value.
According to a third aspect of the present disclosure, there is provided a scheduling apparatus of a content distribution network, the apparatus including:
the load parameter acquisition module is used for acquiring load parameters of each resource in the CDN node in the current time period;
the idle state value determining module is used for determining an idle state value of the CDN node in the current time period based on the load parameter;
and the idle state value sending module is used for sending the idle state value to the CDN scheduling server when the idle state value meets the preset sending condition so as to enable the CDN scheduling server to schedule the CDN nodes based on the idle state value.
According to a fourth aspect of the present disclosure, there is provided another scheduling apparatus of a content distribution network, the apparatus including:
the idle state value receiving module is used for receiving an idle state value of the CDN node, wherein the idle state value is determined by the CDN node based on load parameters of each resource in the CDN node in the current time period and is sent by the CDN node when the idle state value meets preset sending conditions;
and the scheduling module is used for scheduling the CDN node based on the idle state value when receiving the CDN node scheduling request.
According to a fifth aspect of the present disclosure, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a scheduling method of the content distribution network.
According to a sixth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the scheduling method of the content distribution network described above.
According to a seventh aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the scheduling method of the content distribution network described above.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
The technical scheme provided by the disclosure has the following beneficial effects:
according to the scheme provided by the disclosure, the load parameters of each resource in the CDN node in the current time period are obtained, the idle state value of the CDN node in the current time period is determined based on the load parameters, and when the idle state value meets the preset sending condition, the idle state value is sent to the CDN scheduling server, so that the CDN scheduling server schedules the CDN node based on the idle state value. In the scheme, the CDN node scheduling is performed according to the idle state value of each CDN node, so that the scheduling rationality of the CDN nodes can be improved, and the use experience of a user is guaranteed.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a flowchart illustrating a scheduling method of a content distribution network according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating another scheduling method for a content distribution network according to an embodiment of the disclosure;
fig. 3 is a flowchart illustrating a scheduling method of a content distribution network according to an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a scheduling method of a content distribution network according to another embodiment of the disclosure;
fig. 5 is a flowchart illustrating a scheduling method of a content distribution network according to another embodiment of the disclosure;
fig. 6 is a schematic structural diagram of a scheduling system of a content distribution network according to an embodiment of the present disclosure.
Fig. 7 is a schematic structural diagram of a scheduling apparatus of a content distribution network according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a scheduling apparatus of another content distribution network provided in an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a scheduling apparatus of a content distribution network according to another embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a scheduling apparatus of yet another content distribution network provided by an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of a scheduling apparatus of yet another content distribution network provided by an embodiment of the present disclosure;
fig. 12 is a block diagram of an electronic device for implementing a scheduling method of a content distribution network provided by an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of embodiments of the present disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The CDN is a distributed network constructed and overlaid on an existing bearer network, and composed of edge node servers distributed in different areas. When CDN scheduling is carried out, if state information of nodes can be comprehensively analyzed, unavailable nodes are avoided, and optimal scheduling is carried out on the available nodes, a user can quickly obtain required contents as far as possible, the resource access speed of the user is improved, and the use experience of the user is improved.
With the continuous capacity expansion of the CDN system and the continuous increase in the number of CDN nodes, the hardware specifications and the service capabilities of each CDN node are also uneven, so that higher requirements are also put forward on the scheduling of the CDN nodes, once a CDN node with weak service capability is scheduled to a user, the available resources of the CDN node are rapidly consumed, and the CDN node provides service under the condition of an excessively high load, which will seriously affect the user access quality.
Therefore, if the state of the CDN node can be accurately obtained in real time, accurate data support can be provided by scheduling the CDN node.
At present, a dial testing system is mainly used for periodically detecting a CDN node and generating a dial testing log, and meanwhile, each piece of service traffic data generated by the CDN node is also returned. And analyzing the dial test log and the flow data log of the node, performing node state detection in the posterior, and calculating to obtain the state information of the CDN node.
In the prior art, although the state information of the CDN node can be obtained, the state information is obtained a posteriori, and a certain hysteresis exists, which affects scheduling of the CDN node. In addition, a large amount of physical resources are occupied by the large amount of backtracking of the dial testing logs and the node traffic data and the storage and analysis of the dial testing logs, and the resource cost is increased.
The scheduling method and apparatus for a content distribution network and an electronic device provided in the embodiments of the present disclosure aim to solve at least one of the above technical problems in the prior art.
Fig. 1 shows a flowchart of a scheduling method for a content delivery network according to an embodiment of the present disclosure, where the method provided by the embodiment of the present disclosure may be applied to a CDN node, and as shown in fig. 1, the method may mainly include:
step S110: and acquiring load parameters of each resource in the CDN node in the current time period.
The resources in the CDN node may include, but are not limited to, a Central Processing Unit (CPU), a memory, an Input/Output (IO) of a disk, a network IO, and the like.
The load parameter may be a load index of each resource, such as a CPU load rate.
The current time period may be a time period corresponding to the current acquisition cycle, and in order to ensure real-time monitoring of the state of the CDN node, the acquisition cycle may be set at a second level, and load parameters of each resource in the CDN node are acquired in each acquisition cycle, respectively, so as to ensure real-time performance of acquiring the load parameters.
Step S120: and determining an idle state value of the CDN node in the current time period based on the load parameter.
The idle state value is used for representing the capacity of bearing load and providing service for the CDN node in the current time period, and a basis can be provided for subsequent scheduling of the CDN node based on the idle state value by determining the idle state value.
Step S130: and if the idle state value meets the preset sending condition, sending the idle state value to the CDN scheduling server so that the CDN scheduling server schedules CDN nodes based on the idle state value.
The CDN scheduling server is used for scheduling the CDN nodes to provide services according to the idle state value. The CDN node with good bearing load and service providing capacity is scheduled to provide service, so that the service quality of the CDN node can be ensured, and the use experience of a user is further ensured.
The CDN node periodically collects the load parameters of the CDN node, calculates the idle state value according to the load parameters, and sends the idle state value to the CDN scheduling server, so that the real-time property of the CDN scheduling server for obtaining the idle state value of the CDN node can be guaranteed, and the scheduling accuracy of the CDN node is improved.
In this example, because the CDN node calculates the idle state value according to the load parameter, and only needs to send the idle state value to the CDN scheduling server, the amount of data transmission is reduced, and the occupation of resources is reduced. The CDN node calculates the idle state value of the CDN node, so that the CDN scheduling server is prevented from calculating the idle state value for each CDN node, and the processing pressure of the CDN scheduling server is reduced.
In this example, the sending condition may be used to determine whether the idle state value needs to be sent to the CDN server, and the specific sending condition may be set according to an actual requirement. By setting the sending condition, the idle state value meeting the sending condition is sent to the CDN scheduling server, and the idle state value not meeting the sending condition is not sent to the CDN scheduling server, so that the transmission quantity of data is reduced.
According to the method provided by the disclosure, the load parameters of each resource in the CDN node in the current time period are obtained, the idle state value of the CDN node in the current time period is determined based on the load parameters, and when the idle state value meets the preset sending condition, the idle state value is sent to the CDN scheduling server, so that the CDN scheduling server schedules the CDN node based on the idle state value. In the scheme, the CDN node scheduling is performed according to the idle state value of each CDN node, so that the scheduling rationality of the CDN nodes can be improved, and the use experience of a user is guaranteed.
Compared with the mode that the CDN node state is periodically detected by the dial testing system in the prior art, the method provided by the embodiment of the disclosure can ensure the instantaneity of node state acquisition, avoid mass return of dial testing logs and node flow data and storage and analysis of the dial testing logs, reduce resource occupation and save resource cost.
Fig. 2 shows a schematic flow diagram of another scheduling method for a content delivery network according to an embodiment of the present disclosure, where the method provided in the embodiment of the present disclosure may be applied to a CDN node, and as shown in fig. 2, the method mainly includes:
step S210: and acquiring load parameters of each resource in the CDN node in the current time period.
The resources in the CDN node may include, but are not limited to, a CPU, a memory, a disk IO, a network IO, and the like.
The load parameter may be a load index of each resource, such as a CPU load rate.
The current time period may be a time period corresponding to the current acquisition cycle, and in order to ensure real-time monitoring of the state of the CDN node, the acquisition cycle may be set at the level of seconds, and load parameters of each resource in the CDN node are acquired in each acquisition cycle, respectively, so as to ensure real-time performance of acquiring the load parameters.
Step S220: and determining the current load state value of the CDN node based on the load parameters and the preset resource weight of each resource.
The preset resource weight is used to represent the load capacity of each resource under the theoretical condition, and the preset resource weight may be specified according to the actual parameter of each resource, for example, taking the CPU as an example, the CPU preset resource weight of the 2.3GHz 1 core may be specified as 1, and taking this as a reference, the CPU preset resource weight of the 2.3GHz 16 core is 16.
The current load state value is used for representing the comprehensive load condition of the CDN node in the current time period.
As an optional example, determining a current load state value of the CDN node based on the load parameter and a preset resource weight of each resource includes:
determining a current load state value of the CDN node based on the load parameters and the preset resource weights of the resources by the following formula I:
where status is the current load status value, S i Is any one of the resources of the CDN node, S i Load is a load parameter of any resource, S i Weight is S i The preset resource weight.
In this embodiment, the preset resource weights are respectively set for the resources, and the load parameters of the resources of the CDN node are all included in the calculation, so that the calculated current load state value can comprehensively consider the load condition of each resource, and can reflect the actual load condition of the CDN node, which is more real and reasonable.
Step S230: and determining an idle state value of the CDN node in the current time period based on the theoretical load state value and the current load state value of the CDN node.
The theoretical load state value is used for representing the maximum comprehensive load capacity of the CDN node under the theoretical condition.
Based on the theoretical load state value and the current load state value, the determined idle state value can represent the capacity of the CDN node for bearing the load and providing the service in the current time period. The idle state value is determined to provide a basis for subsequent scheduling of CDN nodes based on the idle state value.
As an optional example, determining an idle state value of the CDN node based on a theoretical load state value and a current load state value of the CDN node includes:
determining an idle state value of the CDN node based on the load parameter by the following formula II:
the formula II is as follows: x = max _ status-status × n;
where x is an idle state value, max _ status is a theoretical load state value, status is a current load state value, and n is a first weight coefficient, which may be a constant.
In this example, the theoretical load state value and the current load state value are differentiated to obtain a difference value that can reflect the load pressure that the CDN node can bear under the current load condition, and the difference value may be used as an idle state value for scheduling the CDN node.
As an alternative example, the theoretical load state value of the CDN node may be determined based on a preset resource weight of each resource.
Specifically, the theoretical load state value of the CDN node may be determined by the following formula three:
the formula III is as follows: max _ status = m × Σ i=1 S i _weight
Wherein max _ status is a theoretical load state value, S i Is any one of the resources of the CDN node, S i Weight is S i M is a second weight coefficient, which may be a constant.
In this example, the preset resource weight is used to represent the load capacity of each resource under the theoretical condition, and the theoretical load state value calculated by taking the load capacity of each resource under the theoretical condition into comprehensive consideration can reflect the comprehensive load capacity of the CDN node under the theoretical condition.
Step S240: and if the idle state value meets the preset sending condition, sending the idle state value to the CDN scheduling server so that the CDN scheduling server schedules CDN nodes based on the idle state value.
The CDN scheduling server is used for scheduling the CDN nodes to provide services according to the idle state value. The CDN node with good bearing load and service providing capacity is scheduled to provide service, so that the service quality of the CDN node can be ensured, and the use experience of a user is further ensured.
The CDN node periodically collects the load parameters of the CDN node, calculates the idle state value according to the load parameters, and sends the idle state value to the CDN scheduling server, so that the real-time performance of the CDN scheduling server for obtaining the idle state value of the CDN node can be guaranteed, and the scheduling accuracy of the CDN node is improved.
In this example, because the CDN node calculates the idle state value according to the load parameter, and only needs to send the idle state value to the CDN scheduling server, the amount of data transmission is reduced, and the occupation of resources is reduced. The CDN node calculates the idle state value of the CDN node, so that the CDN scheduling server is prevented from calculating the idle state value for each CDN node, and the processing pressure of the CDN scheduling server is reduced.
In this example, the sending condition may be used to determine whether the idle state value needs to be sent to the CDN server, and the specific sending condition may be set according to an actual requirement. By setting the sending conditions, the idle state values meeting the sending conditions are sent to the CDN scheduling server, and the idle state values not meeting the sending conditions are not sent to the CDN scheduling server, so that the transmission quantity of data is reduced.
According to the method provided by the disclosure, the load parameters of each resource in the CDN node in the current time period are obtained, the current load state value of the CDN node is determined based on the load parameters and the preset resource weight of each resource, and the idle state value of the CDN node in the current time period is determined based on the theoretical load state value and the current load state value of the CDN node, so that when the idle state value meets the preset sending condition, the idle state value is sent to the CDN scheduling server, and the CDN scheduling server schedules the CDN node based on the idle state value. In the scheme, the idle state value can reflect the current load capacity of the CDN node, so that the CDN node is scheduled according to the idle state value of each CDN node, the scheduling rationality of the CDN node can be improved, and the use experience of a user is guaranteed.
Fig. 3 shows a flowchart of a scheduling method for a content delivery network according to another embodiment of the present disclosure, where the method provided by the embodiment of the present disclosure may be applied to a CDN node, and as shown in fig. 3, the method may mainly include:
step S310: and acquiring load parameters of each resource in the CDN node in the current time period.
The resources in the CDN node may include, but are not limited to, a CPU, a memory, a disk, an IO, a network IO, and the like.
The load parameter may be a load index of each resource, such as a CPU load rate.
The current time period may be a time period corresponding to the current acquisition cycle, and in order to ensure real-time monitoring of the state of the CDN node, the acquisition cycle may be set at the level of seconds, and load parameters of each resource in the CDN node are acquired in each acquisition cycle, respectively, so as to ensure real-time performance of acquiring the load parameters.
Step S320: and determining an idle state value of the CDN node in the current time period based on the load parameter.
The idle state value is used for representing the capacity of the CDN node for bearing load and providing service in the current time period, and a basis can be provided for subsequent scheduling of the CDN node based on the idle state value by determining the idle state value.
Step S330: if the idle state value of the CDN node in the current time period is larger than the preset value in comparison with the idle state value of the CDN node in the previous time period of the current time period, the idle state value of the current time period is sent to the CDN scheduling server, so that the CDN scheduling server schedules the CDN node based on the idle state value of the current time period.
The CDN scheduling server is used for scheduling the CDN nodes to provide services according to the idle state value. The CDN node with good bearing load and service providing capacity is scheduled to provide service, so that the service quality of the CDN node can be ensured, and the use experience of a user is further ensured.
The CDN node periodically collects the load parameters of the CDN node, calculates the idle state value according to the load parameters, and sends the idle state value to the CDN scheduling server, so that the real-time property of the CDN scheduling server for obtaining the idle state value of the CDN node can be guaranteed, and the scheduling accuracy of the CDN node is improved.
In this example, because the CDN node calculates the idle state value according to the load parameter, and only needs to send the idle state value to the CDN scheduling server, the amount of data transmission is reduced, and the occupation of resources is reduced. The CDN node calculates the idle state value of the CDN node, so that the CDN scheduling server is prevented from calculating the idle state value for each CDN node, and the processing pressure of the CDN scheduling server is reduced.
The sending condition may be used to determine whether the idle state value needs to be sent to the CDN server. In this example, the sending condition may be that a variation of an idle state value of the CDN node in the current time period compared with an idle state value of the CDN node in a previous time period in the current time period is greater than a preset value.
When the idle state value of the CDN node in the current time period is not greater than the preset value compared with the idle state value of the CDN node in the previous time period of the current time period, it may be considered that the idle state value of the CDN node is small in variation and does not affect scheduling of the CDN node, and at this time, the idle state value of the current time period may not be sent to the CDN scheduling server, so that the transmission amount of data is reduced.
The preset value in this example may be an idle state value variation that does not affect the scheduling of the CDN node, and the specific value may be set according to actual experience.
The method provided by the disclosure includes the steps of determining a current load state value of a CDN node by obtaining load parameters of each resource in the CDN node in a current time period, based on the load parameters and preset resource weights of each resource, and determining an idle state value of the CDN node in the current time period based on a theoretical load state value and the current load state value of the CDN node, so that when the idle state value of the CDN node in the current time period is larger than a preset value compared with the idle state value of the CDN node in a previous time period of the current time period, the idle state value of the current time period is sent to a CDN scheduling server, and the CDN scheduling server schedules the CDN node based on the idle state value of the current time period. In the scheme, the idle state value can reflect the current load capacity of the CDN node, so that the CDN node is scheduled according to the idle state value of each CDN node, the scheduling rationality of the CDN node can be improved, the use experience of a user is guaranteed, and the transmission quantity of data can be reduced by setting the sending condition.
Fig. 4 shows a schematic flow diagram of a scheduling method for a content delivery network according to another embodiment of the present disclosure, where the method provided by the embodiment of the present disclosure may be applied to a CDN scheduling server, and as shown in fig. 4, the method may mainly include:
step S410: and receiving an idle state value of the CDN node, wherein the idle state value is determined by the CDN node based on load parameters of each resource in the CDN node in the current time period and is sent by the CDN node when the idle state value meets preset sending conditions.
The resources in the CDN node may include, but are not limited to, a CPU, a memory, a disk, an IO, a network IO, and the like.
The load parameter may be a load index of each resource, such as a CPU load rate.
The current time period may be a time period corresponding to the current acquisition cycle, and in order to ensure real-time monitoring of the state of the CDN node, the acquisition cycle may be set at the level of seconds, and load parameters of each resource in the CDN node are acquired in each acquisition cycle, respectively, so as to ensure real-time performance of acquiring the load parameters.
The idle state value is used for representing the capacity of bearing load and providing service for the CDN node in the current time period, and a basis can be provided for subsequent scheduling of the CDN node based on the idle state value by determining the idle state value.
And the CDN scheduling server is used for scheduling the CDN nodes to provide services according to the idle state value. The CDN node with good bearing load and service providing capacity is scheduled to provide service, so that the service quality of the CDN node can be ensured, and the use experience of a user is further ensured.
The CDN node periodically collects the load parameters of the CDN node, calculates the idle state value according to the load parameters, and sends the idle state value to the CDN scheduling server, so that the real-time property of the CDN scheduling server for obtaining the idle state value of the CDN node can be guaranteed, and the scheduling accuracy of the CDN node is improved.
In this example, because the CDN node calculates the idle state value according to the load parameter, and only needs to send the idle state value to the CDN scheduling server, the amount of data transmission is reduced, and the occupation of resources is reduced. The CDN node calculates the idle state value of the CDN node, so that the CDN scheduling server is prevented from calculating the idle state value for each CDN node, and the processing pressure of the CDN scheduling server is reduced.
In this example, the sending condition may be used to determine whether the idle state value needs to be sent to the CDN server, and the specific sending condition may be set according to an actual requirement. By setting the sending condition, the idle state value meeting the sending condition is sent to the CDN scheduling server, and the idle state value not meeting the sending condition is not sent to the CDN scheduling server, so that the transmission quantity of data is reduced.
As an optional example, the sending condition may be that a variation of an idle state value of the CDN node in a current time period compared with an idle state value of the CDN node in a previous time period of the current time period is greater than a preset value.
When the variation of the idle state value of the CDN node in the current time period compared with the idle state value of the CDN node in the previous time period of the current time period is not greater than the preset value, it may be considered that the variation of the idle state value of the CDN node is small, and the scheduling of the CDN node is not affected, and at this time, the idle state value of the current time period may not be sent to the CDN scheduling server, so that the transmission amount of data is reduced.
The preset value in this example may be an idle state value variation that does not affect the scheduling of the CDN node, and the specific value may be set according to actual experience.
Step S420: and when a CDN node scheduling request is received, scheduling the CDN node based on the idle state value.
Because the idle state value can represent the capability of the CDN node capable of bearing the service at the current time period, the CDN scheduling server can schedule the CDN node according to the idle state value after receiving the idle state value of each managed CDN node.
According to the method provided by the implementation of the disclosure, the idle state value of the CDN node is received, the idle state value is determined by the CDN node based on the load parameters of each resource in the CDN node in the current time period, and the idle state value is sent by the CDN node when the idle state value meets the preset sending condition. And when a CDN node scheduling request is received, scheduling the CDN node based on the idle state value. In the scheme, the CDN node scheduling is performed according to the idle state value of each CDN node, so that the scheduling rationality of the CDN nodes can be improved, and the use experience of a user is guaranteed.
Fig. 5 is a flowchart illustrating a scheduling method of a content delivery network according to another embodiment of the present disclosure, where the method provided by the embodiment of the present disclosure may be applied to a CDN scheduling server, and as shown in fig. 5, the method may mainly include:
step S510: and receiving an idle state value of the CDN node, wherein the idle state value is determined by the CDN node based on load parameters of each resource in the CDN node in the current time period and is sent by the CDN node when the idle state value meets preset sending conditions.
The resources in the CDN node may include, but are not limited to, a CPU, a memory, a disk IO, a network IO, and the like.
The load parameter may be a load index of each resource, such as a CPU load rate.
The load parameter may be a load index of each resource, such as a CPU load rate.
The current time period may be a time period corresponding to the current acquisition cycle, and in order to ensure real-time monitoring of the state of the CDN node, the acquisition cycle may be set at the level of seconds, and load parameters of each resource in the CDN node are acquired in each acquisition cycle, respectively, so as to ensure real-time performance of acquiring the load parameters.
The idle state value is used for representing the capacity of bearing load and providing service for the CDN node in the current time period, and a basis can be provided for subsequent scheduling of the CDN node based on the idle state value by determining the idle state value.
And the CDN scheduling server is used for scheduling the CDN nodes to provide services according to the idle state value. The CDN node with good bearing load and service providing capacity is scheduled to provide service, so that the service quality of the CDN node can be ensured, and the use experience of a user is further ensured.
The CDN node periodically collects the load parameters of the CDN node, calculates the idle state value according to the load parameters, and sends the idle state value to the CDN scheduling server, so that the real-time property of the CDN scheduling server for obtaining the idle state value of the CDN node can be guaranteed, and the scheduling accuracy of the CDN node is improved.
In this example, because the CDN node calculates the idle state value according to the load parameter, and only needs to send the idle state value to the CDN scheduling server, the amount of data transmission is reduced, and the occupation of resources is reduced. The CDN node calculates the idle state value of the CDN node, so that the CDN scheduling server is prevented from calculating the idle state value for each CDN node, and the processing pressure of the CDN scheduling server is reduced.
In this example, the sending condition may be used to determine whether the idle state value needs to be sent to the CDN server, and the specific sending condition may be set according to an actual requirement. By setting the sending conditions, the idle state values meeting the sending conditions are sent to the CDN scheduling server, and the idle state values not meeting the sending conditions are not sent to the CDN scheduling server, so that the transmission quantity of data is reduced.
Step S520: and when a CDN node scheduling request is received, scheduling CDN nodes in the CDN node set to be scheduled based on the idle state value, wherein the idle state value of the CDN nodes in the CDN node set to be scheduled is not less than the corresponding idle state threshold value.
The idle state threshold is used for measuring whether the load bearing capacity of the CDN node can support the scheduling and providing of the CDN node. Specifically, when the idle state value of the CDN node is not less than the idle state threshold, it may be considered that the load bearing capacity of the CDN node can support the CDN node to be scheduled and provide service, and at this time, the CDN node may be classified into a CDN node set to be scheduled; when the idle state value of the CDN node is smaller than the idle state threshold, it may be considered that the load bearing capacity of the CDN node is insufficient to support the CDN node being scheduled and providing the service.
The idle state threshold may be respectively specified for the comprehensive carrying capacity of each CDN node, and as an example, may be obtained by multiplying a theoretical load state value of the CDN node by a coefficient. For example, the theoretical load state value is max _ status, and the idle state threshold is y × max _ status, where y < 1.
In actual use, a CDN node set to be scheduled may be dynamically maintained according to a current idle state value of a CDN node, and specifically, for a CDN node that does not belong to the CDN node set to be scheduled, when the current idle state value of the CDN node is not less than an idle state threshold, the CDN node set to be scheduled may be included in the CDN node set; for the CDN nodes in the CDN node set to be scheduled, when the current idle state value of the CDN node is smaller than the idle state threshold, the CDN node may be removed from the CDN node set to be scheduled.
The CDN scheduling server receives the CDN node scheduling request, can schedule the CDN nodes from the CDN node set to be scheduled to provide services, and because the CDN nodes in the CDN node set to be scheduled all have the capacity of bearing loads, the CDN nodes with the problems of weak service capacity or overhigh load and the like can be prevented from being scheduled to provide services.
As an optional example, scheduling CDN nodes in a CDN node set to be scheduled based on the idle state value includes:
and determining the CDN node with the highest idle state value in the CDN node set to be scheduled as a target CDN node, and scheduling the target CDN node.
The CDN node with the highest centralized idle state value of the CDN nodes to be scheduled is determined as a target CDN node, the target CDN node is the CDN node which has the optimal current load bearing capacity and the best service providing capacity, and the target CDN node is scheduled to provide service so that the service effect can be guaranteed.
As an optional example, the method further includes:
if the overdue CDN node exists in the CDN node set to be scheduled, the overdue CDN node is removed from the CDN node set to be scheduled, and the idle state value of the overdue CDN node is not updated within a pre-specified overdue time length.
In actual use, the CDN nodes may be on-line or off-line at any time, or the network condition is not good. The CDN node of which the idle state value is not updated in the expiration time length can be determined as the expiration CDN node, and the expiration CDN node is removed from the CDN node set to be scheduled without making a scheduling candidate. Compared with the acquisition cycle of the load parameter, the expiration time may be a longer time period, so as to avoid misjudging the CDN node as the expiration node when the idle state value of the CDN node is not updated in several consecutive acquisition cycles, for example, when the acquisition cycle is in the order of seconds, the expiration time is specified as in the order of minutes.
According to the method provided by the implementation of the disclosure, the idle state value of the CDN node is received, the idle state value is determined by the CDN node based on the load parameters of each resource in the CDN node in the current time period, and the idle state value is sent by the CDN node when the idle state value meets the preset sending condition. And scheduling CDN nodes in a CDN node set to be scheduled based on the idle state values when a CDN node scheduling request is received.
Fig. 6 shows a schematic structural diagram of a scheduling system of a content distribution network according to an embodiment of the present disclosure. As shown in fig. 6, the system includes CDN nodes and a state-aware system (i.e., CDN scheduling server).
And (4) node state calculation, namely calculating an idle state value at the CDN node.
And the load data acquisition module is used for acquiring load parameters of each resource in the CDN node.
And the hardware information acquisition module is used for acquiring hardware parameters of each resource in the CDN node.
And (4) CPU load calculation, namely determining CPU load parameters of the CDN nodes.
And (4) memory load calculation, namely determining memory load parameters of the CDN nodes.
And (4) disk IO load calculation, namely determining disk IO load parameters of the CDN nodes.
And (4) calculating the network IO load, namely determining the network IO load parameters of the CDN nodes.
And calculating a state value, namely calculating an idle state value according to the load parameter of each resource.
And dynamically evaluating the weight, namely, appointing a preset resource weight according to the hardware parameter of each resource.
Load and state value are reported, that is, load parameters and idle state values are reported, in this example, whether to upload the load parameters can be selected according to actual needs.
In the state perception system, node state management is to manage nodes according to idle state values sent by CDN nodes.
And receiving node state information, namely receiving an idle state value reported by the CDN node through an idle state value interface.
And managing node state information, namely managing idle state values of all CDN nodes.
The node pool is a node set containing all CDN nodes, where the schedulable node pool is a CDN node set to be scheduled, and the non-schedulable node pool is a CDN node that does not belong to the CDN node set to be scheduled.
And the scheduling node selection module schedules the CDN node according to the idle state value.
And the scheduling interface returns the scheduled target CDN node information to the service requester.
Based on the same principle as the method shown in fig. 1, fig. 7 shows a schematic structural diagram of a scheduling apparatus of a content distribution network provided by an embodiment of the present disclosure, as shown in fig. 7, the scheduling apparatus 70 of the content distribution network may include:
a load parameter obtaining module 710, configured to obtain a load parameter of each resource in the CDN node in a current time period;
an idle state value determining module 720, configured to determine an idle state value of the CDN node in the current time period based on the load parameter;
and an idle state value sending module 730, configured to send the idle state value to the CDN scheduling server when the idle state value meets a preset sending condition, so that the CDN scheduling server schedules the CDN node based on the idle state value.
According to the device provided by the disclosure, the load parameters of each resource in the CDN node in the current time period are obtained, the idle state value of the CDN node in the current time period is determined based on the load parameters, and when the idle state value meets the preset sending condition, the idle state value is sent to the CDN scheduling server, so that the CDN scheduling server schedules the CDN node based on the idle state value. In the scheme, the CDN node scheduling is performed according to the idle state value of each CDN node, so that the scheduling rationality of the CDN nodes can be improved, and the use experience of a user is guaranteed.
It can be understood that the above modules of the scheduling apparatus of the content distribution network in the embodiment of the present disclosure have functions of implementing the corresponding steps of the scheduling method of the content distribution network in the embodiment shown in fig. 1. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the testing apparatus, reference may be specifically made to the corresponding description of the scheduling method of the content distribution network in the embodiment shown in fig. 1, and details are not repeated here.
Based on the same principle as the method shown in fig. 2, fig. 8 shows a schematic structural diagram of a scheduling apparatus of another content distribution network provided by the embodiment of the present disclosure, as shown in fig. 8, the scheduling apparatus 80 of the content distribution network may include:
a load parameter obtaining module 810, configured to obtain a load parameter of each resource in the CDN node in a current time period;
a current load state value determining module 820, configured to determine a current load state value of the CDN node based on the load parameter and a preset resource weight of each resource;
an idle state value calculation module 830, configured to determine an idle state value of the CDN node in a current time period based on a theoretical load state value and a current load state value of the CDN node;
the idle state value sending module 840 is configured to send the idle state value to the CDN scheduling server when the idle state value meets a preset sending condition, so that the CDN scheduling server schedules a CDN node based on the idle state value.
The device provided by the disclosure determines a current load state value of the CDN node by acquiring load parameters of each resource in the CDN node in a current time period, based on the load parameters and preset resource weights of each resource, and determines an idle state value of the CDN node in the current time period based on a theoretical load state value and the current load state value of the CDN node, so that when the idle state value meets preset sending conditions, the idle state value is sent to the CDN scheduling server, and the CDN scheduling server schedules the CDN node based on the idle state value. In the scheme, the idle state value can reflect the current load capacity of the CDN node, so that the CDN node is scheduled according to the idle state value of each CDN node, the scheduling rationality of the CDN node can be improved, and the use experience of a user is guaranteed.
It can be understood that the above modules of the scheduling apparatus of the content distribution network in the embodiment of the present disclosure have functions of implementing the corresponding steps of the scheduling method of the content distribution network in the embodiment shown in fig. 2. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the testing apparatus, reference may be specifically made to the corresponding description of the scheduling method of the content distribution network in the embodiment shown in fig. 2, and details are not repeated here.
Optionally, the current load state value determining module is specifically configured to:
determining a current load state value of the CDN node based on the load parameters and the preset resource weights of the resources by the following formula:
status=∑ i=1 S i _load*S i _weight
where status is the current load status value, S i Is any one of the resources of the CDN node, S i Load is a load parameter of any resource, S i And _weightis a preset resource weight of any resource.
Optionally, the idle state value calculating module is specifically configured to:
determining an idle state value of the CDN node based on the load parameter by the following formula:
x=max_status-status×n;
wherein x is an idle state value, max _ status is a theoretical load state value, status is a current load state value, and n is a first weight coefficient.
Optionally, the method further includes:
the theoretical load state value calculation module is used for determining the theoretical load state value of the CDN node based on the preset resource weight of each resource through the following formula:
max_status=m×∑ i=1 S i _weight
wherein max _ status is a theoretical load state value, S i Is any one of the resources of the CDN node, S i And _weightis a preset resource weight of any resource, and m is a second weight coefficient.
Based on the same principle as the method shown in fig. 3, fig. 9 shows a schematic structural diagram of a scheduling apparatus of a content distribution network provided by an embodiment of the present disclosure, as shown in fig. 9, a scheduling apparatus 90 of the content distribution network may include:
a load parameter obtaining module 910, configured to obtain a load parameter of each resource in the CDN node in a current time period.
An idle state value determining module 920, configured to determine an idle state value of the CDN node in the current time period based on the load parameter.
The idle state value sending module 930 is configured to send the idle state value in the current time period to the CDN scheduling server when the idle state value of the CDN node in the current time period is greater than a preset value compared with a variation of the idle state value of the CDN node in a previous time period in the current time period, so that the CDN scheduling server schedules the CDN node based on the idle state value in the current time period.
The method provided by the embodiment of the disclosure includes the steps of obtaining load parameters of each resource in a CDN node in a current time period, determining a current load state value of the CDN node based on the load parameters and preset resource weights of each resource, and determining an idle state value of the CDN node in the current time period based on a theoretical load state value and the current load state value of the CDN node, so that when the idle state value of the CDN node in the current time period is larger than a preset value in comparison with the idle state value of the CDN node in a previous time period of the current time period, the idle state value in the current time period is sent to a CDN scheduling server, and the CDN scheduling server schedules the CDN node based on the idle state value in the current time period. In the scheme, the idle state value can reflect the current load capacity of the CDN node, so that the CDN node is scheduled according to the idle state value of each CDN node, the scheduling rationality of the CDN node can be improved, the use experience of a user is guaranteed, and the transmission quantity of data can be reduced by setting the sending condition.
It can be understood that the above modules of the scheduling apparatus of the content distribution network in the embodiment of the present disclosure have functions of implementing the corresponding steps of the scheduling method of the content distribution network in the embodiment shown in fig. 3. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the testing apparatus, reference may be specifically made to the corresponding description of the scheduling method of the content distribution network in the embodiment shown in fig. 3, and details are not described here again.
Based on the same principle as the method shown in fig. 4, fig. 10 shows a schematic structural diagram of a scheduling apparatus of a content distribution network provided by an embodiment of the present disclosure, as shown in fig. 10, the scheduling apparatus 1000 of the content distribution network may include:
an idle state value receiving module 1010, configured to receive an idle state value of the CDN node, where the idle state value is determined by the CDN node based on load parameters of each resource in the CDN node in a current time period and is sent by the CDN node when the idle state value meets a preset sending condition;
and a scheduling module 1020, configured to schedule the CDN node based on the idle state value when the CDN node scheduling request is received.
The device provided by the implementation of the disclosure receives an idle state value of the CDN node, where the idle state value is determined by the CDN node based on a load parameter of each resource in the CDN node in a current time period, and is sent by the CDN node when the idle state value satisfies a preset sending condition. And when a CDN node scheduling request is received, scheduling the CDN node based on the idle state value. In the scheme, the CDN node scheduling is performed according to the idle state value of each CDN node, so that the scheduling rationality of the CDN nodes can be improved, and the use experience of a user is guaranteed.
It can be understood that the above modules of the scheduling apparatus of the content distribution network in the embodiment of the present disclosure have functions of implementing the corresponding steps of the scheduling method of the content distribution network in the embodiment shown in fig. 4. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the testing apparatus, reference may be specifically made to the corresponding description of the scheduling method of the content distribution network in the embodiment shown in fig. 4, and details are not repeated here.
Based on the same principle as the method shown in fig. 5, fig. 11 shows a schematic structural diagram of a scheduling apparatus of a content distribution network provided by an embodiment of the present disclosure, as shown in fig. 11, the scheduling apparatus 1100 of the content distribution network may include:
the idle state value receiving module 1110 is configured to receive an idle state value of the CDN node, where the idle state value is determined by the CDN node based on load parameters of each resource in the CDN node in a current time period and is sent by the CDN node when the idle state value meets a preset sending condition.
The scheduling module 1120 is configured to schedule CDN nodes in the CDN node set to be scheduled based on the idle state value when receiving the CDN node scheduling request, where the idle state value of the CDN node in the CDN node set to be scheduled is not less than the corresponding idle state threshold.
According to the method provided by the implementation of the disclosure, the idle state value of the CDN node is received, the idle state value is determined by the CDN node based on the load parameters of each resource in the CDN node in the current time period, and the idle state value is sent by the CDN node when the idle state value meets the preset sending condition. And scheduling CDN nodes in a CDN node set to be scheduled based on the idle state values when a CDN node scheduling request is received.
It can be understood that the above modules of the scheduling apparatus of the content distribution network in the embodiment of the present disclosure have functions of implementing the corresponding steps of the scheduling method of the content distribution network in the embodiment shown in fig. 5. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the testing apparatus, reference may be specifically made to the corresponding description of the scheduling method of the content distribution network in the embodiment shown in fig. 5, and details are not repeated here.
Optionally, when the scheduling module schedules a CDN node in the CDN node set to be scheduled based on the idle state value, the scheduling module is specifically configured to:
and determining the CDN node with the highest idle state value in the CDN node set to be scheduled as a target CDN node, and scheduling the target CDN node.
Optionally, the apparatus further comprises:
and the overdue node removing module is used for removing the overdue CDN nodes from the CDN node set to be scheduled when the overdue CDN nodes exist in the CDN node set to be scheduled, and the idle state values of the overdue CDN nodes are not updated within the pre-specified overdue time length.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
The electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a scheduling method of a content distribution network as provided by an embodiment of the present disclosure.
Compared with the prior art, the electronic equipment determines the idle state value of the CDN node in the current time period based on the load parameters by acquiring the load parameters of each resource in the CDN node in the current time period, and sends the idle state value to the CDN scheduling server when the idle state value meets the preset sending condition, so that the CDN scheduling server schedules the CDN node based on the idle state value. In the scheme, the CDN node scheduling is performed according to the idle state value of each CDN node, so that the scheduling rationality of the CDN nodes can be improved, and the use experience of a user is guaranteed.
The readable storage medium is a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a scheduling method of a content distribution network as provided by an embodiment of the present disclosure.
Compared with the prior art, the readable storage medium obtains the load parameters of each resource in the CDN node in the current time period, determines the idle state value of the CDN node in the current time period based on the load parameters, and sends the idle state value to the CDN scheduling server when the idle state value meets the preset sending condition, so that the CDN scheduling server schedules the CDN node based on the idle state value. In the scheme, the CDN node scheduling is performed according to the idle state value of each CDN node, so that the scheduling rationality of the CDN nodes can be improved, and the use experience of a user is guaranteed.
The computer program product, comprising a computer program which, when executed by a processor, implements a scheduling method of a content distribution network as provided by an embodiment of the present disclosure.
Compared with the prior art, the computer program product determines the idle state value of the CDN node in the current time period based on the load parameters by obtaining the load parameters of each resource in the CDN node in the current time period, and sends the idle state value to the CDN scheduling server when the idle state value meets the preset sending condition, so that the CDN scheduling server schedules the CDN node based on the idle state value. In the scheme, the CDN node scheduling is performed according to the idle state value of each CDN node, so that the scheduling rationality of the CDN nodes can be improved, and the use experience of a user is guaranteed.
Fig. 12 illustrates a schematic block diagram of an example electronic device 2000, which can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 12, the apparatus 2000 includes a computing unit 2001, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)2002 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 2003. In the RAM 2003, various programs and data required for the operation of the device 2000 can also be stored. The calculation unit 2001, the ROM 2002, and the RAM 2003 are connected to each other by a bus 2004. An input/output (I/O) interface 2005 is also connected to bus 2004.
A number of components in device 2000 are connected to I/O interface 2005, including: an input unit 2006 such as a keyboard, a mouse, and the like; an output unit 2007 such as various types of displays, speakers, and the like; a storage unit 2008 such as a magnetic disk, an optical disk, or the like; and a communication unit 2009 such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 2009 allows the device 2000 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 2001 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 2001 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 2001 executes the scheduling method of the content distribution network provided in the embodiment of the present disclosure. For example, in some embodiments, the scheduling method of a content distribution network provided in embodiments of the present disclosure may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 2008. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 2000 via the ROM 2002 and/or the communication unit 2009. When the computer program is loaded into the RAM 2003 and executed by the computing unit 2001, one or more steps of the scheduling method of the content distribution network provided in the embodiments of the present disclosure may be performed. Alternatively, in other embodiments, the computing unit 2001 may be configured by any other suitable means (e.g., by means of firmware) to perform the scheduling method of the content distribution network provided in the embodiments of the present disclosure.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods provided by embodiments of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.
Claims (13)
1. A scheduling method of a content delivery network is applied to CDN nodes of the content delivery network, and comprises the following steps:
acquiring load parameters of each resource in the CDN node in the current time period;
determining an idle state value of the CDN node in the current time period based on the load parameter, wherein the idle state value is used for representing the load pressure which can be borne by the CDN node in the current time period;
if the idle state value meets a preset sending condition, sending the idle state value to a CDN scheduling server so that the CDN scheduling server schedules the CDN nodes based on the idle state value;
the transmission conditions include:
the idle state value of the CDN node in the current time period is more than a preset value compared with the idle state value of the CDN node in the previous time period of the current time period.
2. The method of claim 1, wherein the determining an idle state value for the CDN node for the current time period based on the load parameter comprises:
determining a current load state value of the CDN node based on the load parameters and preset resource weights of the resources;
and determining an idle state value of the CDN node in the current time period based on the theoretical load state value of the CDN node and the current load state value.
3. The method of claim 2, wherein the determining a current load status value of the CDN node based on the load parameter and a preset resource weight for each of the resources comprises:
determining a current load state value of the CDN node based on the load parameter and a preset resource weight of each resource through the following formula:
status=∑ i=1 S i _load*S i _weight
where status is the current load status value, S i Is any one of the resources of the CDN node, S i Load is a load parameter of said any resource, S i And _weightis the preset resource weight of any one resource.
4. The method of claim 2, wherein the determining an idle state value for the CDN node based on the theoretical load state value for the CDN node and the current load state value comprises:
determining an idle state value of the CDN node based on the load parameter by:
x=max_status–status×n;
wherein x is an idle state value, max _ status is a theoretical load state value, status is a current load state value, and n is a first weight coefficient.
5. The method of any of claims 2-4, further comprising:
determining a theoretical load state value of the CDN node based on a preset resource weight of each resource through the following formula:
max_status=m×∑ i=1 S i _weight
wherein max _ status is a theoretical load state value, S i Is any one of the resources of the CDN node, S i Weight is preset of any one resourceAnd m is a second weight coefficient.
6. A scheduling method of a content delivery network is applied to a CDN scheduling server, and the method comprises the following steps:
receiving an idle state value of a CDN node, wherein the idle state value is determined by the CDN node based on load parameters of resources in the CDN node in a current time period and is sent by the CDN node when the idle state value meets a preset sending condition, and the idle state value is used for representing load pressure which can be born by the CDN node in the current time period;
when a CDN node scheduling request is received, scheduling the CDN node based on the idle state value;
the transmission conditions include:
the idle state value of the CDN node in the current time period is more than a preset value compared with the idle state value of the CDN node in the previous time period of the current time period.
7. The method of claim 6, wherein the scheduling the CDN node based on the idle state value comprises:
scheduling CDN nodes in a CDN node set to be scheduled based on the idle state value, wherein the idle state value of the CDN nodes in the CDN node set to be scheduled is not less than a corresponding idle state threshold value.
8. The method of claim 7, wherein the scheduling CDN nodes in the set of CDN nodes to be scheduled based on the idle state value comprises:
and determining the CDN node with the highest idle state value in the CDN node set to be scheduled as a target CDN node, and scheduling the target CDN node.
9. The method of claim 7, further comprising:
if an overdue CDN node exists in the CDN node set to be scheduled, removing the overdue CDN node from the CDN node set to be scheduled, wherein the idle state value of the overdue CDN node is not updated within a pre-specified overdue duration.
10. A scheduling apparatus of a content distribution network, comprising:
the load parameter acquisition module is used for acquiring load parameters of each resource in the CDN node in the current time period;
an idle state value determining module, configured to determine, based on the load parameter, an idle state value of the CDN node in the current time period, where the idle state value is used to represent a load pressure that the CDN node can bear in the current time period;
the idle state value sending module is used for sending the idle state value to a CDN scheduling server when the idle state value meets a preset sending condition so as to enable the CDN scheduling server to schedule the CDN node based on the idle state value;
the transmission conditions include:
the idle state value of the CDN node in the current time period is more than a preset value compared with the idle state value of the CDN node in the previous time period of the current time period.
11. A scheduling apparatus of a content distribution network, comprising:
an idle state value receiving module, configured to receive an idle state value of a CDN node, where the idle state value is determined by the CDN node based on load parameters of each resource in the CDN node in a current time period and is sent by the CDN node when the idle state value meets a preset sending condition, and the idle state value is used to represent a load pressure that the CDN node can bear in the current time period;
the scheduling module is used for scheduling the CDN node based on the idle state value when a CDN node scheduling request is received;
the transmission conditions include:
the idle state value of the CDN node in the current time period is more than a preset value compared with the idle state value of the CDN node in the previous time period of the current time period.
12. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
13. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110666904.8A CN113411390B (en) | 2021-06-16 | 2021-06-16 | Scheduling method and device of content distribution network and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110666904.8A CN113411390B (en) | 2021-06-16 | 2021-06-16 | Scheduling method and device of content distribution network and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113411390A CN113411390A (en) | 2021-09-17 |
CN113411390B true CN113411390B (en) | 2022-08-09 |
Family
ID=77684317
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110666904.8A Active CN113411390B (en) | 2021-06-16 | 2021-06-16 | Scheduling method and device of content distribution network and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113411390B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106941507A (en) * | 2016-01-04 | 2017-07-11 | 中兴通讯股份有限公司 | The dispatching method and device of request message |
CN110149377A (en) * | 2019-04-30 | 2019-08-20 | 广州微算互联信息技术有限公司 | A kind of video service node resource allocation methods, system, device and storage medium |
CN110191186A (en) * | 2019-06-04 | 2019-08-30 | 湖北五五互联科技有限公司 | CDN server dispatching method, equipment and computer readable storage medium |
CN110198332A (en) * | 2018-04-13 | 2019-09-03 | 腾讯科技(深圳)有限公司 | Dispatching method, device and the storage medium of content delivery network node |
CN111865720A (en) * | 2020-07-20 | 2020-10-30 | 北京百度网讯科技有限公司 | Method, apparatus, device and storage medium for processing request |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103905341B (en) * | 2012-12-28 | 2017-03-29 | ***通信集团公司 | Resource regulating method, apparatus and system |
CN107645525A (en) * | 2016-07-21 | 2018-01-30 | 阿里巴巴集团控股有限公司 | Detection processing, dispatching method and related device, the node of content distributing network |
-
2021
- 2021-06-16 CN CN202110666904.8A patent/CN113411390B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106941507A (en) * | 2016-01-04 | 2017-07-11 | 中兴通讯股份有限公司 | The dispatching method and device of request message |
CN110198332A (en) * | 2018-04-13 | 2019-09-03 | 腾讯科技(深圳)有限公司 | Dispatching method, device and the storage medium of content delivery network node |
CN110149377A (en) * | 2019-04-30 | 2019-08-20 | 广州微算互联信息技术有限公司 | A kind of video service node resource allocation methods, system, device and storage medium |
CN110191186A (en) * | 2019-06-04 | 2019-08-30 | 湖北五五互联科技有限公司 | CDN server dispatching method, equipment and computer readable storage medium |
CN111865720A (en) * | 2020-07-20 | 2020-10-30 | 北京百度网讯科技有限公司 | Method, apparatus, device and storage medium for processing request |
Also Published As
Publication number | Publication date |
---|---|
CN113411390A (en) | 2021-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109981744B (en) | Data distribution method and device, storage medium and electronic equipment | |
CN114500339B (en) | Node bandwidth monitoring method and device, electronic equipment and storage medium | |
JP5617914B2 (en) | Throughput maintenance support system, apparatus, method, and program | |
CN113590403B (en) | Pressure testing method, device, system, electronic equipment, storage medium and product | |
CN112261120B (en) | Cloud-side cooperative task unloading method and device for power distribution internet of things | |
CN114065864A (en) | Federal learning method, federal learning device, electronic device, and storage medium | |
CN117135131A (en) | Task resource demand perception method for cloud edge cooperative scene | |
CN114779109A (en) | Method and device for determining battery health state, electronic equipment and storage medium | |
CN113434218A (en) | Micro-service configuration method, device, electronic equipment and medium | |
CN113411390B (en) | Scheduling method and device of content distribution network and electronic equipment | |
CN115774602A (en) | Container resource allocation method, device, equipment and storage medium | |
CN115952054A (en) | Simulation task resource management method, device, equipment and medium | |
CN115392591A (en) | Task processing method, device, equipment and storage medium | |
CN114328047A (en) | System test method, device, electronic equipment and storage medium | |
CN114625620A (en) | CPU utilization rate calculation method and device, electronic equipment and storage medium | |
CN114598705B (en) | Message load balancing method, device, equipment and medium | |
CN110955728A (en) | Power consumption data transmission method, server and storage medium | |
CN113656299B (en) | Method and device for determining limit QPS, electronic equipment and readable storage medium | |
CN113225228B (en) | Data processing method and device | |
CN115442432B (en) | Control method, device, equipment and storage medium | |
CN115034926A (en) | Data processing method and device, electronic equipment and storage medium | |
CN115454847A (en) | Pressure testing method and device, electronic equipment and storage medium | |
CN117851208A (en) | Chip evaluation method and device, electronic equipment and medium | |
CN115034672A (en) | Method, device, equipment and storage medium for determining power failure loss | |
CN115576830A (en) | Method and device for determining quality of use case, electronic equipment and storage medium |
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 |