CN114500663B - Scheduling method, device, equipment and storage medium of content distribution network equipment - Google Patents

Scheduling method, device, equipment and storage medium of content distribution network equipment Download PDF

Info

Publication number
CN114500663B
CN114500663B CN202111627298.5A CN202111627298A CN114500663B CN 114500663 B CN114500663 B CN 114500663B CN 202111627298 A CN202111627298 A CN 202111627298A CN 114500663 B CN114500663 B CN 114500663B
Authority
CN
China
Prior art keywords
distribution network
content distribution
network device
weight
network equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111627298.5A
Other languages
Chinese (zh)
Other versions
CN114500663A (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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN202111627298.5A priority Critical patent/CN114500663B/en
Publication of CN114500663A publication Critical patent/CN114500663A/en
Application granted granted Critical
Publication of CN114500663B publication Critical patent/CN114500663B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • H04L67/1004Server selection for load balancing
    • 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
    • H04L67/1004Server selection for load balancing
    • H04L67/101Server selection for load balancing based on network conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention relates to the technical field of content distribution networks, and discloses a scheduling method, a scheduling device, scheduling equipment and a storage medium of content distribution network equipment. The method is applied to the responding end and comprises the following steps: receiving a query request sent by a request end; detecting whether a query request hits in a cache; in the case that the query request cache hit is detected, determining a target content distribution network device from the hit content distribution network devices according to the current weight of the hit content distribution network device; the current weight is obtained by adjusting the initial weight according to the bandwidth redundancy ratio change of the content distribution network equipment; under the condition that the miss cache hit of the query request is detected, determining target content distribution network equipment from the content distribution network equipment according to the current bandwidth redundancy ratio and the current weight of each content distribution network equipment; the scheduling target content distribution network device responds to the query request. And balanced scheduling is realized, unbalanced flow is avoided, and resource waste is reduced.

Description

Scheduling method, device, equipment and storage medium of content distribution network equipment
Technical Field
The embodiment of the invention relates to the technical field of content distribution networks, in particular to a scheduling method, a scheduling device and a scheduling storage medium of content distribution network equipment.
Background
Each level of nodes in the content delivery network (Content Delivery Network, CDN) serve as request terminals, a request is initiated to an upper level node closest to the upper level node, and after the request is received, the upper level node serves as a response terminal to randomly schedule one content delivery network device from a plurality of content delivery network devices managed by the upper level node to respond to the request.
However, the random scheduling of the content distribution network devices in response to the request easily causes traffic imbalance among the content distribution network devices, and the service capabilities of the content distribution network devices may not be the same, which aggravates the imbalance, and resource waste easily occurs while quality of service is affected.
Disclosure of Invention
The embodiment of the invention aims to provide a scheduling method, a scheduling device, scheduling equipment and a storage medium of content distribution network equipment, so that when the content distribution network equipment is scheduled to respond to a request, the service capacity of each content distribution network equipment can be considered, balanced scheduling is realized, unbalanced flow is avoided, and resource waste is reduced.
To achieve the above object, an embodiment of the present invention provides a scheduling method of a content distribution network device, applied to a response end, including: receiving a query request sent by a request end; detecting whether the query request is a cache hit; in the case that the query request cache hit is detected, determining a target content distribution network device from the hit content distribution network devices according to the current weight of the hit content distribution network device; the current weight is obtained by adjusting the initial weight according to the bandwidth redundancy ratio change of the content distribution network equipment; under the condition that the query request miss is detected, determining the target content distribution network equipment from the content distribution network equipment according to the current bandwidth redundancy ratio and the current weight of each content distribution network equipment; and scheduling the target content distribution network equipment to respond to the query request.
To achieve the above object, an embodiment of the present invention further provides a scheduling apparatus for a content distribution network device, including: the receiving module is used for receiving the query request sent by the request end; the detection module is used for detecting whether the query request is in cache hit or not; a first determining module, configured to determine, when the query request cache hit is detected, a target content distribution network device from the hit content distribution network devices according to a current weight of the hit content distribution network device; the current weight is obtained by adjusting the initial weight according to the bandwidth redundancy ratio change of the content distribution network equipment; the second determining module is used for determining the target content distribution network equipment from the content distribution network equipment according to the current bandwidth redundancy ratio and the current weight of each content distribution network equipment under the condition that the query request is detected to miss; and the scheduling module is used for scheduling the target content distribution network equipment to respond to the query request.
To achieve the above object, an embodiment of the present invention further provides an electronic device, 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 the method of scheduling a content distribution network device as described above.
To achieve the above object, an embodiment of the present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the scheduling method of a content distribution network device as described above.
The scheduling method of the content distribution network equipment provided by the embodiment of the invention configures the weight obtained by adjusting the bandwidth redundancy ratio change based on the content distribution network equipment for each content distribution network equipment. Thus, upon receiving a query request, whether in the event that a query request cache hit is detected, determining a target content distribution network device from among the hit content distribution network devices according to the current weight of the hit content distribution network device; if the cache hit of the query request is detected, determining target content distribution network equipment from the content distribution network equipment according to the current bandwidth redundancy ratio and the current weight of each content distribution network equipment, and selecting the content distribution network equipment for responding to the received query request according to the weight; therefore, under the condition that the content distribution network equipment with high bandwidth redundancy ratio is preferentially selected to respond to the query request, the content distribution network equipment with more flow bandwidth, namely the content distribution network equipment with low bandwidth redundancy ratio, is scheduled less later, the flow bandwidth is not increased any more, the bandwidth redundancy ratio is not reduced any more, the content distribution network equipment with less flow bandwidth, namely the content distribution network equipment with high bandwidth redundancy ratio, is scheduled more later, the flow bandwidth is increased, the bandwidth redundancy ratio is reduced continuously, and finally the bandwidth redundancy ratio of each content distribution network equipment is approaching as much as possible, so that flow balance is realized, and the problem of resource waste caused by unbalanced flow is avoided. In addition, under the condition of the request cache hit, the content distribution network equipment which is cached in the cache hit can be preferentially scheduled to serve as the query request, the problem that bandwidth resources of the content distribution network equipment are wasted due to the fact that the missed content distribution network equipment is called to serve as the query request is avoided, and the source returning cost can be reduced. Furthermore, under the condition of request cache hit, not only the weight but also the bandwidth redundancy ratio are considered when the target content distribution network device is determined, so that the problem of selecting the content distribution network device with the too small bandwidth redundancy ratio to serve in the overload state is avoided.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
Fig. 1 is a flowchart of a scheduling method of a content distribution network device provided in an embodiment of the present invention;
fig. 2 is a graph of bandwidth variation of a content distribution network device in the case where the bandwidth redundancy ratio cannot be negative after applying the scheduling method of the content distribution network device provided in the embodiment of the present invention;
fig. 3 is a graph of bandwidth variation of a content distribution network device in the case where a bandwidth redundancy ratio may be negative after applying a scheduling method of the content distribution network device provided in an embodiment of the present invention;
fig. 4 is a flowchart of a scheduling method of a content distribution network device including a step of lowering a current weight provided in another embodiment of the present invention;
fig. 5 is a flowchart of a scheduling method of a content distribution network device including a step of increasing a current weight provided in another embodiment of the present invention;
fig. 6 is a graph of bandwidth variation of a content distribution network device after applying a scheduling method of the content distribution network device provided in an embodiment of the present invention;
Fig. 7 is a graph of bandwidth variation of a low-profile cache network device after applying the scheduling method of the content distribution network device provided in the embodiment of the present invention;
fig. 8 is a schematic structural view of a scheduling apparatus of a content distribution network device provided in another embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to another embodiment of the present invention.
Detailed Description
As known from the background art, the response end randomly schedules a content distribution network device to respond to the request, so that the problem of unbalanced flow exists, the service quality is easily affected, and the resource waste is caused.
In order to solve the above problems, an embodiment of the present invention provides a scheduling method of a content distribution network device, applied to a response end, including: receiving a query request sent by a request end; detecting whether the query request is a cache hit; in the case that the query request cache hit is detected, determining a target content distribution network device from the hit content distribution network devices according to the current weight of the hit content distribution network device; the current weight is obtained by adjusting the initial weight according to the bandwidth redundancy ratio change of the content distribution network equipment; under the condition that the query request miss is detected, determining the target content distribution network equipment from the content distribution network equipment according to the current bandwidth redundancy ratio and the current weight of each content distribution network equipment; and scheduling the target content distribution network equipment to respond to the query request.
According to the scheduling method of the content distribution network equipment, the original random scheduling mode is replaced by the scheduling according to the weight, wherein the weight is obtained by adjusting the bandwidth redundancy ratio change of the content distribution network equipment, namely, the weight capable of reflecting the bandwidth redundancy ratio change is introduced in the scheduling process, so that the content distribution network equipment response request can be scheduled according to the bandwidth redundancy ratio change of the content distribution network equipment by scheduling according to the weight, the balance of the bandwidth redundancy ratio change dimension of each content distribution network equipment in the scheduling process is realized, the phenomenon that the bandwidth redundancy ratio of part of the content distribution network is too small to influence the quality of service provided by the content distribution network equipment is avoided, and the problem that the bandwidth resource is not fully utilized to cause waste is avoided. In addition, under the condition of the request cache hit, the content distribution network equipment which is cached and hit can be preferentially scheduled to serve as the query request, the problem that bandwidth resources of the content distribution network equipment which are not hit and serve as the query request are wasted is avoided, in addition, under the condition of the request cache hit, not only the weight but also the bandwidth redundancy ratio are considered when the target content distribution network equipment is determined, and the condition that the content distribution network equipment with the too small bandwidth redundancy ratio is selected to serve in an overload state is avoided.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be understood by those of ordinary skill in the art that in various embodiments of the present invention, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, the claimed technical solution of the present invention can be realized without these technical details and various changes and modifications based on the following embodiments.
The following embodiments are divided for convenience of description, and should not be construed as limiting the specific implementation of the present invention, and the embodiments can be mutually combined and referred to without contradiction.
An aspect of the present invention provides a scheduling method of a content delivery network device, which is applied to a response end, where the response end is a node capable of receiving a request of a lower node in a CDN, such as a scheduling server capable of receiving a request of an edge server, an edge server capable of receiving a request of a terminal, and the like. As shown in fig. 1, the flow of the scheduling method of the content distribution network device at least includes the following steps:
step 101, receiving a query request sent by a request end.
In this embodiment, the request end is a lower node of the response end, which may be an edge server, or may be a terminal, or the like, and in particular, the request end and the response end may be both edge servers, the request end is a lower edge server, and the response end is an upper edge server; the query request may carry information such as an internet protocol (Internet Protocol, IP) address, a uniform resource locator (Uniform Resource Locator, URL) of the requesting end, which will not be described in detail herein.
Step 102, detecting whether the query request has a cache hit, if yes, executing step 103, and if not, executing step 104.
In this embodiment, the query request cache hit indicates that the content requested by the query request has been cached in a plurality of content distribution network devices managed by the responder. It will be appreciated that, before receiving the current query request, other users may have sent a request with the same request content as the current query request to the responding end, and then the responding end may have cached the content requested by the current query request on some content distribution network device or devices managed by the responding end before receiving the current query request, that is, the case that the current query request has a cache hit.
In some examples, each content distribution network device managed by the responding end reports the cache content of the content distribution network device to the responding end, so that the responding end detects whether the query request has a cache hit or not by matching the content requested by the query request, judges the cache hit of the query request if the matching is successful, and judges that the query request has a miss hit if the matching is unsuccessful. In particular, in the matching process, the cache content of each content distribution network device is matched, that is, all content distribution network devices which can be successfully matched are found, instead of stopping matching after the cache content of a certain content distribution network device is successfully matched.
In other examples, the responding end may issue information capable of indicating the content requested by the query request to each content distribution network device managed by the responding end, each content distribution network receives the information and then performs matching in its own cache, if the matching is successful, a matching success response is returned to the responding end, and if the matching success response of at least one content distribution network device is received by the responding end, the responding end determines that the query request has a cache hit, and if the matching success response is not received, the responding end determines that the query request has a cache hit.
Of course, the foregoing is merely illustrative of how to detect whether the query request has a cache hit, and in other examples, the detection may be performed in other manners, which will not be described herein.
It should be noted that, the query request may also specify an operator, that is, an operator to which the content distribution network device that responds to the query request belongs, where the detection process of the response end actually includes: and determining the callable content distribution network equipment according to the operator carried by the query request, and then detecting the cache hit of the query request in the callable content distribution network equipment.
Step 103, determining a target content distribution network device from the hit content distribution network devices according to the current weight of the hit content distribution network device.
In this embodiment, the current weight is obtained by adjusting the initial weight according to the change of the bandwidth redundancy ratio of the content distribution network device, where the preset weight is an initial weight value given to the content distribution network device by the response end after the content distribution network device has service capability, and after the content distribution network device is scheduled to provide service, the response end adjusts the weight according to the change of the bandwidth redundancy ratio caused by the scheduling of the content distribution network device.
In particular, in the present embodiment, the weight of the content distribution network device is in positive correlation with the variation value of the bandwidth redundancy ratio.
It should be noted that, the present embodiment does not limit the type of the content distribution network device, and may be a high-configuration cache network device, or may be a device cluster formed by combining a plurality of low-configuration cache network devices, where the high-configuration cache network device and the low-configuration cache network device are related to performances such as bandwidth of the device. It should be noted that, when the content distribution network device refers to a device cluster formed by combining a plurality of low-profile cache network devices, full utilization of the low-profile cache network devices is realized, the utilization rate of the devices is improved, and the cost is reduced.
In some examples, the bandwidth redundancy ratio of the content distribution network device is determined by the expression r= (B-B ')/B, where R is the bandwidth redundancy ratio of the content distribution network device, B' is the used bandwidth of the content distribution network device, and B is the nominal bandwidth of the content distribution network device. It may be appreciated that, in order to be able to determine the current weight, the response end needs to acquire the used bandwidth data and the rated bandwidth data of each content distribution network device, so that each content distribution network device needs to report its own real-time used bandwidth data to the response end, and the rated bandwidth may be uploaded along with the real-time used bandwidth data each time or uploaded once when the content distribution network device is started and not uploaded any more.
It is worth mentioning that the present embodiment does not limit the size relationship of the used bandwidth of the content distribution network device and the rated bandwidth of the content distribution network device, so that the bandwidth redundancy ratio of the content distribution network device can take a negative value, thereby avoiding adverse effects of the "seesaw" effect on the stability of the content distribution network device and the quality of providing services due to the neutrality of the request access and the dispersion of the request push, with respect to the limitation that the used bandwidth of the content distribution network device is not larger than the rated bandwidth of the content distribution network device, which is generally increased when the bandwidth redundancy ratio of the content distribution network device is defined, i.e., the redundancy bandwidth ratio is defined based on the used bandwidth of the content distribution network device falling on the [0, rated bandwidth ] section.
To help those skilled in the art better understand the effect that the bandwidth redundancy ratio may be negative in addressing the "see-saw" effect, a response side will be described below as an example of managing 3 content distribution network devices.
The nominal bandwidths of the 3 network distribution network devices are 500M, and the redundant bandwidths are 20M, 50M and-10M (namely overload 10M) respectively. In the case where the bandwidth redundancy ratio cannot be negative, the bandwidth redundancy ratios thereof are respectively: 20/500=4%, 50/500=10% and 0/500=0; in the case where the bandwidth redundancy ratio may be negative, the bandwidth redundancy ratios thereof are respectively: 20/500=4%, 50/500=10% and-10/500= -2%. Obviously, when the response end receives the bandwidth redundancy ratios reported by the 3 content distribution network devices, the weight of the redundancy bandwidth ratio is reduced to-2%, but the weight reduced under the condition that the bandwidth redundancy ratio can be negative is more, so that the method is more suitable for practical situations. In particular, by collecting bandwidth data of different situations of the content distribution network device, a bandwidth variation trend chart of the content distribution network device in the case that the bandwidth redundancy ratio cannot be negative as shown in fig. 2 and a bandwidth variation trend chart of the content distribution network device in the case that the bandwidth redundancy ratio can be negative as shown in fig. 3 can be obtained, and it is not difficult to find that the peak value exceeding the rated bandwidth in fig. 2 is higher, the duration is longer, that is, overload is easier, the overload degree is greater, and the time required for recovering from overload is longer. That is, in the case where the bandwidth redundancy ratio may be negative, the content distribution network device is less likely to be overloaded, and even if overloaded, can be recovered more quickly, effectively avoiding the "see-saw" effect.
In some examples, determining the target content distribution network device from the hit content distribution network devices based on the current weights of the hit content distribution network devices may be achieved by: and detecting whether the current weight of the hit content distribution network device is a preset weight. It will be appreciated that the preset weight is a weight initially given to the content distribution network device, and the content distribution network device has not yet started to provide the service when the preset weight is given, that is, the initial weight represents the service with the best quality that the content distribution network device can provide, so that detecting whether the current weight of the hit content distribution network device is the preset weight is essential to detecting whether the hit content distribution network device can provide the service with the best quality that the device can provide. When the content distribution network equipment with the best quality provided by the content distribution network equipment is present, the content distribution network equipment with the best quality provided by the content distribution network equipment is determined to be the target content distribution network equipment, so that the service with the best quality provided by the equipment for providing the query request is provided, the provided service is guaranteed to have better quality, and the user experience is improved. In the case that the current weight of the hit content distribution network device is not the preset weight, even if each content distribution network device cannot provide the service with the best quality that the device can provide, it is still possible to determine that a relatively good content distribution network is the target content distribution network device to provide the service for the query request by calculating the hash value of the query request and determining the target content distribution network device according to the hash value and the current weight, where the back source interval may be an interval related to the weight, for example, in the case that the preset weight is 1024, the back source interval may be [0, (1024×the number of content distribution network devices—the sum of the weights of all content distribution network devices)/the number of content distribution network devices ].
In particular, determining the target content distribution network device based on the hash value and the current weight may be achieved by: and detecting whether the hash value falls in a preset source returning interval, namely detecting whether the hit content distribution network equipment can be called to respond to the query request. It can be understood that the back source interval is mainly aimed at the hit content distribution network device, although the query request caches the hit, it does not mean that only the content distribution network device with the hit cache in the content distribution network devices managed by the response end can be scheduled, that is, in the case that the hash value falls within the preset back source interval, the missed content distribution network device can still be tried to be called to respond to the query request, so that in the case that the hash value falls within the back source interval, the back source can not be directly determined, but a missed content distribution network device is randomly determined as the target content distribution network device, the back source times are reduced to the greatest extent, and the processing pressure of the upper node is effectively reduced. Under the condition that the hash value does not fall in the source returning interval, as the source returning is not needed, the content distribution network equipment with heavy weight, namely the content distribution network equipment with relatively strong service capability, can be selected as far as possible, and the hit content distribution network equipment with the largest current weight is determined as the target content distribution network equipment in response to the query request.
It is worth mentioning that the hash value is introduced to distinguish the query request which can not call the response of the content distribution network device with the current weight as the initial weight, so that partial response pressure is distributed to the missed content distribution network device, and overload of the hit content distribution network device is avoided.
It should be noted that, if there are multiple hit content distribution network devices, the current weight of the hit content distribution network device is the initial weight, the target content distribution network device may be determined from the initial weight in a random selection manner. The content distribution network device with the largest bandwidth redundancy ratio may be selected as the target content distribution network device, and will not be described in detail herein.
And 104, determining target content distribution network equipment from the content distribution network equipment according to the current bandwidth redundancy ratio and the current weight of each content distribution network equipment.
It can be understood that in the case of a cache hit of the query request, since the content requested by the query request is already cached in the content distribution network device, when these hit content distribution network devices are invoked for response, the invoked content distribution network device does not need to perform a caching operation, and the cache pressure of the content distribution network device is not increased, and thus the hit content distribution network device is not overloaded due to the invocation. However, in the case of a miss in the query request, since each content distribution network device does not cache the content requested by the query request, when the missed content distribution network device is called to respond to the query request, the called content distribution network device needs to cache the content requested by the query request, which may increase the cache pressure of the content distribution network device and may cause overload, so that the bandwidth redundancy ratio of each content distribution network device needs to be considered when determining the target content distribution network device in the case of a miss in the query request, so as to avoid the overload of the content distribution network device to the maximum extent.
In some examples, determining the target content distribution network device from among the content distribution network devices based on the current bandwidth redundancy ratio and the current weight of each content distribution network device may be accomplished by: detecting whether the current bandwidth redundancy ratio of each content distribution network device is lower than a preset first threshold, wherein the first threshold is mainly used for representing a critical bandwidth redundancy ratio value of whether the content distribution network device is easy to overload after the bandwidth redundancy ratio is continuously reduced, and exceeding the critical bandwidth redundancy ratio value, the content distribution network device is easy to overload operation, for example, in order to early warn overload, the first threshold is set to be a value similar to 0, such as 1%; in the case that the current bandwidth redundancy ratio of each content distribution network device is lower than the first threshold, that is, it is assumed that all content distribution network devices are about to be overloaded, at this time, in order to avoid overload, the response is abandoned, so that the target content distribution network device is determined to be an empty set, that is, the responding end does not schedule any content distribution network device to respond to the query request, which means that when the bandwidth redundancy ratio of the content distribution network device is lower than the first threshold, the content distribution network device cannot be scheduled to respond to the query request that is not in cache. And under the condition that the current bandwidth redundancy ratio of at least one content distribution network device is not lower than a first threshold value, determining the content distribution network device with the largest current weight as the target content distribution network device from the content distribution network devices with the current bandwidth redundancy ratio not lower than the first threshold value, namely, calling the content distribution network device with relatively strong service capability to respond to the query request.
It is worth mentioning that by setting the first threshold value related to the bandwidth redundancy ratio, overload caused by calling the content distribution network device with the bandwidth redundancy ratio too low to respond to the query request is avoided.
Step 105, the scheduling target content distribution network device responds to the query request.
In this embodiment, the response of the scheduling target content delivery network device to the query request may be implemented in the following manner: and sending the information of the target content distribution network equipment to the request end, and enabling the request end to access the corresponding content distribution network equipment according to the received information.
It can be understood that the called content distribution network device is a content distribution network device capable of normally providing services, so in order to determine that the called content distribution network device can normally provide services, the response end also needs to acquire the inventory condition of each content distribution network device, so as to avoid calling the content distribution network device incapable of normally providing services.
It is worth mentioning that in case one content distribution network device comprises several low-provisioned cache network devices, the following problems typically occur: the service pressure of one cache network device is overloaded, so that the pressure of the service pressure is transferred to other cache network devices belonging to the same content distribution network device to overload, namely, the overload pressure is spread inside the content distribution network device; the bandwidth of each cache network device inside the content distribution network device is rapidly occupied and spread to other content distribution network devices; even if the bandwidth continues to increase, all content distribution network devices are overloaded, and only one layer of nodes can request content, i.e. a large number of sources are returned, so that another layer of nodes are overloaded. By the scheduling method of the content distribution network equipment, the content distribution network equipment which is not overloaded can be invoked as much as possible, the overload problem is avoided to the greatest extent, a series of problems caused by service pressure diffusion can not occur, meanwhile, the scheduling among the content distribution network equipment can be balanced, when one content distribution network equipment is closer to overload than other content distribution network equipment, the number of times that the content distribution network equipment is scheduled can be reduced, and the content distribution network equipment can not be scheduled again until the other content distribution network equipment is closer to overload, so that the content distribution network equipment is smoothly and slowly close to overload without sudden overload.
When a content distribution network device is invoked, the available bandwidth of the content distribution network device may change, and thus the bandwidth redundancy ratio may also change, and the weight may also change.
Based on this, another aspect of the embodiment of the present invention further provides a scheduling method of a content delivery network device, which is applied to a response end, where the response end is a node capable of receiving a request of a lower node in a CDN, such as a scheduling server capable of receiving an edge server request, an edge server capable of receiving a terminal request, and the like. The flow of the scheduling method of the content delivery network device is shown in fig. 4, and further includes the following steps:
and step 106, reducing the current weight of the target content distribution network equipment according to a preset first adjustment step length under the condition that the bandwidth redundancy ratio of the target content distribution network equipment is detected to be lower than a preset second threshold value.
In this embodiment, the second threshold is mainly used to characterize the critical bandwidth redundancy ratio of the overload of the content distribution network device. In one example, the second threshold is 0.
The size of the first adjustment step is not limited in this embodiment, and the first adjustment step may be a fixed value, for example, in the case where the preset weight is 1024, the weight of the target content distribution network device is reduced by 2 whenever the bandwidth redundancy ratio of the target content distribution network device is lower than the second threshold; the first adjustment compensation may also be based on the dynamic values of the adjustment times and the flexible adjustment intervals, for example, when the bandwidth redundancy ratio of the target content distribution network device is lower than the second threshold value for the second time in a certain time under the condition that the preset weight is 1024, the weight of the target content distribution network device is subjected to the 4-reduction operation and the like. Of course, the foregoing is merely illustrative, and thus will not be described in detail herein.
It is worth mentioning that the weight is adjusted in real time according to the bandwidth redundancy ratio change of the content distribution network device in the process of responding to the query request, so that the content distribution network device responding to the query request can be better selected later, and overload of one or some content distribution network devices caused by untimely adjustment is avoided.
The embodiment of the invention also provides a scheduling method of the content distribution network equipment, which is applied to the response end, wherein the response end is a node which can receive the request of a lower node in the CDN, such as a scheduling server which can receive the request of an edge server, an edge server which can receive the request of a terminal, and the like. The flow of the scheduling method of the content delivery network device is shown in fig. 5, and further includes the following steps:
step 107, in case it is detected that there is a content distribution network device with a bandwidth redundancy ratio higher than a preset third threshold, increasing the current weight of the content distribution network device with a bandwidth redundancy ratio higher than the third threshold according to a preset second adjustment step.
In this embodiment, the third threshold is mainly used to characterize a critical bandwidth redundancy ratio that the content distribution network device can continue to be invoked, above which service resources of the content distribution network device are wasted, and below which the content distribution network device needs to continue to maintain the current weight to minimize the frequency of being scheduled.
The size of the second adjustment step is not limited in this embodiment, and the second adjustment step may be a fixed value, for example, in the case where the third threshold is 600, the adding 4 operation is performed on the weight of the target content distribution network device every time the bandwidth redundancy ratio of the target content distribution network device is higher than 600; the second adjustment compensation may also be based on the number of adjustments and the dynamic value of the flexible variation of the adjustment interval, for example, in the case where the third threshold is 600, when the bandwidth redundancy ratio of the target content distribution network device is higher than the third threshold for the second time within a certain period of time, an add 2 operation is performed on the weight of the target content distribution network device. Of course, the foregoing is merely illustrative, and thus will not be described in detail herein.
It is worth mentioning that on the basis of reducing the weight, the weight can be increased, so that the flexible adjustment of the weight is realized.
In some examples, in the event that a content delivery network device is detected that has a bandwidth redundancy ratio above a preset third threshold, increasing the current weight of the content delivery network device that has a bandwidth redundancy ratio above the third threshold by a preset second adjustment step may be achieved by: if the bandwidth redundancy ratio of the content distribution network device is detected to be lower than a preset fourth threshold value, the current weight of the content distribution network device, of which the bandwidth redundancy ratio is higher than the third threshold value and lower than the fourth threshold value, is increased according to the second adjustment step length under the limiting condition that the preset weight threshold value is not exceeded, wherein the fourth threshold value is mainly used for representing whether the critical bandwidth redundancy ratio of the weight of the content distribution network device should be greatly adjusted; and if the detected bandwidth redundancy ratio is higher than the preset third threshold value and the detected bandwidth redundancy ratio is higher than the fourth threshold value, increasing the current weight of the content distribution network equipment with the bandwidth redundancy ratio higher than the fourth threshold value according to the second adjustment step length under the limiting condition that the initial weight is not exceeded.
It is worth mentioning that the fourth threshold is used as a boundary, the corresponding adjustment maximum amplitude of different bandwidth redundancy ratios is determined, the situation that the excessive adjustment causes the business surge of the content distribution network equipment is avoided, and the gentle transition is realized.
Of course, in this embodiment, the step 107 is mainly described by taking the example that the step 105 is performed after the step 107 is performed, and the adjustment of the weight may be performed after the bandwidth redundancy ratio of each content distribution network device is detected periodically, or may be performed after the bandwidth redundancy ratio of each content distribution network device is detected in real time, and the adjustment is performed after the adjustment triggering condition is reached, that is, in other embodiments, the step 107 may be performed after the step 102, or may be performed simultaneously with the step 103, etc., which will not be described herein again.
To assist those skilled in the art in better understanding the "first threshold", "second threshold", "third threshold" and "fourth threshold" and their effect on weight adjustment referred to in the above embodiments, an initial weight of 1024 will be exemplified below.
When one content distribution network device is started, the weight of the response end is set to 1024, the response end continuously calls the content distribution network device to respond to the query request, at this time, the bandwidth redundancy ratio of the content distribution network device is not lower than 0, namely not lower than a second threshold value, the weight of the content distribution network device is kept to be 1024, when the query request is responded, the bandwidth redundancy ratio of the content distribution network device is lower than 0, namely, the bandwidth redundancy ratio of the content distribution network device is lower than the second threshold value, the weight of the content distribution network device is reduced from 1024, after the weight is reduced for a plurality of times, the weight of the content distribution network device is reduced to 400, namely reduced to be smaller than a third threshold value, at this time, the weight of the content distribution network device is increased from 400, but the increased weight of the content distribution network device is not more than 512. When the weight of the content distribution network device is reduced to 200 at a time, that is, to less than the fourth threshold value, the weight of the content distribution network device by the responding end increases from 200, but the increased weight does not exceed 1024.
In order to facilitate a person skilled in the art to more intuitively understand the equalization effect of the scheduling method of the content distribution network device provided in the embodiment of the present application, a bandwidth data change diagram of the content distribution device after the scheduling method of the content distribution network device provided in the embodiment of the present application is used as an example will be described below, where each content distribution network device includes a plurality of low-profile cache network devices.
As shown in fig. 6, the overall bandwidth of the content distribution network device is controlled to be around the rated bandwidth of 1.95G without an overload condition. Likewise, as shown in fig. 7, the bandwidth of a single low-provisioned cache network device is also controlled to be around the nominal bandwidth 108K, where the portion of the curve that is farther from the nominal bandwidth is small because it is in the low-peak traffic phase.
The above steps of the methods are divided, for clarity of description, and may be combined into one step or split into multiple steps when implemented, so long as they include the same logic relationship, and they are all within the protection scope of this patent; it is within the scope of this patent to add insignificant modifications to the algorithm or flow or introduce insignificant designs, but not to alter the core design of its algorithm and flow.
Another aspect of the embodiments of the present invention further provides a scheduling apparatus of a content distribution network device, as shown in fig. 8, including:
a receiving module 801, configured to receive a query request sent by a requesting end.
A detection module 802, configured to detect whether the query request has a cache hit.
A first determining module 803, configured to determine, in a case where a query request cache hit is detected, a target content distribution network device from among the hit content distribution network devices according to the current weight of the hit content distribution network device; the current weight is obtained by adjusting the initial weight according to the bandwidth redundancy ratio change of the content distribution network equipment.
A second determining module 804, configured to determine, when a query request miss is detected, a target content distribution network device from the content distribution network devices according to the current bandwidth redundancy ratio and the current weight of each content distribution network device.
A scheduling module 805, configured to schedule the target content distribution network device to respond to the query request.
It is to be noted that this embodiment is an apparatus embodiment corresponding to the method embodiment, and this embodiment may be implemented in cooperation with the method embodiment. The related technical details mentioned in the method embodiment are still valid in this embodiment, and in order to reduce repetition, they are not described here again. Accordingly, the related technical details mentioned in the present embodiment may also be applied in the method embodiment.
It should be noted that, each module involved in this embodiment is a logic module, and in practical application, one logic unit may be one physical unit, or may be a part of one physical unit, or may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, units less closely related to solving the technical problem presented by the present invention are not introduced in the present embodiment, but it does not indicate that other units are not present in the present embodiment.
Another aspect of the embodiment of the present invention further provides an electronic device, as shown in fig. 9, including: at least one processor 901; and a memory 902 communicatively coupled to the at least one processor 901; the memory 902 stores instructions executable by the at least one processor 901, where the instructions are executable by the at least one processor 901 to enable the at least one processor 901 to perform the scheduling method of the content distribution network device described in any one of the method embodiments.
Where the memory 902 and the processor 901 are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting the various circuits of the one or more processors 901 and the memory 902 together. The bus may also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or may be a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 901 is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor 901.
The processor 901 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 902 may be used to store data used by processor 901 in performing operations.
Another aspect of the embodiments of the present invention also provides a computer-readable storage medium storing a computer program. The computer program, when executed by a processor, implements the scheduling method of the content distribution network device described in any of the method embodiments above.
That is, it will be understood by those skilled in the art that all or part of the steps in implementing the methods of the embodiments described above may be implemented by a program stored in a storage medium, where the program includes several instructions for causing a device (which may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps in the methods of the embodiments of the invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples of carrying out the invention and that various changes in form and details may be made therein without departing from the spirit and scope of the invention.

Claims (11)

1. A method for scheduling a content delivery network device, applied to a response end, comprising:
receiving a query request sent by a request end;
detecting whether the query request is a cache hit;
in the case that the query request cache hit is detected, determining a target content distribution network device from the hit content distribution network devices according to the current weight of the hit content distribution network device; the current weight is obtained by adjusting the initial weight according to the bandwidth redundancy ratio change of the content distribution network equipment;
under the condition that the query request miss is detected, determining the target content distribution network equipment from the content distribution network equipment according to the current bandwidth redundancy ratio and the current weight of each content distribution network equipment;
scheduling the target content distribution network device to respond to the query request;
wherein the determining a target content distribution network device from the hit content distribution network devices according to the current weight of the hit content distribution network device comprises:
Detecting whether the current weight of the hit content distribution network device is a preset weight;
determining the hit content distribution network device, for which the current weight is the preset weight, as the target content distribution network device, in the case where there is at least one of the hit content distribution network devices for which the current weight is the preset weight;
and under the condition that the current weight of the hit content distribution network equipment is not the preset weight, calculating a hash value of the query request and determining the target content distribution network equipment according to the hash value and the current weight.
2. The scheduling method of a content distribution network device according to claim 1, wherein the determining the target content distribution network device according to the hash value and the current weight comprises:
detecting whether the hash value falls in a preset source returning interval or not;
randomly determining that a missed content distribution network device is the target content distribution network device under the condition that the hash value falls in the source returning interval;
and if the hash value does not fall in the source returning interval, determining the hit content distribution network device with the largest current weight as the target content distribution network device.
3. The scheduling method of content distribution network devices according to claim 1, wherein the determining the target content distribution network device from among the content distribution network devices according to the current bandwidth redundancy ratio and the current weight of each content distribution network device comprises:
detecting whether the current bandwidth redundancy ratio of each content distribution network device is lower than a preset first threshold value;
under the condition that the current bandwidth redundancy ratio of each content distribution network device is lower than the first threshold value, determining the target content distribution network device as an empty set;
and under the condition that the current bandwidth redundancy ratio of at least one content distribution network device is not lower than the first threshold value, determining the content distribution network device with the largest current weight as the target content distribution network device from the content distribution network devices with the current bandwidth redundancy ratio not lower than the first threshold value.
4. A method of scheduling a content distribution network device according to any one of claims 1 to 3, wherein after the scheduling the target content distribution network device to respond to the query request, the method further comprises:
and under the condition that the bandwidth redundancy ratio of the target content distribution network equipment is detected to be lower than a preset second threshold value, reducing the current weight of the target content distribution network equipment according to a preset first adjustment step length.
5. A scheduling method of a content distribution network device according to any one of claims 1 to 3, characterized in that the method further comprises:
and in case that the content distribution network device with the bandwidth redundancy ratio higher than the preset third threshold value is detected, increasing the current weight of the content distribution network device with the bandwidth redundancy ratio higher than the third threshold value according to the preset second adjustment step length.
6. The scheduling method of a content distribution network device according to claim 5, wherein, in the case where it is detected that there is a content distribution network device having a bandwidth redundancy ratio higher than a preset third threshold, increasing the current weight of a content distribution network device having a bandwidth redundancy ratio higher than the third threshold by a preset second adjustment step size, comprises:
if the bandwidth redundancy ratio of the content distribution network equipment with the bandwidth redundancy ratio higher than the preset third threshold value is detected to be lower than the preset fourth threshold value, the current weight of the content distribution network equipment with the bandwidth redundancy ratio higher than the third threshold value and lower than the fourth threshold value is increased according to the second adjustment step length by taking the preset weight threshold value not to be exceeded as a limiting condition;
And if the detected bandwidth redundancy ratio is higher than the preset third threshold value, increasing the current weight of the content distribution network equipment with the bandwidth redundancy ratio higher than the fourth threshold value according to the second adjustment step length under the limiting condition that the initial weight is not exceeded.
7. A scheduling method of a content distribution network device according to any one of claims 1 to 3, wherein the bandwidth redundancy ratio of the content distribution network device can be determined according to the following expression:
R=(B-B')/B
wherein R is the bandwidth redundancy ratio of the content distribution network equipment, B' is the used bandwidth of the content distribution network equipment, and B is the rated bandwidth of the content distribution network equipment.
8. A method of scheduling a content distribution network device according to any one of claims 1 to 3, wherein said scheduling the target content distribution network device to respond to the query request comprises:
and sending the information of the target content distribution network equipment to the request end, and enabling the request end to access the corresponding content distribution network equipment according to the received information.
9. A scheduling apparatus of a content distribution network device, comprising:
The receiving module is used for receiving the query request sent by the request end;
the detection module is used for detecting whether the query request is in cache hit or not;
a first determining module, configured to determine, when the query request cache hit is detected, a target content distribution network device from the hit content distribution network devices according to a current weight of the hit content distribution network device; the current weight is obtained by adjusting the initial weight according to the bandwidth redundancy ratio change of the content distribution network equipment;
the second determining module is used for determining the target content distribution network equipment from the content distribution network equipment according to the current bandwidth redundancy ratio and the current weight of each content distribution network equipment under the condition that the query request is detected to miss;
the scheduling module is used for scheduling the target content distribution network equipment to respond to the query request;
the first determining module is further configured to detect whether the current weight of the hit content distribution network device is the preset weight; determining the hit content distribution network device, for which the current weight is a preset weight, as the target content distribution network device, in the case where there is at least one of the hit content distribution network devices for which the current weight is the preset weight; and under the condition that the current weight of the hit content distribution network equipment is not the preset weight, calculating a hash value of the query request and determining the target content distribution network equipment according to the hash value and the current weight.
10. An electronic device, comprising:
at least one processor; the method comprises the steps of,
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 scheduling a content distribution network device according to any one of claims 1 to 8.
11. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the scheduling method of a content distribution network device according to any one of claims 1 to 8.
CN202111627298.5A 2021-12-28 2021-12-28 Scheduling method, device, equipment and storage medium of content distribution network equipment Active CN114500663B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111627298.5A CN114500663B (en) 2021-12-28 2021-12-28 Scheduling method, device, equipment and storage medium of content distribution network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111627298.5A CN114500663B (en) 2021-12-28 2021-12-28 Scheduling method, device, equipment and storage medium of content distribution network equipment

Publications (2)

Publication Number Publication Date
CN114500663A CN114500663A (en) 2022-05-13
CN114500663B true CN114500663B (en) 2024-04-12

Family

ID=81496145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111627298.5A Active CN114500663B (en) 2021-12-28 2021-12-28 Scheduling method, device, equipment and storage medium of content distribution network equipment

Country Status (1)

Country Link
CN (1) CN114500663B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222560A (en) * 2017-06-29 2017-09-29 珠海市魅族科技有限公司 A kind of multinode Hui Yuan method, device and storage medium
CN107786371A (en) * 2017-10-09 2018-03-09 咪咕视讯科技有限公司 A kind of accelerated method of data, device and storage medium
CN110098978A (en) * 2019-04-12 2019-08-06 网宿科技股份有限公司 A kind of test method, device and the network equipment of DNS scheduling
CN112165691A (en) * 2020-09-24 2021-01-01 百度在线网络技术(北京)有限公司 Content delivery network scheduling method, device, server and medium
CN112165436A (en) * 2020-10-15 2021-01-01 腾讯科技(深圳)有限公司 Flow control method, device and system
CN113038191A (en) * 2021-02-26 2021-06-25 北京百度网讯科技有限公司 Live stream scheduling method and device, electronic equipment and readable storage medium
CN113315836A (en) * 2021-05-27 2021-08-27 北京达佳互联信息技术有限公司 File access request scheduling method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9438487B2 (en) * 2012-02-23 2016-09-06 Ericsson Ab Bandwith policy management in a self-corrected content delivery network
US11159642B2 (en) * 2019-07-19 2021-10-26 Cloudflare, Inc. Site and page specific resource prioritization

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222560A (en) * 2017-06-29 2017-09-29 珠海市魅族科技有限公司 A kind of multinode Hui Yuan method, device and storage medium
CN107786371A (en) * 2017-10-09 2018-03-09 咪咕视讯科技有限公司 A kind of accelerated method of data, device and storage medium
CN110098978A (en) * 2019-04-12 2019-08-06 网宿科技股份有限公司 A kind of test method, device and the network equipment of DNS scheduling
CN112165691A (en) * 2020-09-24 2021-01-01 百度在线网络技术(北京)有限公司 Content delivery network scheduling method, device, server and medium
CN112165436A (en) * 2020-10-15 2021-01-01 腾讯科技(深圳)有限公司 Flow control method, device and system
CN113038191A (en) * 2021-02-26 2021-06-25 北京百度网讯科技有限公司 Live stream scheduling method and device, electronic equipment and readable storage medium
CN113315836A (en) * 2021-05-27 2021-08-27 北京达佳互联信息技术有限公司 File access request scheduling method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于复杂网络的绿色CDN社团结构划分;李昕冉;周金和;;计算机工程;20180315(03);全文 *
数据中心网络流量调度的研究进展与趋势;李文信;齐恒;徐仁海;周晓波;李克秋;;计算机学报;20200415(04);全文 *

Also Published As

Publication number Publication date
CN114500663A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN109308221B (en) Nginx dynamic load balancing method based on WebSocket long connection
US10404790B2 (en) HTTP scheduling system and method of content delivery network
US20190182351A1 (en) Route selection method and system, network acceleration node, and network acceleration system
CN110858843B (en) Service request processing method and device and computer readable storage medium
CN102137139A (en) Method and device for selecting cache replacement strategy, proxy server and system
EP3547625B1 (en) Method and system for sending request for acquiring data resource
CN112788085B (en) Data caching method and device
US7873733B2 (en) Load distribution method, load distribution device, and system including load distribution device
JP2011525312A (en) Method and apparatus for prefetching data in a mobile network environment using edge data storage
JP2013525931A (en) Dynamic binding used for content delivery
CN110830565A (en) Resource downloading method, device, system, electronic equipment and storage medium
CN112104752B (en) Hot spot balancing method and system for cache nodes of content distribution network
CN101980505A (en) 3Tnet-based video-on-demand load balancing method
CN107819632A (en) A kind of dynamic load leveling group system based on performance monitoring system and Docker Swarm
CN107547643B (en) Load sharing method and device
CN112491951B (en) Request processing method, server and storage medium in peer-to-peer network
CN112751912B (en) Configuration adjustment method and device and electronic equipment
CN117376133A (en) Flow fusion cloud acceleration method and platform based on machine learning
CN114500663B (en) Scheduling method, device, equipment and storage medium of content distribution network equipment
CN113676514A (en) File source returning method and device
CN115051978B (en) Equipment monitoring implementation method and system
CN115277851B (en) Service request processing method and system
CN113810461B (en) Bandwidth control method, device and equipment and readable storage medium
CN110636104B (en) Resource request method, electronic device and storage medium
CN112953984B (en) Data processing method, device, medium and system

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