CN112261133A - CDN node control method, device, server and storage medium - Google Patents

CDN node control method, device, server and storage medium Download PDF

Info

Publication number
CN112261133A
CN112261133A CN202011133986.1A CN202011133986A CN112261133A CN 112261133 A CN112261133 A CN 112261133A CN 202011133986 A CN202011133986 A CN 202011133986A CN 112261133 A CN112261133 A CN 112261133A
Authority
CN
China
Prior art keywords
cdn node
cdn
target
determining
nodes
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.)
Withdrawn
Application number
CN202011133986.1A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202011133986.1A priority Critical patent/CN112261133A/en
Publication of CN112261133A publication Critical patent/CN112261133A/en
Withdrawn 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • 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
    • 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/1023Server selection for load balancing based on a hash applied to IP addresses or costs

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a content delivery network related to cloud computing, and provides a CDN node control method, a device, a server and a storage medium, wherein the method comprises the following steps: generating a detection task of each CDN node according to the IP addresses of the CDN nodes, wherein each detection task is packaged with the target IP addresses of the CDN nodes to be detected; sending each detection task to a corresponding CDN node so that each CDN node can detect the CDN nodes to be detected according to the corresponding target IP addresses; determining the current availability of each CDN node according to detection data returned by each CDN node based on the corresponding detection task; and controlling the plurality of CDN nodes to be online or offline according to the current available rate of each CDN node. The method and the device improve the service availability of the CDN node.

Description

CDN node control method, device, server and storage medium
Technical Field
The present application relates to the technical field of content delivery networks related to cloud computing, and in particular, to a CDN node control method, apparatus, server, and storage medium.
Background
A Content Delivery Network (CDN) node enables a user to access a desired resource nearby, thereby increasing the access speed of the resource. In the prior art, a plurality of different CDN nodes are often set in a plurality of different regions, and each CDN node is responsible for providing services for users in an adjacent area. However, because the network connectivity difference between operators in each region is large, and the increasing number of nodes increases the difficulty of operation and maintenance, each CDN node is prone to cause unavailability of node service due to problems such as networks, machine rooms, or programs, thereby affecting access of users. Traditional CDN manufacturers are relatively passive in terms of node service faults, dial testing is often performed on CDN nodes by adopting a dial testing system of a third party, manual adjustment is performed after the nodes find the faults, high availability of service cannot be guaranteed, and user experience is influenced.
Disclosure of Invention
The present application mainly aims to provide a CDN node control method, apparatus, server, and storage medium, which aim to determine whether a node is available through mutual detection between CDN nodes, so as to intelligently control an online or offline of a CDN node, and improve availability of CDN node service.
In a first aspect, the present application provides a CDN node control method, including:
generating a detection task of each CDN node according to the IP addresses of the CDN nodes, wherein each detection task is packaged with the target IP addresses of the CDN nodes to be detected;
sending each detection task to a corresponding CDN node so that each CDN node can detect the CDN nodes to be detected according to the corresponding target IP addresses;
determining the current availability of each CDN node according to detection data returned by each CDN node based on the corresponding detection task;
and controlling the plurality of CDN nodes to be online or offline according to the current available rate of each CDN node.
In a second aspect, the present application further provides a CDN node control device, where the CDN node control device includes:
the generation module is used for generating a detection task of each CDN node according to the IP addresses of the CDN nodes, wherein each detection task is packaged with the target IP addresses of the CDN nodes to be detected;
a sending module, configured to send each detection task to a corresponding CDN node, so that each CDN node detects the multiple CDN nodes to be detected according to the corresponding multiple target IP addresses;
the determining module is used for determining the current availability of each CDN node according to detection data returned by each CDN node based on the corresponding detection task;
and the control module is used for controlling the plurality of CDN nodes to be online or offline according to the current availability of each CDN node.
In a third aspect, the present application further provides a server, where the server includes a processor, a memory, and a computer program stored on the memory and executable by the processor, where the computer program, when executed by the processor, implements the steps of the CDN node control method as described above.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the CDN node control method as described above.
The application provides a CDN node control method, a CDN node control device, a server and a storage medium, and generates a detection task of each CDN node according to IP addresses of a plurality of CDN nodes, wherein each detection task is packaged with target IP addresses of a plurality of CDN nodes to be detected; then sending each detection task to the corresponding CDN node so that each CDN node can detect a plurality of CDN nodes to be detected according to a plurality of corresponding target IP addresses; then determining the current availability of each CDN node according to detection data returned by each CDN node based on the corresponding detection task; and finally, controlling the plurality of CDN nodes to be online or offline according to the current available rate of each CDN node. According to the method and the device, the CDN nodes are mutually detected, so that the availability of each CDN node is determined, the CDN nodes are intelligently controlled to be on line or off line through the availability of each CDN node, node faults can be rapidly found, and high availability of CDN node service is guaranteed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating steps of a CDN node control method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart illustrating sub-steps of the CDN node control method in fig. 1;
fig. 3 is a schematic diagram illustrating a CDN node according to the present embodiment for performing detection;
fig. 4 is a schematic view of a scenario for implementing the CDN node control method provided in this embodiment;
fig. 5 is a schematic block diagram of a CDN node control device according to an embodiment of the present disclosure;
fig. 6 is a schematic block diagram of a server according to an embodiment of the present disclosure.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. 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 application.
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. In addition, although the division of the functional blocks is made in the device diagram, in some cases, it may be divided in blocks different from those in the device diagram.
The embodiment of the application provides a CDN node control method, a CDN node control device, a CDN node control server and a storage medium. The CDN node control method can be applied to a server, and the server can be a single server or a server cluster consisting of a plurality of servers.
For example, the server includes a monitoring server and a node management server, the monitoring server is configured to monitor a plurality of CDN nodes and send monitoring data obtained by monitoring the plurality of CDN nodes to the node management server, the node management server is configured to manage and control the plurality of CDN nodes, and the plurality of CDN nodes may be intelligently controlled based on the monitoring data sent by the monitoring server.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating steps of a CDN node control method according to an embodiment of the present disclosure.
As shown in fig. 1, the CDN node control method includes steps S101 to S104.
Step S101, generating a detection task of each CDN node according to the IP addresses of the CDN nodes, wherein each detection task encapsulates a target IP address of a plurality of CDN nodes to be detected.
A Content Delivery Network (CDN) node enables a user to access a desired resource nearby, thereby increasing the access speed of the resource. Often, a plurality of CDN nodes are also located in one area, and each CDN node is responsible for providing services to users in a neighboring area.
Illustratively, the node management server collects server information of a plurality of CDN nodes, where the server information includes IP addresses of the CDN nodes, and the IP addresses are virtual addresses and are internet protocol addresses served by each CDN node. The node management server sends the IP addresses of the CDN nodes to the monitoring server, the monitoring server can receive the IP addresses of the CDN nodes and distribute detection tasks to each CDN node according to the IP addresses of the CDN nodes, and each detection task is packaged with a target IP address of each CDN node to be detected. Each CDN node needs to detect a plurality of other CDN nodes, that is, a plurality of target IP addresses encapsulated according to a detection task are detected, so that mutual detection between CDN nodes is achieved, and a failed CDN node can be quickly discovered.
In one embodiment, as shown in fig. 2, step S101 includes: sub-step S1011 to sub-step S1012.
And a substep S1011, determining target IP addresses of a plurality of CDN nodes to be detected, which correspond to each CDN node, according to the IP addresses of the plurality of CDN nodes.
It should be noted that the network connectivity difference between operators in each region is large, so that when the monitoring server allocates a detection task to each CDN node, other CDN nodes of the same operator or a similar region may be used as detection targets of the CDN nodes, thereby reducing detection delay between CDN nodes and facilitating rapid acquisition of detection data of each CDN node.
In an embodiment, according to an IP address of each CDN node, determining operator information and geographical location information corresponding to each CDN node; and determining a plurality of target IP addresses of the CDN node to be detected, which corresponds to each CDN node, according to the operator information and the geographical position information which correspond to each CDN node. It should be noted that, by analyzing the IP address of the CDN node, operator information corresponding to each CDN node and geographical location information of a location where each CDN node is located may be known. According to the operator information and the geographic position information corresponding to each CDN node, a plurality of CDN nodes to be detected of the same operator and the similar region corresponding to each CDN node are determined, and the IP addresses of the CDN nodes to be detected serve as corresponding target IP addresses, so that a plurality of target IP addresses representing the same operator and the similar region are distributed to each CDN node, the detection delay among the CDN nodes can be effectively reduced, and the detection data obtained by detection of each CDN node are more accurate.
And a substep S1012, generating a detection task for each CDN node according to the target IP addresses of a plurality of CDN nodes to be detected, which each CDN node corresponds to.
The probe task is, for example, a probe instruction. It should be noted that target IP addresses of a plurality of CDN nodes to be detected are encapsulated into each detection task corresponding to each CDN node, and the detection tasks correspond to the CDN nodes one to one, so that each CDN node can execute a corresponding detection task, that is, the CDN nodes to be detected can be detected according to the corresponding target IP addresses, thereby achieving mutual detection between the CDN nodes.
In an embodiment, the probe tasks for each CDN node are generated periodically. Specifically, according to a preset period, target IP addresses of a plurality of CDN nodes to be detected are encapsulated into respective corresponding detection tasks. It should be noted that the preset period may be set according to an actual situation, and this embodiment is not particularly limited. Optionally, the preset period is 1 hour. The detection task of each CDN node is periodically generated, and the detection of the CDN nodes is automatically initiated, so that the running state of each CDN node is periodically known.
In one embodiment, the probe task is encapsulated with a preset number of target IP addresses. Specifically, target IP addresses of a preset number of CDN nodes to be probed are encapsulated into respective corresponding probing tasks. It should be noted that the preset number may be set according to an actual situation, and this embodiment is not particularly limited. Optionally, the preset number is 10. In some embodiments, according to the priority of each target IP address, the target IP addresses of a preset number of CDN nodes to be detected are encapsulated to the respective corresponding detection tasks, and the priority of the target IP address may be determined according to the operator information and/or the geographic location position of the CDN node to be detected, which is not specifically limited in this embodiment.
Step S102, each detection task is sent to the corresponding CDN node, so that each CDN node can detect a plurality of CDN nodes to be detected according to the corresponding target IP addresses.
After the detection task of each CDN node is generated, the server sends each detection task to the corresponding CDN node, so that each CDN node can detect a plurality of CDN nodes to be detected according to a plurality of corresponding target IP addresses, and detection data are obtained.
It should be noted that each CDN node executes the received probe task, that is, based on the target IP addresses of the multiple CDN nodes to be probed that are encapsulated in the probe task, the multiple CDN nodes to be probed are probed, and probe data of the multiple CDN nodes to be probed is obtained.
For example, as shown in fig. 3, target IP addresses of a CDN node 11, a CDN node 12, a CDN node 13, and a CDN node 14 to be detected are encapsulated in a detection task sent by a monitoring server 20 to the CDN node 10, and after the CDN node 10 receives the detection task, the CDN node 11, the CDN node 12, the CDN node 13, and the CDN node 14 are detected according to the target IP addresses of the CDN node 11 to the CDN node 14 encapsulated in the detection task, so as to obtain detection data of the CDN node 11 to the CDN node 14, and return the detection data of the CDN node 11 to the CDN node 14 to the monitoring server 20.
In an embodiment, each CDN node sends a ping request, a tcp request, and/or an http request to a plurality of CDN nodes to be detected based on a plurality of target IP addresses encapsulated in a detection task, where the obtained detection data includes at least one of ping delay, packet loss rate, tcp connection result, and http request result, and then sends the obtained detection data to a server. The tcp link establishment result comprises a link establishment success and a link establishment failure, and the http request result comprises an acceptance request and an non-acceptance request (if the CDN node does not accept the http request within a set time, the http request result is considered as a non-acceptance request). It should be noted that the CDN node sends a ping request, a tcp request, and/or an http request to a plurality of CDN nodes to be detected, and aims to detect whether a network, a port, and a program from the node to the CDN node to be detected are normal, so as to quickly obtain an operating state of each CDN node to be detected.
Step S103, determining the current availability of each CDN node according to detection data returned by each CDN node based on the corresponding detection task.
The server receives detection data returned by each CDN node based on the corresponding detection task, and determines the current availability of each CDN node according to the detection data returned by each CDN node based on the corresponding detection task, so that the availability of each CDN node is determined, the CDN nodes are intelligently controlled according to the availability of each CDN node, and the service availability of the CDN nodes is improved.
In an embodiment, statistics is performed on detection data returned by each CDN node based on a corresponding detection task to obtain detection data of each target IP address; and determining the current available rate of each CDN node according to the detection data of each target IP address. It should be noted that the detection data returned by each CDN node received by the server includes detection data obtained by detecting a plurality of CDN nodes to be detected, and therefore, it is necessary to perform classification statistics on the detection data returned by each CDN node according to a target IP address to obtain detection data of each target IP address, and then it is possible to determine the current availability of each CDN node according to the detection data of each target IP address, where the detection data of each target IP address is multiple, the current availability of the CDN node calculated through the multiple detection data is more accurate, and meanwhile, intelligent control over each CDN node can be achieved through the availability of each CDN node, and the intelligent degree of CDN node service is improved.
In an embodiment, the detection data of the target IP address includes at least one of ping delay, packet loss rate, tcp connection result, and http request result; determining the current availability of each CDN node according to the detection data of each target IP address, wherein the determination comprises the following steps: determining a first available rate of each CDN node according to ping delay and/or packet loss rate of each target IP address; and/or determining a second availability of each CDN node according to the tcp connection establishing result of each target address; and/or determining a third availability ratio of each CDN node according to the http request result of each target address; and determining the current available rate of each CDN node through the first available rate, the second available rate and/or the third available rate of each CDN node. It should be noted that the current availability of each CDN node can be calculated through ping delay, packet loss rate, tcp connection result, http request result, and other detection data, so as to determine the current operating state of each CDN node, thereby facilitating intelligent control of the server.
In an embodiment, determining the first available rate of each CDN node includes: determining a first total number of ping delays for each destination IP address; determining a first target number of target ping delay of each target IP address, wherein the target ping delay is less than or equal to a first preset threshold; and calculating the first available rate of each CDN node according to the first total quantity and the first target quantity of each target IP address. The first preset threshold value can be flexibly set by a user according to more practical situations. It should be noted that a target ping delay smaller than or equal to a first preset threshold is determined from multiple ping delays of the CDN node, a first target number of the target ping delays is calculated, and then the first target number is divided by a first total number of the multiple ping delays, so that a first availability of the CDN node is obtained, where the first availability represents a delay state between the CDN node and another CDN node, and the higher the first availability represents the better the delay state between the CDN node and another CDN node.
For example, the first available rate P1 is (first target number/first total number) x 100%.
In an embodiment, determining the first available rate of each CDN node includes: determining a second total number of packet loss rates for each target IP address; determining a second target number of target packet loss rates of each target IP address, wherein the target packet loss rate is less than or equal to a second preset threshold; and calculating the first available rate of each CDN node according to the second total number and the second target number of each target IP address. Wherein the second preset threshold value can be flexibly set by a user in a more practical situation. It should be noted that a target packet loss rate smaller than or equal to a second preset threshold is determined from a plurality of packet loss rates of the CDN nodes, a second target number of the target packet loss rates is calculated, and then the second target number is divided by a second total number of the plurality of packet loss rates, so that a first availability of the CDN nodes is obtained, thereby intelligently controlling the CDN nodes to go online or offline according to a network operation state of the CDN nodes, and ensuring that a CDN node service has high availability.
For example, the first available rate P1 ═ 100% (second target number/second total number).
Illustratively, a first availability ratio P1 of each CDN node is obtained through ping delay calculation of each target IP address, a first availability ratio P1 'of each CDN node is obtained through packet loss ratio calculation of each target IP address, the first availability ratio P1 is compared with the first availability ratio P1', and a party with a smaller comparison result is selected as the first availability ratio of the CDN node.
In one embodiment, the step of determining the second available rate of each CDN node comprises: determining a third total number of tcp connection results for each target IP address; determining a third target number of target tcp connection establishing results of each target IP address, wherein the target tcp connection establishing results are successful in connection establishing; and calculating a second available rate of each CDN node according to the third total number and the third target number of each target IP address. It should be noted that a target tcp connection establishment result that is successfully established is determined from a plurality of tcp connection establishment results of the CDN node, a third target number of the target tcp connection establishment results that are successfully established is calculated, and then the third target number is divided by a third total number of the target tcp connection establishment results that are successfully established, so that a second availability of the CDN node can be obtained, and therefore, an online or offline of the CDN node can be intelligently controlled according to a port operation state of the CDN node, and high availability of a CDN node service is ensured.
In one embodiment, the step of determining the third available rate of each CDN node includes: determining a fourth total number of http request results for each target IP address; determining a fourth target number of target http request results of each target IP address, wherein the target http request results are acceptance requests; and calculating a third available rate of each CDN node according to the fourth total number and the fourth target number of each target IP address. It should be noted that the target http request result of the request is determined from the http request results of the CDN nodes, the fourth target number of the target http request results of the request is calculated, and then the fourth target number is divided by the fourth total number of the target http request results of the multiple requests, so that the third availability of the CDN nodes is obtained, and therefore, the CDN nodes can be intelligently controlled to be online or offline according to the program running state of the CDN nodes, and high availability of the CDN node service is ensured.
In an embodiment, the current availability rate of each CDN node is determined by the first availability rate, the second availability rate, and/or the third availability rate of each CDN node. The current availability of the CDN node may include a first availability, a second availability, and/or a third availability; the current availability ratio of the CDN node may also be calculated by using a preset formula, such as a weighted average formula, through the first availability ratio, the second availability ratio, and/or the third availability ratio, where the respective weights of the first availability ratio, the second availability ratio, and/or the third availability ratio may be set according to specific situations; the first availability rate, the second availability rate and/or the third availability rate which are less than or equal to the respective corresponding preset threshold values can be screened out by comparing the first availability rate, the second availability rate and/or the third availability rate with the respective corresponding preset threshold values, and the first availability rate, the second availability rate and/or the third availability rate which are less than or equal to the respective corresponding preset threshold values are used as the current availability rate of the CDN node. It should be noted that the current availability of each CDN node can be flexibly determined by the first availability, the second availability, and/or the third availability of each CDN node, so that the current operating state of each CDN node can be quickly determined, a fault and an idle state of a node can be quickly discovered, and high availability of a CDN node service is guaranteed.
It should be noted that the current available rate of each CDN node may also be determined by a ping delay greater than a first preset threshold, a packet loss rate greater than a second preset threshold, a tcp connection establishment result of a connection establishment failure, and/or an http request result of an unaccepted request, which may be referred to in the foregoing embodiments and is not described in detail in this embodiment.
And step S104, controlling a plurality of CDN nodes to be online or offline according to the current available rate of each CDN node.
In an embodiment, a first CDN node with a current availability rate greater than or equal to a preset availability rate is determined from current availability rates of a plurality of CDN nodes, and the first CDN node is controlled to be on-line; and/or determining a second CDN node with the current availability ratio smaller than the preset availability ratio from the current availability ratios of the plurality of CDN nodes, and controlling the second CDN node to be offline. It should be noted that the current availability of the first CDN node is greater than or equal to the preset availability, the current operating state of the first CDN node is determined to be node availability, and an interface of an authorized DNS (Domain Name System) of the first CDN node is called, so that an IP record of the first CDN node is added, and an IP corresponding to the first CDN node is brought online; and judging that the current operating state of the second CDN node is unavailable, and calling an interface of an authorized DNS (domain name system) of the second CDN node, so as to delete the IP record of the second CDN node and offline the IP corresponding to the second CDN node. By intelligently controlling the first CDN node to be on line, adding the idle CDN node into the CDN node network and controlling the second CDN node to be off line, the fault CDN node is removed, high availability of CDN node service is guaranteed, a user does not need to manually report the fault CDN node, and user experience is greatly improved.
In an embodiment, the monitoring server sends the current availability of each CDN node to the node management server, and the node management server controls a plurality of CDN nodes to go online or offline based on the received current availability of each CDN node. It should be noted that the current availability of each CDN node is monitored by the monitoring server, and the calling of the authorized DNS of each CDN node is realized by the node management server, so that the automatic online and offline processing of the CDN nodes is completed, manual operations can be reduced, the operating efficiency of the server is improved, and the high availability of the CDN node service is ensured.
In one embodiment, the current available rate of the CDN node includes a first available rate, a second available rate, and/or a third available rate; determining whether the first available rate of each CDN node is greater than or equal to a first preset available rate, whether the second available rate is greater than or equal to a second preset available rate and whether the third available rate is greater than or equal to a third preset available rate; if the first availability ratio of one CDN node is greater than or equal to a first preset availability ratio, the second availability ratio is greater than or equal to a second preset availability ratio, and the third availability ratio is greater than or equal to a third preset availability ratio, judging the current availability ratio of the CDN node to be currently available; if the first availability of one CDN node is smaller than a first preset availability, the second availability is smaller than a second preset availability or the third availability is smaller than a third preset availability, judging that the current availability of the CDN node is unavailable currently.
It should be noted that the first availability corresponds to a network operating state of the CDN node, the second availability corresponds to a port operating state of the CDN node, and the third availability corresponds to a program operating state of the CDN node. When a first availability ratio of a CDN node is smaller than a first preset availability ratio, a second availability ratio is smaller than a second preset availability ratio or a third availability ratio is smaller than a third preset availability ratio, determining that a CDN node has a fault, and controlling the CDN node to be offline if the current operation state of the CDN node is that the node is unavailable; only when the first availability of one CDN node is greater than or equal to the first preset availability, the second availability is greater than or equal to the second preset availability and the third availability is greater than or equal to the third preset availability, determining that one CDN node is idle, wherein the current running state of the CDN node is node available, and the CDN node needs to be controlled to be on-line, so that the CDN node service is guaranteed to have higher availability, and the user experience is improved.
Referring to fig. 4, fig. 4 is a schematic view of a scenario for implementing the CDN node control method provided in this embodiment.
As shown in fig. 4, the node management server 30 sends the IP addresses of the CDN nodes to the monitoring server 20, and the monitoring server 20 generates a detection task of each CDN node according to the received IP addresses of the CDN nodes, where the detection task of the CDN node 10 encapsulates target IP addresses of the CDN node 11, the CDN node 12, and the CDN node 13 to be detected, and the detection task of the CDN node 10 includes the detection tasks of the CDN node 10, the CDN node 11, and the CDN node 13 to be detected; the monitoring server 20 sends the detection task of the CDN node 10 to the CDN node 10, where the CDN node 11, the CDN node 12, and the CDN node 13 also send corresponding detection tasks respectively; the CDN node 10 detects the CDN node 11, the CDN node 12, and the CDN node 13 according to the target IP addresses of the corresponding CDN node 11, the CDN node 12, and the CDN node 13, and returns detection data obtained by detecting the CDN node 11, the CDN node 12, and the CDN node 13 to the monitoring server 20, where the CDN node 11, the CDN node 12, and the CDN node 13 also return the detection data obtained by detection to the monitoring server 20; the monitoring server 20 determines the current availability rates of the CDN nodes 10, 11, 12, and 13 according to detection data returned by the CDN nodes 10, 11, 12, and 13 based on corresponding detection tasks; the monitoring server 20 controls the CDN nodes 10, 11, 12, and 13 to go online or offline according to the current availability of the CDN nodes 10, 11, 12, and 13, so as to ensure that the CDN node service has high availability.
The CDN node control method provided in the foregoing embodiment generates a probe task for each CDN node according to IP addresses of multiple CDN nodes, where each probe task encapsulates a target IP address of multiple CDN nodes to be probed; then sending each detection task to the corresponding CDN node so that each CDN node can detect a plurality of CDN nodes to be detected according to a plurality of corresponding target IP addresses; then determining the current availability of each CDN node according to detection data returned by each CDN node based on the corresponding detection task; and finally, controlling the plurality of CDN nodes to be online or offline according to the current available rate of each CDN node. According to the embodiment of the application, the CDN nodes are mutually detected, so that the availability of each CDN node is determined, the CDN nodes are intelligently controlled to be online or offline through the availability of each CDN node, node faults can be rapidly found, and high availability of CDN node service is guaranteed.
Referring to fig. 5, fig. 5 is a schematic block diagram of a CDN node control device according to an embodiment of the present disclosure.
As shown in fig. 5, the CDN node control device 200 includes: a generation module 201, a transmission module 202, a determination module 203 and a control module 204.
A generating module 201, configured to generate a detection task for each CDN node according to IP addresses of multiple CDN nodes, where each detection task encapsulates a target IP address of multiple CDN nodes to be detected;
a sending module 202, configured to send each detection task to a corresponding CDN node, so that each CDN node detects the multiple CDN nodes to be detected according to the corresponding multiple target IP addresses;
a determining module 203, configured to determine, according to probe data returned by each CDN node based on the corresponding probe task, a current availability of each CDN node;
and the control module 204 is configured to control the plurality of CDN nodes to go online or offline according to the current availability of each CDN node.
In one embodiment, the generation module 201 includes:
and the determining submodule is used for determining target IP addresses of a plurality of CDN nodes to be detected, which correspond to each CDN node, according to the IP addresses of the CDN nodes.
And the generation submodule is used for generating a detection task of each CDN node according to the target IP addresses of a plurality of CDN nodes to be detected, which correspond to each CDN node.
In one embodiment, the determination submodule is further operable to:
determining operator information and geographical position information corresponding to each CDN node according to the IP address of each CDN node;
and determining a plurality of target IP addresses of the CDN node to be detected, which corresponds to each CDN node, according to the operator information and the geographical position information which correspond to each CDN node.
In one embodiment, the determining module 203 is further configured to:
counting detection data returned by each CDN node based on the corresponding detection task to obtain the detection data of each target IP address;
and determining the current available rate of each CDN node according to the detection data of each target IP address.
In one embodiment, the detection data of the target IP address includes at least one of ping delay, packet loss rate, tcp connection result, and http request result; the determining module 203 is further configured to:
determining a first available rate of each CDN node according to ping delay and/or packet loss rate of each target IP address; and/or
Determining a second availability of each CDN node according to the tcp connection establishing result of each target address; and/or
Determining a third availability ratio of each CDN node according to an http request result of each target address;
and determining the current available rate of each CDN node through the first available rate, the second available rate and/or the third available rate of each CDN node.
In one embodiment, the determining module 203 is further configured to:
determining a first total number of ping delays for each of the destination IP addresses;
determining a first target number of target ping delays for each of the target IP addresses, wherein the target ping delays are less than or equal to a first preset threshold;
calculating a first available rate of each CDN node according to the first total quantity and the first target quantity of each target IP address; and/or
Determining a second total number of packet loss rates for each of the target IP addresses;
determining a second target number of target packet loss rates of each target IP address, wherein the target packet loss rate is less than or equal to a second preset threshold;
and calculating a first available rate of each CDN node according to the second total number and the second target number of each target IP address.
In one embodiment, the control module 204 is further configured to:
determining a first CDN node with the current availability ratio larger than or equal to a preset availability ratio from the current availability ratios of a plurality of CDN nodes, and controlling the first CDN node to be online; and/or
And determining a second CDN node with the current availability smaller than the preset availability from the current availability of the plurality of CDN nodes, and controlling the second CDN node to be offline.
It should be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the apparatus and each module and unit described above may refer to the corresponding processes in the foregoing CDN node control method embodiment, and details are not described here again.
The apparatus provided by the above embodiment may be implemented in a form of a computer program, and the computer program may be run on a server as shown in fig. 6.
Referring to fig. 6, fig. 6 is a schematic block diagram of a server according to an embodiment of the present disclosure. The server may be a single server or a server cluster including a plurality of servers.
For example, the server includes a monitoring server and a node management server, the monitoring server is configured to monitor a plurality of CDN nodes and send monitoring data obtained by monitoring the plurality of CDN nodes to the node management server, and the node management server is configured to manage and control the plurality of CDN nodes, and can perform intelligent control on the plurality of CDN nodes based on the monitoring data sent by the monitoring server, so that construction of a smart city can be promoted.
As shown in fig. 6, the server includes a processor, a memory, and a network interface connected by a system bus, wherein the memory may include a nonvolatile 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 CDN node control methods.
The processor is used for providing calculation and control capacity and supporting the operation of the whole server.
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 CDN node control methods.
The network interface is used for network communication, such as sending assigned tasks and the like. Those skilled in the art will appreciate that the architecture shown in fig. 6 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the servers to which the subject application applies, as a particular server may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that the Processor 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 implement the steps of:
generating a detection task of each CDN node according to the IP addresses of the CDN nodes, wherein each detection task is packaged with the target IP addresses of the CDN nodes to be detected;
sending each detection task to a corresponding CDN node so that each CDN node can detect the CDN nodes to be detected according to the corresponding target IP addresses;
determining the current availability of each CDN node according to detection data returned by each CDN node based on the corresponding detection task;
and controlling the plurality of CDN nodes to be online or offline according to the current available rate of each CDN node.
In an embodiment, when the processor generates a probing task for each CDN node according to the IP addresses of the CDN nodes, the processor is configured to:
determining target IP addresses of a plurality of CDN nodes to be detected, which correspond to each CDN node, according to the IP addresses of the CDN nodes;
and generating a detection task of each CDN node according to the target IP addresses of a plurality of CDN nodes to be detected, which correspond to each CDN node.
In an embodiment, when the processor determines, according to the IP addresses of the CDN nodes, target IP addresses of a plurality of CDN nodes to be detected that each of the CDN nodes corresponds to, the processor is configured to:
determining operator information and geographical position information corresponding to each CDN node according to the IP address of each CDN node;
and determining a plurality of target IP addresses of the CDN node to be detected, which corresponds to each CDN node, according to the operator information and the geographical position information which correspond to each CDN node.
In an embodiment, when the determining, according to the probe data returned by each CDN node based on the corresponding probe task, the current available rate of each CDN node is implemented, the processor is configured to:
counting detection data returned by each CDN node based on the corresponding detection task to obtain the detection data of each target IP address;
and determining the current available rate of each CDN node according to the detection data of each target IP address.
In one embodiment, the detection data of the target IP address includes at least one of ping delay, packet loss rate, tcp connection result, and http request result; the processor is configured to implement, when determining the current availability of each CDN node according to the probe data of each target IP address, that:
determining a first available rate of each CDN node according to ping delay and/or packet loss rate of each target IP address; and/or
Determining a second availability of each CDN node according to the tcp connection establishing result of each target address; and/or
Determining a third availability ratio of each CDN node according to an http request result of each target address;
and determining the current available rate of each CDN node through the first available rate, the second available rate and/or the third available rate of each CDN node.
In an embodiment, when the processor determines the first available rate of each CDN node according to the ping delay and/or the packet loss rate of each target IP address, the processor is configured to:
determining a first total number of ping delays for each of the destination IP addresses;
determining a first target number of target ping delays for each of the target IP addresses, wherein the target ping delays are less than or equal to a first preset threshold;
calculating a first available rate of each CDN node according to the first total quantity and the first target quantity of each target IP address; and/or
Determining a second total number of packet loss rates for each of the target IP addresses;
determining a second target number of target packet loss rates of each target IP address, wherein the target packet loss rate is less than or equal to a second preset threshold;
and calculating a first available rate of each CDN node according to the second total number and the second target number of each target IP address.
In an embodiment, when the processor controls the plurality of CDN nodes to go online or offline according to the current available rate of each CDN node, the processor is configured to:
determining a first CDN node with the current availability ratio larger than or equal to a preset availability ratio from the current availability ratios of a plurality of CDN nodes, and controlling the first CDN node to be online;
and determining a second CDN node with the current availability smaller than the preset availability from the current availability of the plurality of CDN nodes, and controlling the second CDN node to be offline.
It should be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the server described above may refer to the corresponding process in the foregoing CDN node control method embodiment, and details are not described here again.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, where the computer program includes program instructions, and a method implemented when the program instructions are executed may refer to various embodiments of the CDN node control method of the present application.
The computer-readable storage medium may be an internal storage unit of the server according to the foregoing embodiment, for example, a hard disk or a memory of the server. The computer readable storage medium may also be an external storage device of the server, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the server.
According to the IP addresses of a plurality of CDN nodes, generating a detection task of each CDN node, wherein each detection task encapsulates a target IP address of a plurality of CDN nodes to be detected; then sending each detection task to the corresponding CDN node so that each CDN node can detect a plurality of CDN nodes to be detected according to a plurality of corresponding target IP addresses; then determining the current availability of each CDN node according to detection data returned by each CDN node based on the corresponding detection task; and finally, controlling the plurality of CDN nodes to be online or offline according to the current available rate of each CDN node. According to the embodiment of the application, the CDN nodes are mutually detected, so that the availability of each CDN node is determined, the CDN nodes are intelligently controlled to be online or offline through the availability of each CDN node, the availability of CDN node service is greatly improved, and the construction of a smart city is promoted.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application 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 noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments. While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A CDN node control method is characterized by comprising the following steps:
generating a detection task of each CDN node according to the IP addresses of the CDN nodes, wherein each detection task is packaged with the target IP addresses of the CDN nodes to be detected;
sending each detection task to a corresponding CDN node so that each CDN node can detect the CDN nodes to be detected according to the corresponding target IP addresses;
determining the current availability of each CDN node according to detection data returned by each CDN node based on the corresponding detection task;
and controlling the plurality of CDN nodes to be online or offline according to the current available rate of each CDN node.
2. The CDN node control method of claim 1, wherein the generating a probe task for each CDN node according to the IP addresses of the CDN nodes comprises:
determining target IP addresses of a plurality of CDN nodes to be detected, which correspond to each CDN node, according to the IP addresses of the CDN nodes;
and generating a detection task of each CDN node according to the target IP addresses of a plurality of CDN nodes to be detected, which correspond to each CDN node.
3. The CDN node control method of claim 2, wherein the determining, according to the IP addresses of the CDN nodes, target IP addresses of a plurality of CDN nodes to be detected that each of the CDN nodes corresponds to includes:
determining operator information and geographical position information corresponding to each CDN node according to the IP address of each CDN node;
and determining a plurality of target IP addresses of the CDN node to be detected, which corresponds to each CDN node, according to the operator information and the geographical position information which correspond to each CDN node.
4. The CDN node control method of any of claims 1-3 wherein determining a current availability rate of each CDN node according to probe data returned by each CDN node based on the corresponding probe task comprises:
counting detection data returned by each CDN node based on the corresponding detection task to obtain the detection data of each target IP address;
and determining the current available rate of each CDN node according to the detection data of each target IP address.
5. The CDN node control method of claim 4 wherein the probe data for the target IP address comprises at least one of ping delay, packet loss rate, tcp connection result, http request result; the determining the current availability of each CDN node according to the probe data for each target IP address includes:
determining a first available rate of each CDN node according to ping delay and/or packet loss rate of each target IP address; and/or
Determining a second availability of each CDN node according to the tcp connection establishing result of each target address; and/or
Determining a third availability ratio of each CDN node according to an http request result of each target address;
and determining the current available rate of each CDN node through the first available rate, the second available rate and/or the third available rate of each CDN node.
6. The CDN node control method of claim 5, wherein the determining a first availability rate of each CDN node according to a ping delay and/or a packet loss rate of each target IP address comprises:
determining a first total number of ping delays for each of the destination IP addresses;
determining a first target number of target ping delays for each of the target IP addresses, wherein the target ping delays are less than or equal to a first preset threshold;
calculating a first available rate of each CDN node according to the first total quantity and the first target quantity of each target IP address; and/or
Determining a second total number of packet loss rates for each of the target IP addresses;
determining a second target number of target packet loss rates of each target IP address, wherein the target packet loss rate is less than or equal to a second preset threshold;
and calculating a first available rate of each CDN node according to the second total number and the second target number of each target IP address.
7. The CDN node control method of any of claims 1-3 wherein controlling the plurality of CDN nodes to go online or offline according to the current availability of each CDN node comprises:
determining a first CDN node with the current availability ratio larger than or equal to a preset availability ratio from the current availability ratios of a plurality of CDN nodes, and controlling the first CDN node to be online; and/or
And determining a second CDN node with the current availability smaller than the preset availability from the current availability of the plurality of CDN nodes, and controlling the second CDN node to be offline.
8. A CDN node control device, characterized by comprising:
the generation module is used for generating a detection task of each CDN node according to the IP addresses of the CDN nodes, wherein each detection task is packaged with the target IP addresses of the CDN nodes to be detected;
a sending module, configured to send each detection task to a corresponding CDN node, so that each CDN node detects the multiple CDN nodes to be detected according to the corresponding multiple target IP addresses;
the determining module is used for determining the current availability of each CDN node according to detection data returned by each CDN node based on the corresponding detection task;
and the control module is used for controlling the plurality of CDN nodes to be online or offline according to the current availability of each CDN node.
9. A server, characterized in that the server comprises a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the steps of the CDN node control method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, wherein the computer program, when executed by a processor, implements the steps of the CDN node control method of any one of claims 1 to 7.
CN202011133986.1A 2020-10-21 2020-10-21 CDN node control method, device, server and storage medium Withdrawn CN112261133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011133986.1A CN112261133A (en) 2020-10-21 2020-10-21 CDN node control method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011133986.1A CN112261133A (en) 2020-10-21 2020-10-21 CDN node control method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN112261133A true CN112261133A (en) 2021-01-22

Family

ID=74264494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011133986.1A Withdrawn CN112261133A (en) 2020-10-21 2020-10-21 CDN node control method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN112261133A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114285770A (en) * 2021-12-25 2022-04-05 即刻雾联科技(北京)有限公司 Full-link-detection-based pcdn node evaluation method and terminal
CN114430383A (en) * 2022-01-29 2022-05-03 北京百度网讯科技有限公司 Method and device for screening detection nodes, electronic equipment and storage medium
CN114745292A (en) * 2022-03-14 2022-07-12 优刻得科技股份有限公司 Edge container cloud detection method, device, equipment and storage medium
CN115277397A (en) * 2022-08-09 2022-11-01 北京有竹居网络技术有限公司 Method, apparatus and storage medium for controlling content server in content delivery network

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114285770A (en) * 2021-12-25 2022-04-05 即刻雾联科技(北京)有限公司 Full-link-detection-based pcdn node evaluation method and terminal
CN114285770B (en) * 2021-12-25 2022-09-23 即刻雾联科技(北京)有限公司 Full-link-detection-based pcdn node evaluation method, terminal and medium
CN114430383A (en) * 2022-01-29 2022-05-03 北京百度网讯科技有限公司 Method and device for screening detection nodes, electronic equipment and storage medium
CN114430383B (en) * 2022-01-29 2024-06-07 北京百度网讯科技有限公司 Detection node screening method and device, electronic equipment and storage medium
CN114745292A (en) * 2022-03-14 2022-07-12 优刻得科技股份有限公司 Edge container cloud detection method, device, equipment and storage medium
CN114745292B (en) * 2022-03-14 2023-09-05 优刻得科技股份有限公司 Edge container cloud detection method, device, equipment and storage medium
CN115277397A (en) * 2022-08-09 2022-11-01 北京有竹居网络技术有限公司 Method, apparatus and storage medium for controlling content server in content delivery network
CN115277397B (en) * 2022-08-09 2024-08-23 北京有竹居网络技术有限公司 Control method, equipment and storage medium for content server in content distribution network

Similar Documents

Publication Publication Date Title
CN112261133A (en) CDN node control method, device, server and storage medium
CN112087312B (en) Method, device and equipment for providing edge service
CN106656800B (en) Path selection method and system, network acceleration node and network acceleration system
CN107872402B (en) Global flow scheduling method and device and electronic equipment
CN109274707B (en) Load scheduling method and device
US20210337046A1 (en) Intelligent scheduling method, terminal device, edge node cluster and intelligent scheduling system
CN111459750A (en) Private cloud monitoring method and device based on non-flat network, computer equipment and storage medium
JP7313480B2 (en) Congestion Avoidance in Slice-Based Networks
CN109842566B (en) DNS (Domain name Server) analysis method and device
CN109787827B (en) CDN network monitoring method and device
JPH11338836A (en) Load distribution system for computer network
CN112351083B (en) Service processing method and network service system
CN113067875B (en) Access method, device and equipment based on dynamic flow control of micro-service gateway
CN112087382B (en) Service routing method and device
CN102984184A (en) A method and a device for service load balancing for a distributed system
CN109921925A (en) A kind of dial testing method and device
CN106341270A (en) Fault processing method and device
CN111556135A (en) Request scheduling method, system and device and electronic equipment
CN115242798A (en) Task scheduling method based on edge cloud, electronic equipment and storage medium
US20150277892A1 (en) Multi-phase software delivery
CN109413117B (en) Distributed data calculation method, device, server and computer storage medium
CN110380981B (en) Flow distribution method and equipment
CN115002117B (en) Dynamic scheduling method, system, equipment and storage medium for content distribution network
CN107743079B (en) Line detection method, apparatus and computer-readable storage medium
CN109347766A (en) A kind of method and device of scheduling of resource

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210122