CN113810450A - CDN node scheduling method, GSLB server and storage medium - Google Patents

CDN node scheduling method, GSLB server and storage medium Download PDF

Info

Publication number
CN113810450A
CN113810450A CN202010556523.XA CN202010556523A CN113810450A CN 113810450 A CN113810450 A CN 113810450A CN 202010556523 A CN202010556523 A CN 202010556523A CN 113810450 A CN113810450 A CN 113810450A
Authority
CN
China
Prior art keywords
cdn node
cdn
terminal
address information
currently
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.)
Pending
Application number
CN202010556523.XA
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN202010556523.XA priority Critical patent/CN113810450A/en
Publication of CN113810450A publication Critical patent/CN113810450A/en
Pending legal-status Critical Current

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/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a scheduling method of CDN nodes, a GSLB server and a storage medium, belonging to the technical field of communication. The method is applied to the GSLB server and specifically comprises the following steps: determining a CDN node to be provided with content service, which is currently corresponding to a terminal, from a CDN node cluster based on first type address information of the terminal and second type address information corresponding to a current request of the terminal; and scheduling the request to the determined CDN node. According to the technical scheme of the embodiment of the invention, different terminal requests are dispatched to corresponding different CDN nodes, so that the load balance of each CDN node is realized.

Description

CDN node scheduling method, GSLB server and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, and particularly discloses a CDN node scheduling method, a GSLB server and a storage medium.
Background
In a Content Delivery Network (CDN) system, a Global Server Load Balance (GSLB) Server is responsible for scheduling a request of each terminal to a CDN node, and providing a Content service for the terminal through the CDN node.
In the related CDN node scheduling technology, when a terminal initiates a request, the GSLB generally selects an optimal CDN node according to information such as network quality and CDN node load, and the terminal requests a content required by the selected CDN node. This scheduling approach has a problem: the GSLB may always schedule the request of each terminal to the same optimal CDN node, which may cause overload of the CDN node and idle load of other CDN nodes, that is, cause unbalanced load of each CDN node in the CDN system.
Disclosure of Invention
The embodiment of the invention provides a scheduling method of CDN nodes, a GSLB server and a storage medium, so as to realize load balance of each CDN node in a CDN system.
In a first aspect, an embodiment of the present invention provides a method for scheduling CDN nodes, where the method includes:
determining a CDN node to be provided with content service, which is currently corresponding to a terminal, from a CDN node cluster based on first type address information of the terminal and second type address information corresponding to a current request of the terminal;
and scheduling the request to the determined CDN node.
In a second aspect, an embodiment of the present invention further provides a GSLB server, where the GSLB server includes a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program and implement the scheduling method of the CDN node when executing the computer program.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the processor is caused to implement the scheduling method for a CDN node as described above.
The embodiment of the invention discloses a scheduling method of CDN nodes, an intelligent terminal, an information display system and a computer storage medium.
Drawings
Fig. 1 is a schematic diagram of a networking architecture of a CDN system according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a GSLB server according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of a scheduling method for CDN nodes according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating steps of another scheduling method for CDN nodes according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a substep of determining a CDN node to be provided with a content service, which corresponds to a terminal currently, from a CDN node cluster according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a process for providing a broadcast content service for a terminal according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating steps of another CDN node scheduling method according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It is to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the description of the embodiments of the present invention, and have no peculiar meaning by themselves. Thus, "module", "component" or "unit" may be used mixedly.
The embodiment of the invention provides a CDN node scheduling method, a GSLB server and a storage medium. The CDN node scheduling method can be applied to a GSLB server, and is used for determining a CDN node to be provided with content service, which is currently corresponding to a terminal, from a CDN node cluster based on first type address information of the terminal and second type address information corresponding to a current request of the terminal; scheduling the request to the determined CDN node; for each different terminal in the CDN system, the load balance of each CDN node in the CDN system is realized by scheduling the request of each different terminal to the corresponding different CDN node.
Referring to fig. 1, fig. 1 is a schematic diagram of a networking architecture of a CDN system according to an embodiment of the present invention. The CDN system 100 includes a GSLB server 10, a CDN node 20, and a terminal 30. The GSLB server 10, the CDN node 20, and the terminal 30 establish a communication connection with each other via the Internet. The CDN system 100 includes a plurality of CDN nodes 20, and the number of terminals 30 is at least one.
The terminal 30 includes, but is not limited to, a smart phone, a tablet computer, a personal computer, and the like. The user initiates a request to the GSLB server 10 through the terminal 30, for example, the terminal 30 initiates a request to play the content to the GSLB server 10.
The GSLB server 10 comprises a collection node load status module, a scheduling rule matching module and a node selection module.
The collection node load state module is configured to initiate a load information acquisition request to all CDN nodes 20 in the CDN system at regular time, for example, initiate a load information acquisition request to all CDN nodes 20 every N seconds, where a regular time interval may be flexibly set according to an actual situation, and is not limited specifically here.
All CDN nodes 20 return current load information, where the load information includes, but is not limited to, information such as used bandwidth, maximum bandwidth, and the like. After receiving the load information returned by the CDN node 20, the collection node load status module updates the recorded load information of each CDN node 20. If the bandwidth used by CDN node 20 exceeds the maximum bandwidth or the response of CDN node 20 times out, CDN node 20 is considered to be unavailable to invoke the service, and CDN node 20 is not selected during scheduling.
The scheduling rule matching module is configured to match, after receiving a request of the terminal 30, a group of CDN node sets 1 according to URL (Uniform Resource Locator) address information of the terminal, match, according to IP (Internet Protocol) address information of the terminal, another group of CDN node sets 2, take an intersection of the sets 1 and 2 as a CDN node set that meets a condition, and output the CDN node set to the node selection module.
A node selection module, configured to remove, from the CDN node set meeting the condition, a CDN node 20 that is considered as being unable to call a service in the acquisition node load state module, and if the number of remaining CDN nodes 20 is 1, directly schedule a request of the terminal 30 to the CDN node 20; if the number of the remaining CDN nodes 20 is greater than 1, calculating an available load rate of each CDN node 20, where the available load rate is used to represent an available load condition of the CDN node, and the higher the available load rate is, the smaller the current load of the CDN node is, and the higher the available load of the CDN node is. Since the load state of each CDN node 20 may change in each load information collection period, the loadable rate of each CDN node 20 is calculated according to the latest load information in each load information collection period.
Then, a random number is generated, and the request of the terminal 30 is selected to be dispatched to the CDN node 20 according to the range of the loadable rate interval of the CDN node 20 in which the random number falls. When the next request is processed, a random number is taken, and the CDN node 20 corresponding to the loadable rate interval is selected according to the loadable rate interval in which the random number falls. Since each time a random number is taken, a large number of requests will be scheduled according to the ratio of the loadable rate of each CDN node 20 in terms of probability. Therefore, in each load information acquisition cycle, the GSLB server 20 schedules the request of at least one terminal 30 to a plurality of CDN nodes 20 according to the ratio of the loadable rate of each CDN node 20, where the CDN nodes 20 with a small load have more terminal requests and the CDN nodes 20 with a large load have fewer terminal requests, thereby achieving load balancing among the CDN nodes 20.
Referring to fig. 2, fig. 2 is a schematic block diagram of a GSLB server according to an embodiment of the present invention. The GSLB server 200 comprises a processor 201 and a memory 202, wherein the processor 201 and the memory 202 are connected by a bus.
The memory 202 may include, among other things, a non-volatile storage medium and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause a processor to perform any one of the methods of scheduling CDN nodes.
The processor 201 is used to provide computing and control capabilities to support the operation of the entire terminal device.
The internal memory provides an environment for running a computer program in the non-volatile storage medium, and the computer program, when executed by the processor, causes the processor to execute any one of the scheduling methods of the CDN nodes.
It is to be understood that the structure shown in fig. 2 is only a block diagram of a part of the structure related to the embodiment of the present invention, and does not constitute a limitation on the intelligent terminal to which the embodiment of the present invention is applied, and a specific intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have a different arrangement of components.
It should be understood that the Processor 201 may be a Central Processing Unit (CPU), and the Processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor is configured to execute a computer program stored in the memory to perform the steps of:
determining a CDN node to be provided with content service, which is currently corresponding to the terminal, from a CDN node cluster based on first type address information of the terminal and second type address information corresponding to a current request of the terminal;
and dispatching the request to the determined CDN node.
In one embodiment, the first address information includes IP address information and the second type address information includes URL address information.
In an embodiment, when the processor determines, from the CDN node cluster, a CDN node to be provided with a content service currently corresponding to a terminal based on first-type address information of the terminal and second-type address information corresponding to a current request of the terminal, the processor is configured to: determining a CDN node set matched with the first type of address information and the second type of address information; and determining the CDN node to be provided with the content service corresponding to the terminal at present according to the CDN node set.
In one embodiment, the processor, when implementing determining a set of CDN nodes that match the first type of address information and the second type of address information, is configured to implement: determining a first CDN node group matched with the first type of address information and a second CDN node group matched with the second type of address information; and forming a CDN node set by the same CDN nodes in the first CDN node group and the second CDN node group.
In one embodiment, the processor, after implementing determining the set of CDN nodes that match the first type of address information and the second type of address information, is further to implement:
determining a CDN node which can be dispatched currently in the CDN node set according to the current load information of each CDN node in the CDN node set;
when determining a CDN node to provide a content service corresponding to a terminal currently according to a CDN node set, the method is configured to implement:
if the number of the currently schedulable CDN nodes is one, determining the currently schedulable CDN node as a CDN node which is currently corresponding to the terminal and is to provide the content service;
and if the number of the currently schedulable CDN nodes is multiple, selecting one CDN node from the multiple currently schedulable CDN nodes, and determining the CDN node which is currently corresponding to the terminal and is to provide the content service.
In an embodiment, when the processor selects one CDN node from a plurality of currently schedulable CDN nodes and determines the CDN node currently corresponding to the terminal and to be provided with the content service, the processor is configured to: obtaining the loadable rate of each currently schedulable CDN node, and determining the loadable rate interval corresponding to each currently schedulable CDN node, wherein the higher the loadable rate is, the smaller the current load of the CDN node is; calculating the sum of the load rates of a plurality of currently schedulable CDN nodes, and generating a random number within a numerical range from a preset initial value to the sum, wherein the preset initial value is smaller than the sum; and determining the current schedulable CDN node corresponding to the loadable rate interval where the random number is located as the CDN node which is currently corresponding to the terminal and is to provide the content service.
In one embodiment, the processor, when implementing scheduling of the request to the determined CDN node, is configured to implement: and sending redirection information to the terminal according to the determined CDN node so that the terminal can initiate a request to the CDN node.
In one embodiment, the redirection information includes IP address information of the CDN node.
In an embodiment, before the processor determines, from the CDN node cluster, a CDN node to be provided with a content service currently corresponding to the terminal based on the first type address information of the terminal and the second type address information corresponding to the current request of the terminal, the processor is further configured to: when a request initiated by a terminal is received, first type address information of the terminal and second type address information corresponding to the request are obtained.
In one embodiment, the processor is further configured to implement: regularly sending a load information acquisition request to each CDN node in the CDN node cluster; and receiving load information fed back by each CDN node in the CDN node cluster according to the load information acquisition request.
For convenience of understanding, the scheduling method of the CDN node provided by the embodiment of the present invention will be described in detail below with reference to the CDN system in fig. 1 and the GSLB server in fig. 2. It should be noted that the CDN system and the GSLB server do not constitute a limitation on an application scenario of the scheduling method for the CDN node provided in the embodiment of the present invention.
As shown in fig. 3, fig. 3 is a flowchart illustrating steps of a scheduling method for CDN nodes according to an embodiment of the present invention. The method can be used in the GSLB server to realize load balancing of each CDN node in the CDN system.
Specifically, as shown in fig. 3, the method includes steps S101 to S102.
S101, determining a CDN node to be provided with content service, which corresponds to the terminal currently, from a CDN node cluster based on first type address information of the terminal and second type address information corresponding to a current request of the terminal.
In the CDN system, each terminal is configured with corresponding address information, and for convenience of description, the address information of the terminal is hereinafter referred to as first-type address information. Wherein the first type of address information includes, but is not limited to, IP address information. The request initiated by the terminal carries corresponding address information, and for convenience of description, the address information corresponding to the request initiated by the terminal is referred to as second type address information hereinafter. The terminal-initiated request includes, but is not limited to, a request for playing content, and the second type address information includes, but is not limited to, URL address information.
When the CDN node needs to be scheduled to provide content service for the terminal, an optimal CDN node is not directly selected according to information such as network quality and CDN node load, the terminal requests the selected CDN node for the required content, but the CDN node to be provided with the content service is determined from a CDN node cluster, namely a plurality of CDN nodes in a CDN system, based on first type address information of the terminal and second type address information corresponding to a request initiated by the terminal currently, and the content required by the request of the terminal is provided for the terminal through the determined CDN node.
In some embodiments, as shown in fig. 4, step S101 may be preceded by step S103.
S103, when a request initiated by the terminal is received, the first type address information of the terminal and the second type address information corresponding to the request are obtained.
When a request initiated by a terminal is received, on one hand, first type address information corresponding to the terminal, such as IP address information of the terminal, is obtained, and on the other hand, second type address information corresponding to the request initiated by the terminal, such as URL address information corresponding to the request initiated by the terminal, is obtained. And then, based on the acquired first type address information of the terminal and second type address information corresponding to the current request of the terminal, determining a CDN node to be provided with content service, which is currently corresponding to the terminal, from the CDN node cluster.
In some embodiments, as shown in fig. 5, step S101 specifically includes sub-step S1011 and sub-step S1012.
S1011, a CDN node set matched with the first type address information and the second type address information is determined.
The method comprises the steps that CDN node screening is firstly carried out on each CDN node in a CDN node cluster, and a CDN node set matched with first type address information and second type address information is determined based on the first type address information of a terminal and the second type address information corresponding to a request initiated by the terminal currently. That is, a CDN node capable of providing content service for the terminal is screened out from each CDN node in the CDN node cluster. For example, a CDN node set that matches the IP address information of the terminal and the URL address information corresponding to the request originated by the terminal is determined.
For example, determining a set of CDN nodes that match the first type of address information and the second type of address information may include: determining a first CDN node group matched with the first type of address information and a second CDN node group matched with the second type of address information; and forming a CDN node set by the same CDN nodes in the first CDN node group and the second CDN node group.
For example, according to the IP address information of the terminal and the IP segment corresponding to the content service provided by each CDN node in the CDN node cluster, one or more CDN nodes corresponding to the IP segment covering the IP address information of the terminal are determined as a first CDN node group matched with the IP address information of the terminal. And determining a second CDN node group matched with the URL address information according to the URL address information corresponding to the request initiated by the terminal. The same CDN node and different CDN nodes may exist in the first CDN node group and the second CDN node group.
The same CDN node in the first CDN node group and the same CDN node in the second CDN node group are determined by comparing the first CDN node group with the second CDN node group, and a CDN node set is formed by the same CDN node in the first CDN node group and the same CDN node in the second CDN node group.
And S1012, determining the CDN node to be provided with the content service corresponding to the terminal at present according to the CDN node set.
And then, according to the determined CDN node set, determining a CDN node which is currently corresponding to the terminal and is to provide the content service. For example, if the CDN node set only includes one CDN node, the CDN node is directly determined as a CDN node to be currently corresponding to the terminal and to be provided with the content service. And if the CDN node set comprises a plurality of CDN nodes, selecting one CDN node from the plurality of CDN nodes, and determining the CDN node which is currently corresponding to the terminal and is to provide the content service.
In some embodiments, after the sub-step S1011, may further include: and determining the CDN nodes which can be dispatched currently in the CDN node set according to the current load information of each CDN node in the CDN node set. The sub-step S1012 may include: if the number of the currently schedulable CDN nodes is one, determining the currently schedulable CDN node as a CDN node which is currently corresponding to the terminal and is to provide the content service; and if the number of the currently schedulable CDN nodes is multiple, selecting one CDN node from the multiple currently schedulable CDN nodes, and determining the CDN node which is currently corresponding to the terminal and is to provide the content service.
Because the loads of the CDN nodes are different, the loads of some CDN nodes are small, and the loads of some CDN nodes are large, in order to select an appropriate CDN node to provide content service for a terminal, after a CDN node set is determined, according to the current load information of each CDN node in the CDN node set, the current non-schedulable CDN node in the CDN node set is determined according to the current load information of each CDN node, wherein the load information comprises information such as used bandwidth and maximum bandwidth, the non-schedulable CDN node is removed, and the currently schedulable CDN node in the CDN node set is obtained. For example, if the used bandwidth of a CDN node in the CDN node set exceeds the maximum bandwidth, determining that the CDN node is a current non-schedulable CDN node, and removing the non-schedulable CDN node to obtain a currently schedulable CDN node in the CDN node set.
In one case, the currently schedulable CDN node in the CDN node set includes one CDN node, and at this time, the CDN node is directly determined as the CDN node currently corresponding to the terminal and to be provided with the content service, and the content service is provided for the terminal through the CDN node.
In another case, the currently schedulable CDN nodes in the CDN node set include a plurality of nodes, and at this time, one CDN node is selected from the plurality of currently schedulable CDN nodes, and the CDN node that is currently corresponding to the terminal and that is to provide the content service is determined. For example, a CDN node is randomly selected and determined as a CDN node to be currently corresponding to the terminal and to be served with the content.
In some embodiments, when there are a plurality of currently schedulable CDN nodes in the CDN node set, selecting one CDN node from the plurality of currently schedulable CDN nodes, and determining the CDN node to serve the content currently corresponding to the terminal may include: obtaining the loadable rate of each currently schedulable CDN node, and determining the loadable rate interval corresponding to each currently schedulable CDN node, wherein the higher the loadable rate is, the smaller the current load of the CDN node is; calculating the sum of the load rates of a plurality of currently schedulable CDN nodes, and generating a random number within a numerical range from a preset initial value to the sum, wherein the preset initial value is smaller than the sum; and determining the current schedulable CDN node corresponding to the loadable rate interval where the random number is located as the CDN node which is currently corresponding to the terminal and is to provide the content service.
Optionally, the value range corresponding to the loadable rate of the preset CDN node is a value range of 1-100, and the loadable rate of each currently schedulable CDN node is obtained by calculating according to the load state of each currently schedulable CDN node. And determining the loadable rate interval corresponding to each currently schedulable CDN node based on the loadable rate of each currently schedulable CDN node. For example, if the currently schedulable CDN nodes include CDN node A, CDN node B, CDN node C, the loadable rate of CDN node a is P1, the loadable rate of CDN node B is P2, the loadable rate of CDN node C is P3, the loadable rate section corresponding to CDN node a is [1, P1], the loadable rate section corresponding to CDN node B is (P1, P1+ P2], and the loadable rate section corresponding to CDN node C is (P1+ P2, P1+ P2+ P3).
According to the loadable rates of the plurality of currently schedulable CDN nodes, adding the loadable rates of the plurality of currently schedulable CDN nodes, calculating the sum of the loadable rates of the plurality of currently schedulable CDN nodes, and setting a preset initial value, wherein the preset initial value is smaller than the sum of the loadable rates of the plurality of currently schedulable CDN nodes. Optionally, the preset initial value is set to be 1, and it should be noted that the preset initial value may be flexibly set according to an actual situation, and is not particularly limited herein.
And generating a random number based on the preset initial value and the sum of the loadable rates of the plurality of currently schedulable CDN nodes, wherein the size of the random number is within a numerical value interval from the preset initial value to the sum of the loadable rates. For example, if the preset initial value is 1 and the sum of the load availability rates of the plurality of currently schedulable CDN nodes is P1+ P2+ P3, a random number within the interval [1, P1+ P2+ P3] is generated.
And determining the random number to be located in the loadable rate interval corresponding to the current schedulable CDN node according to the generated random number and the loadable rate intervals corresponding to the plurality of currently schedulable CDN nodes, and determining the currently schedulable CDN node corresponding to the loadable rate interval in which the random number is located as the CDN node currently corresponding to the terminal and needing to provide the content service.
For example, still taking the above listed example as an example, the CDN nodes that can be currently scheduled include CDN node A, CDN node B, CDN node C, the loadable rate section corresponding to CDN node a is [1, P1], the loadable rate section corresponding to CDN node B is (P1, P1+ P2], the loadable rate section corresponding to CDN node C is (P1+ P2, P1+ P2+ P3], if the generated random number falls in the [1, P1] section, CDN node a is selected as the CDN node currently corresponding to the terminal and to be provided with the content service, if the generated random number falls in the (P1, P1+ P2] section, CDN node B is selected as the CDN node currently corresponding to the terminal and to be provided with the content service, and if the generated random number falls in the (P1+ P2, P1+ P2+ P3] section, CDN node C is selected as the CDN node to be provided with the content service.
And S102, scheduling the request to the determined CDN node.
After the CDN node of the content service to be provided, which is currently corresponding to the terminal, is determined, the request of the terminal is dispatched to the determined CDN node.
For example, scheduling the request to the determined CDN node may include: and sending redirection information to the terminal according to the determined CDN node so that the terminal can initiate a request to the CDN node.
The redirection information includes the IP address information of the CDN node. After a CDN node corresponding to the terminal currently and waiting for providing the content service is determined, redirection information containing IP address information corresponding to the CDN node is sent to the terminal. After receiving the redirection information, the terminal initiates a request to a CDN node corresponding to the IP address information according to the IP address information in the redirection information. And when receiving a request initiated by the terminal, the CDN node provides corresponding content service for the terminal according to the received request.
The following describes a scheduling process of the CDN node by taking an example of providing a broadcast content service for a terminal. As shown in fig. 6, fig. 6 is a schematic flow chart of providing a content playing service to a terminal, and the specific flow is as follows:
step1, the terminal initiates a play request;
step2, the GLSB server receives the playing request;
step3, the GLSB server matches a corresponding CDN node set according to the IP address information of the terminal and the URL address information corresponding to the playing request;
step4, the GLSB server determines the CDN node which can be dispatched currently in the CDN node set;
step5, judging whether the number of CDN nodes which can be dispatched at present is more than 1 by the GLSB server; if yes, Step6 is executed; if not, executing Step 8;
step6, the GLSB server obtains the loadable rate of each current schedulable CDN node;
step7, the GLSB server generates a random number, and returns the IP address information of the current schedulable CDN node corresponding to the loadable rate interval in which the random number falls to the terminal;
step8, the GLSB server returns the only IP address information of the CDN node which can be dispatched currently to the terminal;
step9, the terminal sends a playing request to the corresponding CDN node according to the IP address information;
and Step10, the CDN node provides the playing content service for the terminal.
In some embodiments, as shown in fig. 7, the scheduling method for CDN nodes further includes step S104 and step S105.
And S104, regularly sending a load information acquisition request to each CDN node in the CDN node cluster.
Because the load state of the CDN nodes changes dynamically, load information acquisition requests are sent to all CDN nodes in the CDN node cluster at regular times based on a preset time period. For example, the preset time period is N seconds, and load information acquisition requests are sent to all CDN nodes in the CDN node cluster every N seconds. The time period may be flexibly set according to actual conditions, and is not particularly limited herein.
And S105, receiving load information fed back by each CDN node in the CDN node cluster according to the load information.
After each CDN node in the CDN node cluster receives the load information acquisition request, feeding back the current latest load information of each CDN node to the GSLB server. The load information includes, but is not limited to, information such as used bandwidth and maximum bandwidth. After receiving the load information returned by each CDN node in the CDN node cluster, updating the recorded load information of each CDN node into the received load information returned by each CDN node. That is, within each preset time period, the load information of each CDN node is updated and recorded.
Therefore, after a request initiated by the terminal is received, the currently non-schedulable CDN node can be determined according to the load information corresponding to each CDN node which is updated and recorded in the current time period, the non-schedulable CDN node is removed, and the currently schedulable CDN node is obtained.
And when the request initiated by each terminal is processed, based on the generated random number, selecting the CDN node as the CDN node for providing the content service for the terminal according to the loadable rate interval corresponding to the current schedulable CDN node in which the random number falls. Because the random number is taken every time, and the distribution probability of the random number generated every time in the interval is equal according to the probability theory, the loadable rate of each currently schedulable CDN node is positively correlated with the probability that the random number falls into the loadable rate interval corresponding to each currently schedulable CDN node. Therefore, the quantity proportion of the terminal requests dispatched to each currently schedulable CDN node is consistent with the proportion of the loadable rate of each currently schedulable CDN node, that is, the terminal requests dispatched to CDN nodes with a large loadable rate are more, and the terminal requests dispatched to CDN nodes with a small loadable rate are fewer, so that load balancing among the CDN nodes is achieved.
In the above embodiment, based on the first type address information of the terminal and the second type address information corresponding to the current request of the terminal, a CDN node to be provided with a content service, which is currently corresponding to the terminal, is determined from the CDN node cluster, and the request of the terminal is scheduled to the determined CDN node.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, where the computer program includes a program instruction, and a processor executes the program instruction, so as to implement the scheduling method for any CDN node provided in the embodiment of the present invention.
For example, the computer program is loaded by a processor and may perform the following steps:
determining a CDN node to be provided with content service, which is currently corresponding to the terminal, from a CDN node cluster based on first type address information of the terminal and second type address information corresponding to a current request of the terminal;
and dispatching the request to the determined CDN node.
The computer readable storage medium may be an internal storage unit of the GSLB server described in the foregoing embodiment, for example, a hard disk or a memory of the GSLB server. The computer readable storage medium may also be an external storage device of the GSLB server, such as a plug-in hard disk provided on the GSLB server, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A scheduling method of CDN nodes comprises the following steps:
determining a CDN node to be provided with content service, which is currently corresponding to a terminal, from a CDN node cluster based on first type address information of the terminal and second type address information corresponding to a current request of the terminal;
and scheduling the request to the determined CDN node.
2. The CDN node scheduling method of claim 1 wherein the first address information comprises IP address information and the second type of address information comprises URL address information.
3. The method for scheduling CDN nodes of claim 1, wherein the determining, from a CDN node cluster, a CDN node that is currently corresponding to the terminal and is to provide a content service, based on the first type address information of the terminal and the second type address information corresponding to the current request of the terminal, includes:
determining a CDN node set matched with the first type of address information and the second type of address information;
and determining the CDN node to be provided with the content service, which corresponds to the terminal currently, according to the CDN node set.
4. The method of scheduling CDN nodes as recited in claim 3, wherein the determining the set of CDN node matching the first type of address information and the second type of address information comprises:
determining a first CDN node group matched with the first type of address information and a second CDN node group matched with the second type of address information;
and forming the CDN node set by the same CDN nodes in the first CDN node group and the second CDN node group.
5. The method for scheduling CDN nodes as recited in claim 3, wherein the determining the set of CDN node matching the first type of address information and the second type of address information comprises:
determining a currently schedulable CDN node in the CDN node set according to the current load information of each CDN node in the CDN node set;
the determining, according to the CDN node set, the CDN node that is currently corresponding to the terminal and is to provide the content service includes:
if the number of the currently schedulable CDN nodes is one, determining one currently schedulable CDN node as the CDN node which is currently corresponding to the terminal and is to provide the content service;
and if the number of the currently schedulable CDN nodes is multiple, selecting one CDN node from the multiple currently schedulable CDN nodes, and determining the CDN node which is currently corresponding to the terminal and is to be provided with the content service.
6. The method as claimed in claim 5, wherein the step of selecting one CDN node from the currently schedulable CDN nodes to determine the CDN node currently serving the content to be provided corresponding to the terminal includes:
obtaining the loadable rate of each currently schedulable CDN node, and determining the loadable rate interval corresponding to each currently schedulable CDN node, wherein the higher the loadable rate is, the smaller the current load of the CDN node is;
calculating the sum of the loadable rates of the plurality of currently schedulable CDN nodes, and generating a random number within a numerical range from a preset initial value to the sum, wherein the preset initial value is smaller than the sum;
and determining the current schedulable CDN node corresponding to the loadable rate interval where the random number is located as the CDN node which is currently corresponding to the terminal and is to provide the content service.
7. The method for scheduling a CDN node as recited in claim 1, wherein the scheduling the request to the determined CDN node comprises:
and sending redirection information to the terminal according to the determined CDN node so that the terminal can initiate a request to the CDN node.
8. The CDN node scheduling method of any of claims 1 to 7 further comprising:
regularly sending a load information acquisition request to each CDN node in the CDN node cluster;
and receiving load information fed back by each CDN node in the CDN node cluster according to the load information acquisition request.
9. A GSLB server, the GSLB server comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program and, when executing the computer program, implement the scheduling method for CDN nodes according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement the scheduling method for CDN nodes recited in any one of claims 1 through 8.
CN202010556523.XA 2020-06-17 2020-06-17 CDN node scheduling method, GSLB server and storage medium Pending CN113810450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010556523.XA CN113810450A (en) 2020-06-17 2020-06-17 CDN node scheduling method, GSLB server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010556523.XA CN113810450A (en) 2020-06-17 2020-06-17 CDN node scheduling method, GSLB server and storage medium

Publications (1)

Publication Number Publication Date
CN113810450A true CN113810450A (en) 2021-12-17

Family

ID=78943292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010556523.XA Pending CN113810450A (en) 2020-06-17 2020-06-17 CDN node scheduling method, GSLB server and storage medium

Country Status (1)

Country Link
CN (1) CN113810450A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103825837A (en) * 2014-02-19 2014-05-28 上海视云网络科技有限公司 Node load distributed CDN global scheduling method
CN104283963A (en) * 2014-10-21 2015-01-14 无锡云捷科技有限公司 Distributed and collaborative type CDN load balancing method
CN110086868A (en) * 2019-04-25 2019-08-02 北京奇艺世纪科技有限公司 Content delivery method, device and equipment
CN110708256A (en) * 2019-08-26 2020-01-17 中移(杭州)信息技术有限公司 CDN scheduling method, device, network equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103825837A (en) * 2014-02-19 2014-05-28 上海视云网络科技有限公司 Node load distributed CDN global scheduling method
CN104283963A (en) * 2014-10-21 2015-01-14 无锡云捷科技有限公司 Distributed and collaborative type CDN load balancing method
CN110086868A (en) * 2019-04-25 2019-08-02 北京奇艺世纪科技有限公司 Content delivery method, device and equipment
CN110708256A (en) * 2019-08-26 2020-01-17 中移(杭州)信息技术有限公司 CDN scheduling method, device, network equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110290180B (en) Distributed task scheduling method and device, computer equipment and storage medium
CN111522641B (en) Task scheduling method, device, computer equipment and storage medium
US11888756B2 (en) Software load balancer to maximize utilization
CN108696374B (en) Method and device for updating client configuration
CN110858843B (en) Service request processing method and device and computer readable storage medium
CN110633442A (en) Pushing method and device and electronic equipment
US20190130320A1 (en) Network computer system to implement dynamic provisioning for fulfilling delivery orders
US20190132699A1 (en) Computing system to implement network delivery service
CN106878415B (en) Load balancing method and device for data consumption
CN110377431B (en) Service calling method and device under multi-registry scene
CN110474917B (en) Message middleware online and offline method, device, equipment and readable storage medium
CN113141383A (en) Device information subscription method, client, server, system and storage medium
CN111459676B (en) Node resource management method, device and storage medium
CN110198332A (en) Dispatching method, device and the storage medium of content delivery network node
CN111447143A (en) Business service data transmission method and device, computer equipment and storage medium
CN111338787B (en) Data processing method and device, storage medium and electronic device
CN104052677A (en) Soft load balancing method and apparatus of single data source
CN111506443A (en) Service calling method, device, equipment and storage medium
CN113382065B (en) File downloading method, device, system, equipment and storage medium
KR100941902B1 (en) Methods and apparatus for scheduling of content delivery over a distribution network
CN111131375B (en) Interface service acquisition method, device, computer equipment and storage medium
CN111475315A (en) Server and subscription notification push control and execution method
CN113810450A (en) CDN node scheduling method, GSLB server and storage medium
CN109101340B (en) Dynamic distribution method, device, equipment and storage medium of barrage message
CN113835905B (en) Message queue load balancing method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination