CN114500663A - Scheduling method, device, equipment and storage medium for content distribution network equipment - Google Patents

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

Info

Publication number
CN114500663A
CN114500663A CN202111627298.5A CN202111627298A CN114500663A CN 114500663 A CN114500663 A CN 114500663A CN 202111627298 A CN202111627298 A CN 202111627298A CN 114500663 A CN114500663 A CN 114500663A
Authority
CN
China
Prior art keywords
distribution network
content distribution
network device
network equipment
redundancy ratio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111627298.5A
Other languages
Chinese (zh)
Other versions
CN114500663B (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

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • 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

Abstract

The embodiment of the invention relates to the technical field of content distribution networks, and discloses a method, a device, equipment and a storage medium for scheduling content distribution network equipment. The method is applied to a response end and comprises the following steps: receiving a query request sent by a request end; detecting whether the query request is in cache hit; under the condition that the cache of the query request is hit, determining target content distribution network equipment from the hit content distribution network equipment according to the current weight of the hit content distribution network equipment; 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 is not cached and hit, 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, flow imbalance 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, scheduling equipment and a storage medium of content distribution network equipment.
Background
Each level of nodes in a Content Delivery Network (CDN) serve as request terminals to initiate a request to a closest upper level node, and after receiving the request, the upper level node serves as a response terminal to randomly schedule a Content Delivery Network device from among a plurality of Content Delivery Network devices managed by the upper level node to respond to the request.
However, randomly scheduling the content distribution network devices to respond to the requests easily causes traffic imbalance among the content distribution network devices, and the service capabilities of the content distribution network devices may be different, which may further aggravate the imbalance, and while the service quality is affected, waste of resources is also easily caused.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for scheduling content distribution network devices, so that when scheduling a response request of a content distribution network device, service capabilities of each content distribution network device can be considered, balanced scheduling is implemented, traffic imbalance is avoided, and resource waste is reduced.
To achieve the above object, an embodiment of the present invention provides a scheduling method for a content distribution network device, which is applied to a response end, and includes: receiving a query request sent by a request end; detecting whether the query request is in cache hit; under the condition that the cache hit of the query request is detected, determining target content distribution network equipment from the hit content distribution network equipment according to the current weight of the hit content distribution network equipment; 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 is not cached and hit, 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.
In order 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 terminal; the detection module is used for detecting whether the query request is in cache hit or not; the first determining module is used for determining target content distribution network equipment from the hit content distribution network equipment according to the current weight of the hit content distribution network equipment under the condition that the cache hit of the query request is detected; 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, configured to determine, when it is detected that the query request is not cached and hit, the 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; 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 scheduling method of the content distribution network device as described above.
To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the scheduling method of the 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 based on the bandwidth redundancy ratio change of the content distribution network equipment for each content distribution network equipment. In this way, after receiving the query request, whether the query request is detected to be cache hit, the target content distribution network device is determined from the hit content distribution network devices according to the current weight of the hit content distribution network device; or under the condition that the query request is not cached and hit, 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 using more traffic bandwidth, namely the content distribution network equipment with low bandwidth redundancy ratio, is scheduled less in the subsequent process, the traffic bandwidth is not increased any more, the bandwidth redundancy ratio is not reduced any more, and the content distribution network equipment using less traffic bandwidth, namely the content distribution network equipment with high bandwidth redundancy ratio, is scheduled more in the subsequent process, the traffic bandwidth is increased, the bandwidth redundancy ratio is continuously reduced, and finally the bandwidth redundancy ratio of each content distribution network equipment approaches as close as possible, so that traffic balance is realized, and the problem of resource waste caused by traffic imbalance is avoided. Moreover, under the condition that the request cache is hit, the content distribution network equipment which is hit by the cache 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 cost of returning sources can be reduced. Furthermore, under the condition of cache hit request, the weight and the bandwidth redundancy ratio are considered when the target content distribution network equipment is determined, so that the problem that the content distribution network equipment with the bandwidth redundancy ratio which is too small is selected to serve in an overload state is solved.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
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 bandwidth variation graph of a content distribution network device in the case that a bandwidth redundancy ratio cannot be a negative value after applying the scheduling method of the content distribution network device provided in the embodiment of the present invention;
fig. 3 is a bandwidth variation graph of a content distribution network device in a case where a bandwidth redundancy ratio may be a negative value after applying the scheduling method of the content distribution network device provided in the embodiment of the present invention;
FIG. 4 is a flow chart of a scheduling method for 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 flow chart of a scheduling method for a content distribution network device including the step of increasing the current weight provided in another embodiment of the present invention;
fig. 6 is a graph showing a bandwidth change of a content distribution network device to which the scheduling method of the content distribution network device provided in the embodiment of the present invention is applied;
fig. 7 is a bandwidth variation graph of a low-allocation 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 diagram 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 provided in another embodiment of the present invention.
Detailed Description
As known from the background art, the problem of traffic imbalance exists when a response end randomly schedules a content distribution network device to respond to a request, which is easy to affect the quality of service and cause resource waste.
In order to solve the above problem, an embodiment of the present invention provides a scheduling method for a content delivery network device, which is applied to a response end, and includes: receiving a query request sent by a request end; detecting whether the query request is in cache hit; under the condition that the cache hit of the query request is detected, determining target content distribution network equipment from the hit content distribution network equipment according to the current weight of the hit content distribution network equipment; 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 is not cached and hit, 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.
The scheduling method of the content distribution network device provided in the embodiment of the present invention replaces the original random scheduling manner with scheduling according to the weight, where the weight is obtained by adjusting based on the change of the bandwidth redundancy ratio of the content distribution network device, that is, a weight capable of reflecting the change of the bandwidth redundancy ratio is introduced in the scheduling process, so that scheduling according to the weight can implement scheduling of a response request of the content distribution network device according to the change of the bandwidth redundancy ratio of the content distribution network device, implement balance in the dimension of the change of the bandwidth redundancy ratio of each content distribution network device in the scheduling process, avoid that the bandwidth redundancy ratio of a part of content distribution network is too small to affect the quality of the service provided by the content distribution network device, and also avoid that the bandwidth redundancy ratio of the part of content distribution network is too large to cause waste due to insufficient utilization of bandwidth resources. And in the case 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, so that 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.
To make 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 appreciated by those of ordinary skill in the art that in various embodiments of the invention, numerous technical details are set forth in order to provide a better understanding of the present invention. However, the claimed invention may be practiced without these specific details or with various changes and modifications based on the following embodiments.
The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
An aspect of the embodiments of the present invention provides a scheduling method for a content delivery network device, which is applied to a response end, where the response end is a node in a CDN capable of receiving a request of a lower node, 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. The flow of the scheduling method of the content distribution network device is shown in fig. 1, and 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, and may be an edge server, or may be a terminal, and particularly, the request end and the response end may both be edge servers, the request end is a lower edge server, and the response end is a higher edge server; the query request may carry information such as an Internet Protocol (IP) address, a Uniform Resource Locator (URL) of the requesting end, and so on, which is not described herein any more.
Step 102, detecting whether the query request is cache hit, if yes, executing step 103, and if not, executing step 104.
In this embodiment, a cache hit of the query request indicates that the content requested by the query request is cached in a plurality of content distribution network devices managed by the response end. It is understood that other users may have sent a request with the same requested content as the current query request to the response end before receiving the current query request, and the response end has cached the content requested by the current query request on some content distribution network device or devices managed by the response end before receiving the current query request, that is, the current query request has a cache hit.
In some examples, each content distribution network device managed by the response end reports cache content of the content distribution network device to the response end, so that the response end detects whether the query request is a cache hit by matching the content requested by the query request, judges that the query request is a cache hit when matching is successful, and judges that the query request is a cache hit when matching is unsuccessful. In particular, in the matching process, the cache contents of each content distribution network device are matched, that is, all content distribution network devices that can be successfully matched are found, rather than stopping matching after matching is successfully performed in the cache contents of a certain content distribution network device.
In other examples, the response end may issue information capable of indicating the content requested by the query request to each content distribution network device managed by the response end, each content distribution network receives the information and then performs matching in its own cache, and returns a matching success response to the response end if matching is successful, and the response end determines that the query request cache is hit if receiving a matching success response of at least one content distribution network device, and determines that the query request is not cache hit if not receiving a matching success response.
Of course, the above is only an example of how to detect whether the query request is a cache hit, and in other examples, the detection may be performed in other manners, which is not described herein again.
It should be noted that, the query request may also specify an operator, that is, an operator to which the content distribution network device responding to the query request belongs, where the detection process of the response end actually includes: and determining the content distribution network equipment which can be called according to the operator carried by the query request, and then detecting that the query request is cached and hit in the content distribution network equipment which can be called.
Step 103, according to the current weight of the hit content distribution network device, determining the target content distribution network device from the hit content distribution network device.
In this embodiment, the current weight is obtained by adjusting the initial weight according to a change in a bandwidth redundancy ratio of the content distribution network device, where the preset weight is an initial weight given to the content distribution network device by the response terminal after the content distribution network device has service capability, and after the content distribution network device is scheduled to provide service, the response terminal adjusts the weight according to a change in the bandwidth redundancy ratio caused by the scheduled content distribution network device.
In particular, in the present embodiment, the weight of the content distribution network device is in a positive correlation with the variation value of the bandwidth redundancy ratio.
It should be noted that, this embodiment does not limit the type of the content distribution network device, and may be a high-allocation cache network device, or may be a device cluster formed by combining a plurality of low-allocation cache network devices, where the high-allocation and the low-allocation are in terms of performance such as bandwidth of the device. It is worth mentioning that, when the content distribution network device is a device cluster formed by combining a plurality of low-allocation cache network devices, the full utilization of the low-allocation cache network devices is realized, the utilization rate of the device is improved, and the cost can be reduced.
In some examples, the bandwidth redundancy ratio of the content distribution network device is determined by the expression R ═ 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 rated bandwidth of the content distribution network device. It can be understood 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, and therefore, each content distribution network device also needs to report its own real-time used bandwidth data to the response end, and the rated bandwidth may be uploaded together with the real-time used bandwidth data each time or uploaded once when the content distribution network device is enabled and then not uploaded any more.
It is worth mentioning that, compared to the limitation that the used bandwidth of the content distribution network device is not greater than the rated bandwidth of the content distribution network device when the bandwidth redundancy ratio of the content distribution network device is generally increased, that is, the redundancy bandwidth ratio is defined based on the used bandwidth of the content distribution network device falling within the interval [0, the rated bandwidth of the content distribution network device ], the present embodiment does not define the size relationship between 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 the adverse effects of the "seesaw" effect caused by the centrality of requesting access and the decentrality of request deduction on the stability of the content distribution network device and the quality of providing service.
To help those skilled in the art better understand the effect of the above bandwidth redundancy ratio that can be negative in solving the "seesaw" effect, the following description will take the response side managing 3 content distribution network devices as an example.
The rated bandwidth of each of the 3 network distribution network devices is 500M, and the redundant bandwidth is 20M, 50M and-10M (i.e. 10M overloaded). When the bandwidth redundancy ratio cannot be a negative value, the bandwidth redundancy ratio is respectively as follows: 20/500 ═ 4%, 50/500 ═ 10% and 0/500 ═ 0; in the case that the bandwidth redundancy ratio can be a negative value, the bandwidth redundancy ratio is respectively: 20/500-4%, 50/500-10% and-10/500-2%. Obviously, when the response end receives the bandwidth redundancy ratio reported by the 3 content distribution network devices, the weight of the redundant bandwidth ratio is reduced by-2%, but the weight reduced in the case that the bandwidth redundancy ratio can be a negative value is more, which is more suitable for practical situations. In particular, by collecting bandwidth data of the content distribution network device under different conditions, a bandwidth variation trend graph of the content distribution network device under the condition that the bandwidth redundancy ratio cannot be a negative value as shown in fig. 2 and a bandwidth variation trend graph of the content distribution network device under the condition that the bandwidth redundancy ratio can be a negative value as shown in fig. 3 can be obtained, and it is easy to find that the peak value exceeding the rated bandwidth in fig. 2 is higher and has a longer duration, i.e., is easier to overload, has a higher overload degree, and has a longer time required for recovering from overload. That is, under the condition that the bandwidth redundancy ratio can be a negative value, the content distribution network equipment is less prone to overload, and can recover faster even if the content distribution network equipment is overloaded, so that the seesaw effect is effectively avoided.
In some examples, determining the target content distribution network device from the hit content distribution network devices according to the current weight of the hit content distribution network device may be implemented as follows: and detecting whether the current weight of the hit content distribution network equipment is a preset weight. It is understood that the preset weight is a weight initially given to the content distribution network device, the content distribution network device does not start providing the service when the preset weight is given, and the service capability is optimal, that is, the initial weight represents the service with the best quality that can be provided by the content distribution network device, and therefore, detecting whether the current weight of the hit content distribution network device is the preset weight is essentially to detect whether the hit content distribution network device can provide the service with the best quality that can be provided by the device. Therefore, under the condition that the current weight of at least one hit content distribution network device is the preset weight, the hit content distribution network device with the current weight as the preset weight is determined as the target content distribution network device, namely when the content distribution network device of the service with the best quality can be provided by the content distribution network device exists, the content distribution network device is determined as the target content distribution network device, so that the service with the best quality can be provided by the device for inquiring the request, the service with the better quality is ensured to be provided, and the user experience is improved. And 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, determining a relatively good content distribution network to serve 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, wherein the back-to-source interval may be an interval related to the weight, for example, in the case that the preset weight is 1024, the back-to-source interval may be [0, (1024 x 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 according to the hash value and the current weight may be implemented as follows: and detecting whether the hash value falls within a preset back-to-source interval, namely detecting whether the hit content distribution network equipment can be called to respond to the query request. It can be understood that this fallback interval mainly aims at the hit content distribution network device, and although the query request is cache hit, it does not mean that only the content distribution network device that is cache hit in the content distribution network devices managed by the responding end can be scheduled, that is, in a case that the hash value falls within the preset fallback interval, it can still try to invoke the content distribution network device that is not cache hit to respond to the query request, and therefore, in a case that the hash value falls within the fallback interval, it may not directly source back, but randomly determine one content distribution network device that is not hit as the target content distribution network device, thereby reducing the number of times of source back to the greatest extent, and effectively reducing the processing pressure of the upper node. Under the condition that the hash value does not fall in the back-to-source interval, because the back-to-source is not needed, the content distribution network equipment with large weight, namely the content distribution network equipment with relatively strong service capability, can be selected as much as possible, and the query request is responded, namely the hit content distribution network equipment with the maximum current weight is determined as the target content distribution network equipment.
It is worth mentioning that the hash value is introduced to distinguish the query request which cannot call the content distribution network device response with the current weight as the initial weight, so that partial response pressure is shunted to the content distribution network device which is not hit, and overload of the content distribution network device which is hit is avoided.
It should be noted that if the current weight of a plurality of hit content distribution network devices is the initial weight, the target content distribution network device may be determined from the current weight in a random selection manner. And a content distribution network device with the largest bandwidth redundancy ratio can be selected as a target content distribution network device, and the like, which are not 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 cache hit of the query request, since the content requested by the query request is cached in the content distribution network device, when the hit content distribution network device is called to respond, the called content distribution network device does not need to perform caching operation, the cache pressure of the content distribution network device is not increased, and further the hit content distribution network device is not overloaded due to being called. However, when the query request is not cache-hit, because 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 increases the cache pressure of the content distribution network device and may cause overload, and therefore, when the target content distribution network device is determined under the condition that the query request is not cache-hit, the bandwidth redundancy ratio of each content distribution network device needs to be considered, so that the content distribution network device is prevented from being overloaded to the greatest extent.
In some examples, determining the 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 may be implemented as follows: 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 the first threshold is set to a value close to 0, such as 1% and the like, when the critical bandwidth redundancy ratio value is exceeded, the content distribution network device is easy to overload, for example, in order to warn overload; in the case that the current bandwidth redundancy ratio of each content distribution network device is lower than the first threshold, that is, all the content distribution network devices are considered to be overloaded, at this time, in order to avoid the overload, the response is abandoned, so the target content distribution network device is determined to be an empty set, that is, the response end does not schedule any content distribution network device to respond to the query request, and the actual meaning is 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 without cache hit. 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, determining the content distribution network device with the maximum current weight as a target content distribution network device from the content distribution network devices with the current bandwidth redundancy ratio not lower than the first threshold, 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 related to the bandwidth redundancy ratio, overload caused by calling a content distribution network device with a bandwidth redundancy ratio that is too low to respond to a query request is avoided.
Step 105, the target content distribution network device is scheduled to respond to the query request.
In this embodiment, the scheduling target content delivery network device may respond to the query request in the following manner: and sending the information of the target content distribution network equipment to the request end, so that the request end can access the corresponding content distribution network equipment according to the received information.
It can be understood that the invoked content distribution network device is a content distribution network device capable of normally providing a service, and therefore, in order to determine that the invoked content distribution network device can normally provide a service, the responding end needs to acquire an inventory condition of each content distribution network device, so as to avoid invoking a content distribution network device that cannot normally provide a service.
It is worth mentioning that in case of a content distribution network device comprising several low-provisioned caching network devices, the following problems typically occur: the service pressure of one cache network device is overloaded, so that the pressure of the cache network device is transferred to other cache network devices which belong to the same content distribution network device to be overloaded, namely, the overload pressure is diffused in the content distribution network device; the bandwidth of each cache network device in the content distribution network device is rapidly occupied and is diffused to other content distribution network devices; even if the bandwidth continues to increase, all the content distribution network devices are overloaded, and only the content can be requested from the previous layer of nodes, i.e. a large amount of back sources, so that the nodes in the next previous layer are also overloaded. The scheduling method of the content distribution network equipment provided by the embodiment can call the content distribution network equipment which is not overloaded as much as possible, avoids the overload problem to the maximum extent, further avoids a series of problems caused by service pressure diffusion, and can perform balanced scheduling among the content distribution network equipment.
When a content distribution network device is invoked, the bandwidth used by 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 embodiments of the present invention further provides a scheduling method for a content delivery network device, which is applied to a response end, where the response end is a node in the CDN that can receive a request of a lower node, such as a scheduling server that can receive a request of an edge server, an edge server that can receive a request of a terminal, and the like. The flow of the scheduling method of the content distribution network device is shown in fig. 4, and further includes the following steps:
and 106, 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, reducing the current weight of the target content distribution network equipment according to a preset first adjustment step length.
In this embodiment, the second threshold is mainly used to characterize the critical bandwidth redundancy ratio of the content distribution network device being overloaded. 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 that the preset weight is 1024, whenever the bandwidth redundancy ratio of the target content distribution network device is lower than the second threshold, a 2 subtraction operation is performed on the weight of the target content distribution network device; the first adjustment compensation may also be a dynamic value that flexibly changes according to the number of adjustments and the adjustment interval, for example, in a case where the preset weight is 1024, when the bandwidth redundancy ratio of the target content distribution network device is lower than the second threshold for a second time within a certain time, a subtraction operation of 4 is performed on the weight of the target content distribution network device, and the like. Of course, the above description is only a specific example, and is not repeated here.
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 as to better select the content distribution network device responding to the query request in the following, and avoid overload of some or some content distribution network devices caused by untimely adjustment.
In another aspect, an embodiment of the present invention further provides a scheduling method for a content delivery network device, which is applied to a response end, where the response end is a node in the CDN capable of receiving a request of a lower node, 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. The flow of the scheduling method of the content distribution network device is shown in fig. 5, and further includes the following steps:
and step 107, under the condition that the content distribution network equipment with the bandwidth redundancy ratio higher than the preset third threshold is detected to exist, increasing the current weight of the content distribution network equipment with the bandwidth redundancy ratio higher than the third threshold according to a preset second adjustment step size.
In this embodiment, the third threshold is mainly used to represent a critical bandwidth redundancy ratio at which the content distribution network device can be continuously invoked, where above the critical bandwidth redundancy ratio, the service resources of the content distribution network device are wasted, and below the critical bandwidth redundancy ratio, the content distribution network device needs to continuously maintain the current weight, so as to reduce the scheduled frequency as much as possible.
The present embodiment does not limit the size of the second adjustment step, which may be a fixed value, such as in the case where the third threshold is 600, performing an add-4 operation on the weight of the target content distribution network device whenever the bandwidth redundancy ratio of the target content distribution network device is higher than 600; the second adjustment compensation may also be a dynamic value that flexibly changes according to the number of adjustments and 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 a second time within a certain time, an add-2 operation is performed on the weight of the target content distribution network device, and the like. Of course, the above description is only a specific example, and is not repeated here.
It is worth mentioning that on the basis of reducing the weight, the weight can be increased, and the flexible adjustment of the weight is realized.
In some examples, in the case that a content distribution network device with a bandwidth redundancy ratio higher than a preset third threshold is detected to exist, increasing the current weight of the content distribution network device with the bandwidth redundancy ratio higher than the third threshold according to a preset second adjustment step size may be implemented by: under the condition that the bandwidth redundancy ratio of the content distribution network equipment with the bandwidth redundancy ratio higher than a preset third threshold is detected to be lower than a preset fourth threshold, the current weight of the content distribution network equipment with the bandwidth redundancy ratio higher than the third threshold and lower than the fourth threshold is increased according to a second adjustment step length by taking the preset weight threshold as a limiting condition, wherein the fourth threshold is mainly used for representing whether the critical bandwidth redundancy ratio of the weight of the content distribution network equipment should be adjusted greatly; and under the condition that the bandwidth redundancy ratio of the content distribution network equipment with the bandwidth redundancy ratio higher than the preset third threshold is detected to be higher than a fourth threshold, the current weight of the content distribution network equipment with the bandwidth redundancy ratio higher than the fourth threshold is increased according to a second adjustment step length by taking the initial weight as a limiting condition.
It is worth mentioning that the maximum adjustment amplitude corresponding to different bandwidth redundancy ratios is determined by taking the fourth threshold as a boundary, so that the situation that the service of the content distribution network equipment is suddenly increased due to over-adjustment is avoided, and the smooth transition is realized.
Of course, this embodiment is mainly described by taking the step 107 executed after the step 105 as an example, the adjustment of the weight may be actually executed after the bandwidth redundancy ratio of each content distribution network device is detected periodically, or the bandwidth redundancy ratio of each content distribution network device is detected in real time, and is executed after the trigger condition of the adjustment is reached, that is, in other embodiments, the step 107 may be executed after the step 102, or may be executed simultaneously with the step 103, and the like, which are not described in detail herein.
To help those skilled in the art to better understand the "first threshold", "second threshold", "third threshold", and "fourth threshold" and their influence on the weight adjustment referred to in the above embodiments, the following description will be made with an initial weight of 1024 as an example.
When a content distribution network device is enabled, a response end sets the weight of the content distribution network device to be 1024, the response end continuously calls the content distribution network device to respond to an inquiry request, at the moment, the bandwidth redundancy ratio of the content distribution network device is not lower than 0 all the time, namely not lower than a second threshold value, the weight of the content distribution network device is kept to be 1024, when the inquiry request is responded to for a certain time, the bandwidth redundancy ratio of the content distribution network device is lower than 0, namely the bandwidth redundancy ratio is lower than the second threshold value, the weight of the response end to the content distribution network device is reduced from 1024, after the weight is reduced for multiple times, the weight of the response end is reduced to 400, namely is reduced to be smaller than a third threshold value, at the moment, the weight of the response end to the content distribution network device is increased from 400, but the increased weight is not more than 512. When the weight of the content distribution network device is reduced to 200 at a time, i.e., is reduced to less than the fourth threshold, the weight of the responding end to the content distribution network device is increased from 200, but the increased weight does not exceed 1024.
In order to facilitate those skilled in the art to more intuitively understand the balancing effect of the scheduling method for content distribution network devices provided in the embodiments of the present application, a bandwidth data variation diagram of a content distribution device after the scheduling method for content distribution network devices provided in the embodiments of the present application is adopted will be described as an example, where each content distribution network device includes a plurality of low-allocation cache network devices.
As shown in fig. 6, the overall bandwidth of the content distribution network device is controlled to be around the nominal bandwidth of 1.95G without an overload condition. Similarly, as shown in fig. 7, the bandwidth of a single low-allocated cache network device is also controlled to be near the nominal bandwidth 108K, wherein the portion of the curve that is farther from the nominal bandwidth is due to low peak traffic and therefore has a small bandwidth.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
Another aspect of the embodiments of the present invention further provides a scheduling apparatus for a content delivery network device, as shown in fig. 8, including:
a receiving module 801, configured to receive an inquiry request sent by a requesting end.
The detecting module 802 is configured to detect whether the query request is a cache hit.
A first determining module 803, configured to, in a case that a cache hit of the query request is detected, determine 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.
A second determining module 804, configured to determine, when a miss of the query request is detected, a target content distribution network device from the content distribution network devices according to a current bandwidth redundancy ratio and a current weight of each content distribution network device.
And a scheduling module 805 configured to schedule the target content distribution network device to respond to the query request.
It should be understood that the present embodiment is an apparatus embodiment corresponding to the method embodiment, and the present embodiment can be implemented in cooperation with the method embodiment. The related technical details mentioned in the method embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied in the method embodiment.
It should be noted that, all the modules involved in this embodiment are logic modules, and in practical application, one logic unit may be one physical unit, may also be a part of one physical unit, and may also be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, a unit which is not so closely related to solve the technical problem proposed by the present invention is not introduced in the present embodiment, but this does not indicate that there is no other unit in the present embodiment.
Another aspect of the embodiments of the present invention further provides an electronic device, as shown in fig. 9, including: at least one processor 901; and, memory 902 communicatively connected to at least one processor 901; the memory 902 stores instructions executable by the at least one processor 901, and the instructions are executed by the at least one processor 901, so that the at least one processor 901 can execute the scheduling method of the content distribution network device described in any one of the above method embodiments.
The memory 902 and the processor 901 are coupled by a bus, which may comprise any number of interconnected buses and bridges that couple one or more of the various circuits of the processor 901 and the memory 902. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or 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 for storing data used by processor 901 in performing operations.
In another aspect, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program. The computer program, when executed by a processor, implements the scheduling method for a content distribution network device as described in any of the method embodiments above.
That is, those skilled in the art can understand that all or part of the steps in the method according to the above embodiments may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and 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 embodiments for practicing the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (12)

1. A scheduling method of a content distribution network device is applied to a response end, and comprises the following steps:
receiving a query request sent by a request end;
detecting whether the query request is in cache hit;
under the condition that the cache hit of the query request is detected, determining target content distribution network equipment from the hit content distribution network equipment according to the current weight of the hit content distribution network equipment; 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 is not cached and hit, 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.
2. The method for scheduling content distribution network devices according to claim 1, 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 the preset weight;
determining the hit content distribution network device with the current weight as the preset weight as the target content distribution network device in the case that the current weight of at least one hit content distribution network device 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 the hash value of the query request and determining the target content distribution network equipment according to the hash value and the current weight.
3. The method for scheduling content distribution network devices according to claim 2, 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 within a preset source returning interval or not;
under the condition that the hash value falls in the back source interval, randomly determining a missed content distribution network device as the target content distribution network device;
and determining the hit content distribution network device with the largest current weight as the target content distribution network device when the hash value does not fall within the back-to-source interval.
4. The method for scheduling content distribution network devices according to claim 1, wherein the determining the 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 comprises:
detecting whether the current bandwidth redundancy ratio of each content distribution network device is lower than a preset first threshold value or not;
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, 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.
5. The method for scheduling content distribution network devices according to any one of claims 1 to 4, 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 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.
6. The scheduling method of a content distribution network device according to any of claims 1 to 4, characterized in that the method further comprises:
and under the condition that the content distribution network equipment with the bandwidth redundancy ratio higher than a preset third threshold value is detected to exist, increasing the current weight of the content distribution network equipment with the bandwidth redundancy ratio higher than the third threshold value according to a preset second adjustment step size.
7. The method for scheduling a content distribution network device according to claim 6, wherein the increasing the current weight of a content distribution network device having a bandwidth redundancy ratio higher than a third threshold value according to a second preset adjustment step, in the case of detecting the existence of a content distribution network device having a bandwidth redundancy ratio higher than a third preset threshold value, comprises:
under the condition that the bandwidth redundancy ratio of the content distribution network equipment with the bandwidth redundancy ratio higher than a preset third threshold is detected to be lower than a preset fourth threshold, the current weight of the content distribution network equipment with the bandwidth redundancy ratio higher than the third threshold and lower than the fourth threshold is increased according to the second adjustment step length by taking the bandwidth redundancy ratio not exceeding the preset weight threshold as a limiting condition;
and under the condition that the bandwidth redundancy ratio of the content distribution network equipment with the bandwidth redundancy ratio higher than a preset third threshold value is detected to be 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 by taking the initial weight as a limiting condition.
8. The method for scheduling a content distribution network device according to any one of claims 1 to 4, wherein the bandwidth redundancy ratio of the content distribution network device can be determined according to the following expression:
R=(B-B')/B
where R is a bandwidth redundancy ratio of the content distribution network device, B' is an used bandwidth of the content distribution network device, and B is a rated bandwidth of the content distribution network device.
9. The method for scheduling content distribution network devices according to any one of claims 1 to 4, wherein the 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, so that the request end can access the corresponding content distribution network equipment according to the received information.
10. A scheduling apparatus of a content distribution network device, comprising:
the receiving module is used for receiving the query request sent by the request terminal;
the detection module is used for detecting whether the query request is in cache hit or not;
the first determining module is used for determining target content distribution network equipment from the hit content distribution network equipment according to the current weight of the hit content distribution network equipment under the condition that the cache hit of the query request is detected; 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, configured to determine, when it is detected that the query request is not cached and hit, the 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;
and the scheduling module is used for scheduling the target content distribution network equipment to respond to the query request.
11. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of scheduling for a content distribution network device of any one of claims 1 to 9.
12. 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 9.
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 true CN114500663A (en) 2022-05-13
CN114500663B 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 (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160373547A1 (en) * 2012-02-23 2016-12-22 Ericsson Ab Bandwidth policy management in a self-corrected content delivery network
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
CN112165436A (en) * 2020-10-15 2021-01-01 腾讯科技(深圳)有限公司 Flow control method, device and system
CN112165691A (en) * 2020-09-24 2021-01-01 百度在线网络技术(北京)有限公司 Content delivery network scheduling method, device, server and medium
US20210021691A1 (en) * 2019-07-19 2021-01-21 Cloudflare, Inc. Site and page specific resource prioritization
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

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160373547A1 (en) * 2012-02-23 2016-12-22 Ericsson Ab Bandwidth policy management in a self-corrected content delivery network
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
US20210021691A1 (en) * 2019-07-19 2021-01-21 Cloudflare, Inc. Site and page specific resource prioritization
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
李文信;齐恒;徐仁海;周晓波;李克秋;: "数据中心网络流量调度的研究进展与趋势", 计算机学报, no. 04, 15 April 2020 (2020-04-15) *
李昕冉;周金和;: "基于复杂网络的绿色CDN社团结构划分", 计算机工程, no. 03, 15 March 2018 (2018-03-15) *

Also Published As

Publication number Publication date
CN114500663B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
US11870871B2 (en) Methods and apparatus for serving content to customer devices based on dynamic content popularity
US10904597B2 (en) Dynamic binding for use in content distribution
US6374289B2 (en) Distributed client-based data caching system
US10757176B1 (en) Systems, methods, devices and arrangements for server load distribution
US20090248865A1 (en) Load distribution method, load distribution device, and system including load distribution device
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
US11178220B2 (en) Method and system for transmitting a data resource acquisition request
CN101540775A (en) Method and device for distributing contents and network system for distributing contents
CN110830565B (en) Resource downloading method, device, system, electronic equipment and storage medium
EP3582116A1 (en) Webpage loading method, webpage loading system, and server
CN101980505A (en) 3Tnet-based video-on-demand load balancing method
CN110138808B (en) Anti-hijack downloading method and system based on CDN
CN111291252A (en) Method and device for adjusting query rate per second, electronic equipment and storage medium
CN112491951B (en) Request processing method, server and storage medium in peer-to-peer network
CN112202833A (en) CDN system, request processing method and scheduling server
CN115051978B (en) Equipment monitoring implementation method and system
CN114500663A (en) Scheduling method, device, equipment and storage medium for content distribution network equipment
CN110636104B (en) Resource request method, electronic device and storage medium
CN115277851B (en) Service request processing method and system
CN112104752B (en) Hot spot balancing method and system for cache nodes of content distribution network
CN114666318A (en) Downloading method and device of streaming media data, electronic equipment and storage medium
CN113805802A (en) Method, server and storage medium for accessing current limit
CN117459586A (en) Access request processing method and device, storage medium and electronic device
CN116208559A (en) Method and system for block synchronization based on load balancing

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