CN109474484B - CDN (content delivery network) checking method, device and system - Google Patents

CDN (content delivery network) checking method, device and system Download PDF

Info

Publication number
CN109474484B
CN109474484B CN201710801005.8A CN201710801005A CN109474484B CN 109474484 B CN109474484 B CN 109474484B CN 201710801005 A CN201710801005 A CN 201710801005A CN 109474484 B CN109474484 B CN 109474484B
Authority
CN
China
Prior art keywords
inspection
checking
domain name
target domain
cdn node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710801005.8A
Other languages
Chinese (zh)
Other versions
CN109474484A (en
Inventor
李志明
王笑臣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710801005.8A priority Critical patent/CN109474484B/en
Publication of CN109474484A publication Critical patent/CN109474484A/en
Application granted granted Critical
Publication of CN109474484B publication Critical patent/CN109474484B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1458Denial of Service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

A CDN checking method, device and system includes: a CDN node server receives a checking task from a central server, wherein the checking task at least carries checking parameters of a target domain name; the CDN node server checks a source station under the target domain name according to the checking parameters to obtain a first checking result of the target domain name; and the CDN node server sends the first check result to the central server. The method and the device can at least effectively reduce the generation of DDOS attacks in the CDN check process.

Description

CDN (content delivery network) checking method, device and system
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method, an apparatus, and a system for checking a CDN.
Background
A Content Delivery Network (CDN) system, acting as an intermediate layer between a user and a source station, needs to check the source station to ensure that a request is forwarded to the source station that can normally provide a service. In the related art, CDN checking is performed by each node itself. However, since there are many CDN nodes and each CDN node is deployed with more than one server, checking back to the source by each server on each node will likely result in a Distributed Denial of Service (DDoS) attack on the source site. In order to solve the DDOS attack problem, the related art method increases the interval of the inspection, but this causes a problem that the inspection result is delayed seriously.
Disclosure of Invention
The present application is directed to solving at least one of the technical problems in the related art.
The application provides a CDN checking method, device and system, which can at least effectively reduce DDOS attacks generated in the CDN checking process.
The technical scheme is as follows:
a method of checking a content delivery network, CDN, the method comprising:
a CDN node server receives a checking task from a central server, wherein the checking task at least carries checking parameters of a target domain name;
the CDN node server checks a source station under the target domain name according to the checking parameters to obtain a first checking result of the target domain name;
and the CDN node server sends the first check result to the central server.
The method for checking the source station under the target domain name by the CDN node server according to the check parameter to obtain a first check result of the target domain name includes:
determining an inspection strategy according to the inspection parameters, wherein the inspection strategy is set with the following conditions: checking grade, checking time interval and state information for checking success or failure of checking;
according to the inspection strategy, performing inspection on the source station under the target domain name for multiple times at regular time;
and counting the inspection data of the source station under the target domain name to obtain the first inspection result.
Wherein the first inspection result comprises: and the IP address of the source station under the target domain name, and the checking times, the checking failure times and the checking duration corresponding to the IP address.
Wherein, the checking the source station under the target domain name includes: when the checking level is seven layers, state information of a source station under the target domain name is acquired through HEAD HEAD detection of a hypertext transfer protocol (HTTP), and the success or failure of checking is determined according to the state information; and when the checking level is four layers, detecting and acquiring the state information of the source station under the target domain name through a Transmission Control Protocol (TCP) data packet or a User Datagram Protocol (UDP) message, and determining whether the checking is successful or not according to the state information.
A CDN checking method comprises the following steps:
the central server generates a checking task according to a preset checking parameter of a target domain name and issues the checking task to the CDN node server;
and the central server receives the first check result from the CDN node server and performs statistical analysis to obtain a second check result of the target domain name.
Before generating an inspection task according to the preset inspection parameters of the target domain name, the method further includes: the inspection parameters input by the user are acquired from the user equipment.
Wherein the obtaining of the inspection parameter based on the user operation from the user equipment includes: pushing an interactive page for a user to input inspection parameters to the user equipment; and receiving the inspection parameters acquired by the user equipment through the interactive page.
Wherein the checking parameters are one or two of the following items:
four layers of inspection parameters;
seven layers of inspection parameters.
Wherein the checked parameters include at least:
domain name information;
checking the grade information;
checking a time interval;
checking how many times in succession the source station fails is considered to be non-serviceable.
Wherein, when the inspection parameter is a seven-layer inspection parameter, the inspection parameter further includes: a uniform resource locator, URL; information for verifying whether the response was successful.
Wherein the information for verifying whether the response is successful includes: a status code; and (6) digitally signing.
After the obtaining of the inspection parameter input by the user from the user equipment, the method further includes: storing the inspection parameters into a database; the generating of the inspection task according to the preset inspection parameters of the target domain name comprises: and inquiring the database for the inspection parameters and generating a corresponding inspection task.
Wherein the second inspection result comprises one or more of:
information of source stations that cannot provide a service;
information of source stations that can provide the service;
quality of service ranking information for source stations that may provide the service.
Wherein, still include: providing an application programming interface, API, to an external device, the API including at least one or more of:
the first API is used for inquiring a four-layer check result of the CDN node server under the name of the target domain;
the second API is used for inquiring a seven-layer check result of the CDN node server under the name of the target domain;
and the third API is used for inquiring the information of the source station which can provide the service under the target domain name at the set time.
After the second check result of the target domain name is obtained, the method further includes: storing a second checking result of the target domain name into a database; and querying the database for a second check result and providing the second check result to an external device through the API.
A CDN checking device is applied to a CDN node server; the inspection apparatus includes:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an inspection task from a central server, and the inspection task at least carries an inspection parameter of a target domain name;
the execution module is used for checking the source station under the target domain name according to the checking parameters to obtain a first checking result of the target domain name;
and the sending module is used for sending the first checking result to the central server.
A CDN node server comprising:
a memory storing a service agent program for performing CDN checks;
a processor configured to read the service agent to perform the following operations:
receiving an inspection task from a central server, wherein the inspection task at least carries an inspection parameter of a target domain name;
according to the inspection parameters, inspecting a source station under the target domain name to obtain a first inspection result of the target domain name;
and sending the first checking result to the central server.
A CDN checking device is applied to a central server; the inspection apparatus includes:
the task processing module is used for generating a checking task according to a preset checking parameter of a target domain name and sending the checking task to the CDN node server;
and the result processing module is used for receiving the first check result sent by the CDN node server and performing statistical analysis to obtain a second check result of the target domain name.
A central server, comprising:
a memory storing a central agent program for performing a CDN check;
a processor configured to read the central agent to perform the following operations:
generating a checking task according to a preset checking parameter of a target domain name, and issuing the checking task to a CDN node server;
and receiving a first check result from the CDN node server and performing statistical analysis to obtain a second check result of the target domain name.
A CDN checking method comprises the following steps:
the central server generates a checking task according to a preset checking parameter of a target domain name and issues the checking task to the CDN node server;
the CDN node server receives the inspection task from the central server, wherein the inspection task at least carries inspection parameters of a target domain name;
the CDN node server checks a source station under the target domain name according to the checking parameters to obtain a first checking result of the target domain name;
the CDN node server sends the first check result to the central server;
and the central server receives a first check result from the CDN node server and performs statistical analysis to obtain a second check result of the target domain name.
A CDN check system, comprising: the CDN node server comprises a central server and a CDN node server;
the central server is configured to generate a check task according to a preset check parameter of a target domain name, and issue the check task to the CDN node server; the CDN node server is configured to receive a first check result from the CDN node server and perform statistical analysis to obtain a second check result of the target domain name;
the CDN node server is configured to: receiving an inspection task from a central server, wherein the inspection task at least carries an inspection parameter of a target domain name; according to the inspection parameters, inspecting a source station under the target domain name to obtain a first inspection result of the target domain name; and sending the first checking result to the central server.
The application includes the following advantages:
on one hand, the checking of the source station corresponding to the CDN node can be completed only by installing the service agent program on any server in the CDN node, so that the influence of the checking on the source station can be greatly reduced, the DDOS attack phenomenon can be effectively avoided, and the CDN resources are greatly saved. In addition, since it is not necessary to set a relatively large check time interval in order to avoid DDOS attack, the check result can be validated in time.
On the other hand, the method and the device for checking the user equipment solve the problem that the checking strategy is single in the related technology by pushing the interactive page to the user equipment to obtain the checking parameters set by the user.
Of course, it is not necessary for any product to achieve all of the above-described advantages at the same time for the practice of the present application.
Drawings
Fig. 1 is a schematic flowchart illustrating an inspection method of a CDN according to an embodiment;
FIG. 2 is a flowchart illustrating a second CDN inspection method according to an embodiment;
fig. 3 is a schematic structural diagram of an inspection apparatus of a third CDN according to an embodiment;
FIG. 4 is a schematic diagram of an exemplary architecture of a four CDN node server according to an embodiment;
FIG. 5 is a schematic structural diagram of an inspection apparatus of a five CDN device according to an embodiment;
FIG. 6 is a schematic diagram of an exemplary architecture of a six-centric server according to an embodiment;
FIG. 7 is a flowchart illustrating a seven CDN inspection method according to an embodiment;
FIG. 8 is a schematic diagram of an exemplary architecture of an eight CDN inspection system according to an embodiment;
fig. 9 is a schematic diagram of an exemplary scenario in example 1.
Detailed Description
The technical solutions of the present application will be described in more detail below with reference to the accompanying drawings and embodiments.
It should be noted that, if not conflicted, the embodiments and the features of the embodiments can be combined with each other and are within the scope of protection of the present application. Additionally, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
In a typical configuration, a computing device of a client or server may include one or more processors (CPUs), input/output interfaces, network interfaces, and memory (memory).
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium. The memory may include module 1, module 2, … …, and module N (N is an integer greater than 2).
Computer readable media include both permanent and non-permanent, removable and non-removable storage media. A storage medium may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
In addition to the problems of DDOS attack, delay of the inspection result, and the like, the CDN inspection scheme in the related art has the following drawbacks: 1. for the seven-layer inspection condition, the URL configuration of different domain names needs to be completed manually on line by operation and maintenance personnel, so that the workload of the operation and maintenance personnel is large, the efficiency is low, and the fault is easily caused by the independent configuration of each domain name. 2. Since each server in the CDN node is responsible for checking, a relatively large pressure is applied to the server of the CDN node, and a lot of server resources are wasted. 3. The checking strategy can not be flexibly configured and is single, the personalized requirement of the user can not be met, and the checking strategy can not be adjusted in time according to different application scenes.
Aiming at the problems of the CDN checking scheme in the related technology, the CDN checking scheme provided by the application can at least effectively avoid DDOS attack and solve at least one or more of the defects.
The technical implementation of CDN checking in the present application is described in detail below.
Example one
The present embodiment provides a CDN checking method, which can be executed by a CDN node server. As shown in fig. 1, the method of this embodiment may include:
step 101, a CDN node server receives an inspection task from a central server, wherein the inspection task at least carries an inspection parameter of a target domain name;
102, the CDN node server checks a source station under the target domain name according to the check parameter to obtain a first check result of the target domain name;
step 103, the CDN node server sends the first check result to the central server.
In the related art, all servers in CDN nodes need to check a source station, for example, 40 machines per node for 20 nodes, and there are 800 machines to check the source station in total, which may cause a great stress on the source station and easily form a DDOS attack. In this embodiment, the check of the source station corresponding to the CDN node can be completed only by installing a service agent on any one of the servers in the CDN nodes, for example, 20 CDN nodes each having 40 servers, so that the method of this embodiment only needs 20 servers to check the source station, and therefore the method of this embodiment can greatly reduce the influence of the check on the source station, can effectively avoid DDOS attack, and greatly save CDN resources at the same time. In addition, the checking time interval does not need to be set too large, so that the checking result can be timely validated.
In this embodiment, the method may be implemented by setting a service agent on a CDN node server.
In this embodiment, the checking for the CDN means checking a source station configured by a user in the CDN to determine whether the corresponding source station can return to the source, so as to ensure that the returning from the CDN node server to the corresponding source station can be performed normally. In particular, the check performed on the source station may be a health check by which it may be determined whether the source station is able to provide the service normally.
In this embodiment, the check for the CDN can be divided into two types: four-layer inspection and seven-layer inspection. The four-layer check is to detect a Transmission Control Protocol (TCP) and/or a User Datagram Protocol (UDP) in a fourth layer, i.e., a transport layer, in a network seven-layer Protocol (OSI) model, that is, to check whether TCP connection or UDP communication between the CDN node server and the source station meets a predetermined standard, and the source station can normally provide a service under the predetermined standard. The seven-layer check is to detect a HyperText Transfer Protocol (HTTP) in the seventh layer, i.e., the application layer, in an Open System Interconnection (OSI) model, that is, to check whether HTTP communication between the CDN node server and the source station meets a predetermined standard under which the source station can normally provide services. The method in this embodiment may be implemented by any CDN node server in each CDN node. In practical applications, the service agent may be installed in advance on any CDN node server on each CDN node. Of course, the service agent program may also be installed on two or more CDN node servers in the CDN node according to actual needs, and for this, the service agent program may be flexibly set according to actual needs, which is not limited in this embodiment.
In this embodiment, the process of performing the check may be performed in various ways. In one implementation, the detecting, according to the inspection parameter, each source station under the target domain name to obtain a first inspection result of the target domain name may include: according to the inspection parameters, determining an inspection strategy, wherein the inspection strategy is set with the following conditions: checking grade, checking time interval and state information for checking success or failure of checking; according to the inspection strategy, performing inspection detection on the corresponding source station under the target domain name for multiple times at regular time; and counting the inspection detection data of the corresponding source station under the target domain name to obtain the first inspection result. In practical applications, the step 102 may also be performed in other manners, and the application is not limited to the specific implementation process or the implementation manner.
In this embodiment, the inspection detection may be performed in different manners for different inspection levels. That is, the performing of the inspection probe on the corresponding source station under the target domain name may include: when the inspection level is seven layers of inspection, acquiring state information of a corresponding source station under the target domain name through HTTP HEAD detection, and determining whether the inspection is successful or failed according to the state information; and when the inspection level is four-layer inspection, acquiring the state information of the corresponding source station under the target domain name through TCP data packet or UDP message detection, and determining whether the inspection of the detection is successful or not according to the state information. It should be noted that the specific implementation manner or implementation procedure of the inspection and detection is not limited thereto. If there are other levels of inspection in addition to the four-layer inspection and the seven-layer inspection, the inspection probes may be performed in a manner corresponding to the level of inspection.
In this embodiment, the first check result may include: domain name information of the target domain name; and the IP address of each source station under the target domain name, and the checking detection times, the checking failure times and the checking duration corresponding to the IP address. Here, the number of failed checks is the number of failed checks corresponding to the check probe. The length of time used for the inspection is the total time taken to specify the number of inspection probes. The domain name information may be a domain name or other information that may be used to identify a domain name.
For example, the CDN node server may report the first check result every 1 minute. The first inspection result may include: identity of CDN node server (cnxxx), domain name (test. cd n. com), task ID (12345), result item of three source stations (result), where the result item of source station 1 includes the following information: the source station IP address (110.22.33.1), performed 12 checks a minute, failed 3 checks, and performed 12 checks for a total of 500 milliseconds. The result item of the source station 2 includes the following information: the source station IP address (110.22.33.2), performed 12 checks a minute, failed 0 checks occurred, and the total time taken to perform these checks was 200 milliseconds. The result item of the source station 3 includes the following information: the source station IP address (110.22.33.3), performed 12 checks a minute, had 0 check failures, and took 100 milliseconds to perform 12 checks.
Example two
The present embodiment provides a CDN checking method, as shown in fig. 2, the method may include:
step 201, a central server generates a check task according to a preset check parameter of a target domain name, and issues the check task to a CDN node server;
step 202, the central server receives the first check result from the CDN node server and performs statistical analysis to obtain a second check result of the target domain name.
In this embodiment, the first check results obtained by each CDN node server are collected and subjected to statistical analysis to obtain the second check results under each domain name, and the second check results are provided to the outside through the API, so that the quality of service of the source station under each domain name can be accurately and quickly determined, the source station that cannot provide service or has poor quality of service is timely found, and a quick response is given to the outside (such as a CDN system, or a device or system for managing the CDN source station), so that the source station that cannot provide service or has a poor service effect is quickly avoided, and the stability of the service of the whole CDN system is improved.
In this embodiment, the above method of this embodiment may be implemented by setting a central agent program for performing CDN check in the central server.
In this embodiment, an Application Programming Interface (API) may be provided externally, so that an external device (e.g., a user device, a third-party device, etc.) queries the first inspection result and/or the second inspection result by calling the API. In one implementation, the API may be provided by the central agent.
In this embodiment, before generating the inspection task according to the preset inspection parameter of the target domain name, the method may further include: the inspection parameters input by the user are acquired from the user equipment. Therefore, the user equipment can provide the setting function of the inspection parameters for the user, and the inspection parameters can be flexibly set.
In this embodiment, there are various ways to obtain the inspection parameters. In one implementation, the obtaining, from the user equipment, the inspection parameter based on the user operation may include: pushing an interactive page for a user to input inspection parameters to the user equipment; and receiving the inspection parameters acquired by the user equipment through the interactive page. Therefore, through the interactive page, the user, the operation and maintenance personnel, the developer and the like can flexibly set the inspection parameters. In the related technology, in the CDN checking process, a developer needs to deliver a change according to a user requirement, and an operation and maintenance person performs upgrade online configuration. In the embodiment, users, operation and maintenance personnel, developers and the like can directly set the inspection parameters through interactive pages, so that the configuration efficiency of the inspection parameters is greatly improved, the workload of technical personnel is reduced, the flexible inspection parameter setting can enable the inspection strategy during the inspection to be more flexible, the problem of single inspection strategy in the related technology is solved, the problem that the URL needs to be manually configured on line during seven-layer inspection in the related technology is also solved, the configuration efficiency of the inspection parameters is greatly improved, the personalized requirements of the users can be met, and the operation and maintenance personnel can also adjust the inspection parameters in real time according to the actual operation and maintenance or development needs.
For example, the following interactive items (but not limited thereto) may be included on the interactive page: the user may set the check parameters by filling in the name of the domain, checking whether the check is a four-layer check or a seven-layer check, filling in the URL of a seven-layer check, setting the check time interval, considering the source station as unserviceable for how many times the check fails, etc. accordingly, the user may set the check parameters by writing in the name of the domain, checking whether the check is a four-layer check or a seven-layer check, and the like.
In this embodiment, the checking parameter may be at least one or two of the following (but is not limited thereto): four layers of inspection parameters; seven layers of inspection parameters. Here, the checking parameters may include at least: domain name information, i.e., information identifying a domain name; inspection level information (e.g., four-layer inspection, seven-layer inspection); checking a time interval; checking how many times in succession the source station fails is considered to be non-serviceable. When the inspection parameter is a seven-layer inspection parameter, the inspection parameter may further include: uniform Resource Locator (URL); information for verifying whether the response was successful. Here, the information for verifying whether the response is successful may be one or both of: status codes, i.e. for seven-layer checks it can be set which status codes respond to a check is successful; and (6) digitally signing. For example, the digital signature may be the MD5 value of check Body (a seven-layer check is considered successful only if the MD5 of the source station response is consistent).
In this embodiment, after obtaining the inspection parameter input by the user from the user equipment, the method may further include: storing the inspection parameters into a database; the generating of the inspection task according to the preset inspection parameter of the target domain name may include: and inquiring the database for the inspection parameters and generating a corresponding inspection task.
The inspection tasks in this embodiment are exemplified as follows:
for example, for the domain name test.cd.com, the related personnel sets a checking time interval to be 5S on the interactive page, if the checking fails for 3 times, the source station is considered to be unable to provide service, seven layers of checking are selected, the URL is filled in http:// test.cd.com/health _ check, and the status code of the successful response of the checking is filled in 200, then the generated checking task may include the following information: com, check interval (5s), check failure times as source station unavailable service (3), seven-layer check or four-layer check (level7), health check URL (test)http://test.cdn.com/ health_check)Status code (200), task ID (12345).
In this embodiment, the method may further include: providing an API to the external device, the API being configured to provide the first and/or second inspection results to the external device.
In this embodiment, one, two or more APIs may be provided according to actual needs. For example, the API may include at least one or more of: the first API is used for inquiring a four-layer check result of the CDN node server under the name of the target domain; the second API is used for inquiring a seven-layer check result of the CDN node server under the name of the target domain; and the third API is used for inquiring the information of the source station which can provide the service under the target domain name at the set time. In this embodiment, the API may be an HTTP query interface. Of course, other types of query interfaces are possible, and the application is not limited.
In one implementation, the API may be provided by a central agent program located on a central server.
In this embodiment, after obtaining the second check result of the target domain name, the method may further include: storing a second checking result of the target domain name into a database; and querying the database for a second check result and providing the second check result to an external device through the API.
For example, the process of querying the database for the second inspection result and providing the second inspection result to the external device through the API may include: the central agent program receives a query request of external equipment through the API; the central agent program queries a corresponding second check result from a database according to the query condition in the query request; and the central agent program provides the inquired second check result to the external equipment through the API.
In this embodiment, the second check result is used to indicate the service quality of the source station under different domain names, and the second check result may include at least one or more of the following (but is not limited to this): information of source stations that cannot provide a service; information of source stations that can provide the service; quality of service ranking information for source stations that may provide the service. That is, the second inspection result may include: which source stations under a certain domain name or domain names can not provide service, which source stations can provide service with the best quality of service, and the like.
For example, the first check result provided by the CDN node server may include the following information: identity of CDN node server (cnxxx), domain name (test. cd n. com), task ID (12345), result item of three source stations (result), where the result item of source station 1 includes the following information: the source station IP address (110.22.33.1), 12 checks performed a minute, 3 failures to check, and a total time to perform these checks of 500 milliseconds. The result item of the source station 2 includes the following information: the source station IP address (110.22.33.2), 12 checks performed a minute, 0 checks failed, a total time taken to perform these checks of 200 milliseconds. The result item of the source station 3 includes the following information: the source station IP address (110.22.33.3), 12 checks performed a minute, 0 checks failed, and a total of 100 milliseconds to perform these checks.
After obtaining the first check result, the central server analyzes the following second check result according to the check parameters (if the check fails for 3 times continuously, the source station is regarded as not providing service): source station 110.22.33.1 may not be providing service and source station 110.22.33.2 and source station 110.22.33.3 may be providing service normally while a total of 100 milliseconds are consumed by 12 requests from source station 110.22.33.3, indicating that the quality of service at source station 110.22.33.3 is best. The central server provides the second check result to the CDN system, which removes source station 110.22.33.1 and preferentially selects source station 110.22.33.2 and source station 110.22.33.3 as source stations and preferentially adjusts more back-source traffic to source station 110.22.33.3. Therefore, the CDN system can rapidly avoid the source station which cannot be served, and simultaneously return more flow to the source station with the best effect, thereby improving the service quality of the whole CDN system.
EXAMPLE III
The embodiment provides a device for realizing CDN check, which is applicable to a CDN node server; as shown in fig. 3, the apparatus may include:
a receiving module 31, configured to receive an inspection task from a central server, where the inspection task at least carries an inspection parameter of a target domain name;
the execution module 32 is configured to inspect a source station under the target domain name according to the inspection parameter, so as to obtain a first inspection result of the target domain name;
a sending module 33, configured to send the first inspection result to the central server.
In this embodiment, the receiving module 31 and the sending module 33 are parts responsible for communication with the central server, and may be software, hardware, or a combination of the two, respectively;
in this embodiment, the execution module 32 is responsible for sending a message to each source station under a certain domain name or a certain domain name to execute the check probe, and may be software, hardware, or a combination of the two.
The device for implementing CDN check in this embodiment may be, but is not limited to, any one CDN node server disposed in different CDN nodes, and the server may be any computing device that can be applied to a CDN. In one implementation, the receiving module 31, the sending module 33, and the executing module 32 may be functional modules that are implemented by the CDN node server through execution of a service agent.
Other implementation details of the present embodiment can refer to embodiment one.
Example four
A CDN node server, as shown in fig. 4, may include:
a memory 41 storing a service agent program for realizing CDN check;
a processor 42 configured to read the service agent to perform the following operations:
receiving an inspection task from a central server, wherein the inspection task at least carries an inspection parameter of a target domain name;
according to the inspection parameters, inspecting a source station under the target domain name to obtain a first inspection result of the target domain name;
and sending the first checking result to the central server.
The CDN node server of the present embodiment may be embodied as any computing device that can be applied to a CDN.
Other implementation details of the present embodiment can refer to embodiment one.
EXAMPLE five
A device for realizing CDN check can be applied to a central server; as shown in fig. 5, the apparatus may include:
the task processing module 51 is configured to generate an inspection task according to a preset inspection parameter of the target domain name, and issue the inspection task to the CDN node server;
the result processing module 52 may be configured to receive the first check result sent by the CDN node server, perform statistical analysis, and obtain a second check result of the target domain name.
The device for implementing CDN check in the present embodiment may be, but is not limited to, disposed in a central server, where the central server may be any computing device capable of implementing the above functions. In one implementation, the task processing module 51 and the result processing module 52 may be functional modules implemented by the central server through execution of a central agent program.
For details of other implementations of this embodiment, reference may be made to embodiment two.
EXAMPLE six
A central server, as shown in fig. 6, may include:
a memory 61 storing a central agent program for performing CDN checks;
a processor 62 configured to read the central agent to perform the following operations:
generating a checking task according to a preset checking parameter of a target domain name, and issuing the checking task to a CDN node server;
and receiving a first check result from the CDN node server and performing statistical analysis to obtain a second check result of the target domain name.
In one implementation, the central server may further provide an API to the outside through the central agent, where the API is configured to provide the second inspection result to the external device.
The central server of the present embodiment may be embodied as any computing device capable of implementing the above-described functions.
For details of other implementations of this embodiment, reference may be made to embodiment two.
EXAMPLE seven
A CDN checking method, as shown in fig. 7, the method in this embodiment may include:
step 701, a central server generates a check task according to a preset check parameter of a target domain name, and issues the check task to a CDN node server;
step 702, a CDN node server receives the inspection task from a central server, where the inspection task at least carries an inspection parameter of a target domain name;
step 703, the CDN node server checks the source station under the target domain name according to the check parameter to obtain a first check result of the target domain name;
step 704, the CDN node server sends the first check result to a central server;
step 705, the central server receives the first check result from the CDN node server and performs statistical analysis to obtain a second check result of the target domain name.
In this embodiment, the method may be implemented by setting the agent programs on the central server and the CDN node server, respectively. In an implementation manner, a central agent program may be set in a central server, and a service agent program may be set in a CDN node server, where the central server implements the method by executing the central agent program, and the CDN node server implements the method by executing the service agent program.
In this embodiment, the central server may further provide an API to the outside, so that the external device calls the API to query the first inspection result and/or the second inspection result. In one implementation, the API may be provided externally by the central agent.
The central server of the present embodiment may be embodied as any computing device capable of implementing the above-described functions. The CDN node server of the present embodiment may be embodied as any computing device capable of implementing the above-described functions.
For further implementation details of this embodiment, reference may be made to embodiment one and embodiment two.
Example eight
A system for implementing CDN check, as shown in fig. 8, may include: a central server 81 and a CDN node server 82; wherein the content of the first and second substances,
the central server 81 is configured to generate an inspection task according to a preset inspection parameter of a target domain name, and issue the inspection task to the CDN node server 82; the CDN node server is configured to receive a first check result from the CDN node server and perform statistical analysis to obtain a second check result of the target domain name;
the CDN node server 82 is configured to: receiving an inspection task from a central server, wherein the inspection task at least carries an inspection parameter of a target domain name; according to the inspection parameters, inspecting a source station under the target domain name to obtain a first inspection result of the target domain name; the first inspection result is sent to the central server 81.
As shown in fig. 8, there may be a plurality of CDN node servers 82, and each CDN node server 82 belongs to a different CDN node (CDN node1, … …, CDN node n) in the CDN network. As shown in fig. 8, each CDN node (CDN node1, … …, CDN node n) may include a plurality of CDN node servers, and each CDN node may communicate with each source station under a different domain name, where the source stations communicated by different CDN nodes are different. In the exemplary architecture shown in fig. 8, CDN node1 communicates with source station 1 and CDN node n communicates with source station n. Wherein n is an integer of not less than 2.
As shown in fig. 8, a service agent 821 may be provided on the CDN node server 82, a central agent 811 may be provided on the central server 81, the CDN node server 82 may implement the above-mentioned functions by executing the server agent 821, and the central server 81 may implement the above-mentioned functions by executing the central agent 811.
In one implementation, the central server 81 may further provide an API to the outside by the central agent, where the API is configured to provide the second inspection result and/or the first inspection result to the external device.
The central server 81 of the present embodiment may be embodied as any computing device capable of implementing the above functions. The CDN node server 82 of the present embodiment may be embodied as any computing device capable of implementing the functionality described above.
The above system of this embodiment may further include: a database 83, in communication with the central server 81, configured to store the inspection parameters, the inspection tasks, and the second inspection results.
For further implementation details of this embodiment, reference may be made to embodiment one and embodiment two.
Example nine
A computer readable storage medium having stored thereon a service agent program which, when executed by a processor, performs the steps of the CDN checking method of an embodiment.
Example ten
A computer readable storage medium having stored thereon a central agent program which, when executed by a processor, performs the steps of the CDN checking method of embodiment two.
Exemplary implementations of the above embodiments are described in detail below. It should be noted that the following examples may be combined with each other. In addition, the flow, the execution process, and the like in the following examples may also be adjusted according to the needs of the actual application. In addition, in practical applications, the above embodiments may also have other implementations, and the present disclosure is not limited thereto.
Example 1
This example details an exemplary architecture of a CDN health check system and its health check process.
Fig. 9 is a schematic diagram of an exemplary application scenario of the present example. The exemplary application scenario includes a CDN health check system, where the CDN health check system includes a CDN system of each CDN node (node _1, … …, node _ n node, n is an integer not less than 1), and each source station (source station 1, … …, source station n) corresponding to each CDN node. The CDN health check system is configured to perform health check on the CDN system and provide the health check result for the CDN system, so that the CDN system can rapidly avoid a source station which cannot provide service or has a poor service effect according to the health check result, and the service stability of the whole CDN system is improved.
As shown in fig. 9, the CDN health check system in this example includes: a user console (corresponding to the interactive page), a database, a central server, a central agent program installed on the central server, and a CDN node server (not shown) installed with service agent programs in different CDN nodes.
Wherein, the console is configured to provide an operation interface for a user, acquire health examination parameters submitted by the user and send the health examination parameters to the central server. For example, the console may be an interactive component presented via a web page or other similar format, where a user may set the following: checking a 4-layer health check option or a 7-layer health check option, setting a health check time interval, setting conditions that the source station is not serviceable (for example, setting how many times of check failures are continuous to consider that the source station is not serviceable), and filling in a 7-layer health check URL when checking the 7-layer health check option.
In this example, the central server may be configured to generate a health check task according to the health check parameters sent by the console, and store the health check task in the database.
In this example, the central agent program may run on a central server. The central agent program is configured to inquire the health check tasks to the database and distribute the health check tasks to each service agent program, collect the first health check results fed back by each service agent program, perform statistical analysis to obtain the final second health check results, and store the second health check results in the database. For example, the central agent program analyzes and processes the health examination results fed back by each health examination service agent program, and obtains a domain name + node level four-layer health examination result, a domain name + node level seven-layer health examination result, and a domain name + node level other health examination result, and stores the results into the database.
In this example, each service agent program is configured to execute the health check task and return the obtained health check result to the central agent program.
In this example, the database stores at least the health check parameters and the second health check results. In addition, the central server may also store the first health check result and the health check task in a database. Here, the first health check result may include a domain name + node level four-layer health check result, a domain name + node level seven-layer health check result, a domain name + node level other health check result. The second health check result may include: information of source stations that cannot provide a service; information of source stations that can provide the service; quality of service ranking information for source stations that may provide the service. That is, the second health check result may include: which source stations under a certain domain name or domain names can not provide service, which source stations can provide service with the best quality of service, and the like.
In this example, the central agent program is externally provided with various APIs, and an external device (such as a device in the CDN system or a device for managing the CDN source site) can query the database for the second health check result and the first health check result by using the central agent program through these APIs. For example, the API provided by the central agent program may include: the interface is used for obtaining the health check result of the four layers at the domain name + node level, the interface is used for obtaining the health check result of the seven layers at the domain name + node level, the interface is used for obtaining the condition of the available source stations of each domain name at a certain moment of each CDN node (namely, which source stations can provide service and which source stations have the best service quality), and the interface is used for obtaining other health check results of each CDN node. In actual application, more APIs can be added or part of APIs can be deleted according to needs.
The system of the embodiment can solve the problems of DDOS attack on the source station, serious delayed health check result, single health check strategy, waste of server resources and the like in the CDN health check scheme of the related technology.
Example 2
This example details an exemplary implementation of CDN health check.
(1) And (3) generating a health check strategy:
step 1: the user and the administrator can set health check parameters on an interactive page, (for example, four-layer health check or seven-layer health check is selected, health check time interval is defined, health check failure is regarded as that the source station can not provide service for several times continuously, URL of seven-layer health check, status code, domain name and the like) and the user equipment sends the health check parameters to the central server;
step 2: the central server records the health examination parameters to a database;
and step 3: and the central server generates corresponding health examination tasks according to the health examination parameters submitted by the users by using the central agent program.
(2) The flow of health examination:
step 1: the central server issues all health check tasks to CDN node servers provided with service agent programs in each CDN node by using the central agent program;
for example, node1 in fig. 9, node1 in fig. 9 is a CDN node, and one CDN node includes a plurality of CDN node servers, and each CDN node server in the related art needs to perform health check.
Step 2: the service agent program of the CDN node server analyzes the received health check task, obtains the health check parameters of each domain name, and performs health check on each source station under the corresponding domain name according to the corresponding health check parameters to obtain a first health check result;
and step 3: and the service agent program of each CDN node server uploads the first health check result of each domain name to the central server in a task mode.
And 4, step 4: and the central server analyzes each first health check result, acquires the final health check condition corresponding to each CDN node under each domain name, analyzes and counts the first health check result, obtains a second health check result and writes the second health check result into the database.
(3) And (3) generating a health examination result: the health check center provides various Resful Api agent services, and generates APIs respectively used for inquiring different health check results for different services.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits. Accordingly, each module/unit in the above embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present application is not limited to any specific form of hardware or software combination.
There are, of course, many other embodiments of the invention that can be devised without departing from the spirit and scope thereof, and it will be apparent to those skilled in the art that various changes and modifications can be made herein without departing from the spirit and scope of the invention.

Claims (21)

1. A method for checking a Content Delivery Network (CDN), the method comprising:
a CDN node server provided with a service agent program in a CDN node receives an inspection task from a central server, wherein the inspection task at least carries an inspection parameter of a target domain name;
the CDN node server checks a source station under the target domain name according to the checking parameters to obtain a first checking result of the target domain name;
and the CDN node server sends the first check result to the central server.
2. The checking method according to claim 1, wherein the CDN node server checks the source station under the target domain name according to the check parameter to obtain a first check result of the target domain name, including:
determining an inspection strategy according to the inspection parameters, wherein the inspection strategy is set with the following conditions: checking grade, checking time interval and state information for checking success or failure of checking;
according to the inspection strategy, performing inspection on the source station under the target domain name for multiple times at regular time;
and counting the inspection data of the source station under the target domain name to obtain the first inspection result.
3. The inspection method according to claim 1 or 2, characterized in that the first inspection result comprises:
and the IP address of the source station under the target domain name, and the checking times, the checking failure times and the checking duration corresponding to the IP address.
4. The method according to claim 3, wherein the inspecting the source station under the target domain name comprises:
when the checking level is seven layers, state information of a source station under the target domain name is acquired through HEAD HEAD detection of a hypertext transfer protocol (HTTP), and the success or failure of checking is determined according to the state information;
and when the checking level is four layers, detecting and acquiring the state information of the source station under the target domain name through a Transmission Control Protocol (TCP) data packet or a User Datagram Protocol (UDP) message, and determining whether the checking is successful or not according to the state information.
5. A CDN checking method is characterized by comprising the following steps:
the central server generates a checking task according to a preset checking parameter of a target domain name, and issues the checking task to a CDN node server provided with a service agent program in a CDN node;
and the central server receives the first check result from the CDN node server and performs statistical analysis to obtain a second check result of the target domain name.
6. The inspection method according to claim 5, wherein before generating the inspection task according to the preset inspection parameters of the target domain name, the method further comprises:
the inspection parameters input by the user are acquired from the user equipment.
7. The inspection method according to claim 6, wherein the obtaining of the inspection parameters based on the user operation from the user equipment comprises:
pushing an interactive page for a user to input inspection parameters to the user equipment;
and receiving the inspection parameters acquired by the user equipment through the interactive page.
8. The inspection method according to any one of claims 5 to 7,
the checking parameters are one or two of the following items:
four layers of inspection parameters;
seven layers of inspection parameters.
9. The inspection method according to claim 8,
the parameters examined include at least:
domain name information;
checking the grade information;
checking a time interval;
checking how many times in succession the source station fails is considered to be non-serviceable.
10. The inspection method according to claim 8, wherein when the inspection parameter is a seven-layer inspection parameter, the inspection parameter further comprises:
a uniform resource locator, URL;
information for verifying whether the response was successful.
11. The checking method according to claim 10, wherein the information for verifying whether the response is successful comprises:
a status code;
and (6) digitally signing.
12. The inspection method according to claim 6,
after the obtaining of the inspection parameters input by the user from the user equipment, the method further includes: storing the inspection parameters into a database;
the generating of the inspection task according to the preset inspection parameters of the target domain name comprises: and inquiring the database for the inspection parameters and generating a corresponding inspection task.
13. The inspection method of claim 5, wherein the second inspection result comprises one or more of:
information of source stations that cannot provide a service;
information of source stations that can provide the service;
quality of service ranking information for source stations that may provide the service.
14. The inspection method according to claim 5, further comprising:
providing an application programming interface, API, to an external device, the API including at least one or more of:
the first API is used for inquiring a four-layer check result of the CDN node server under the name of the target domain;
the second API is used for inquiring a seven-layer check result of the CDN node server under the name of the target domain;
and the third API is used for inquiring the information of the source station which can provide the service under the target domain name at the set time.
15. The inspection method according to claim 14,
after the second check result of the target domain name is obtained, the method further includes: storing a second checking result of the target domain name into a database;
and querying the database for a second check result and providing the second check result to an external device through the API.
16. A CDN check device is characterized in that the device is applied to a CDN node server provided with a service agent program in a CDN node; the inspection apparatus includes:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an inspection task from a central server, and the inspection task at least carries an inspection parameter of a target domain name;
the execution module is used for checking the source station under the target domain name according to the checking parameters to obtain a first checking result of the target domain name;
and the sending module is used for sending the first checking result to the central server.
17. A CDN node server comprising:
a memory storing a service agent program for performing CDN checks;
a processor configured to read the service agent to perform the following operations:
receiving an inspection task from a central server, wherein the inspection task at least carries an inspection parameter of a target domain name;
according to the inspection parameters, inspecting a source station under the target domain name to obtain a first inspection result of the target domain name;
and sending the first checking result to the central server.
18. The CDN checking device is characterized by being applied to a central server; the inspection apparatus includes:
the task processing module is used for generating a checking task according to a preset checking parameter of a target domain name and sending the checking task to a CDN node server provided with a service agent program in a CDN node;
and the result processing module is used for receiving the first check result sent by the CDN node server and performing statistical analysis to obtain a second check result of the target domain name.
19. A central server, comprising:
a memory storing a central agent program for performing a CDN check;
a processor configured to read the central agent to perform the following operations:
generating a checking task according to a preset checking parameter of a target domain name, and issuing the checking task to a CDN node server provided with a service agent program in a CDN node;
and receiving a first check result from the CDN node server and performing statistical analysis to obtain a second check result of the target domain name.
20. A CDN checking method is characterized by comprising the following steps:
the central server generates a checking task according to a preset checking parameter of a target domain name, and issues the checking task to a CDN node server provided with a service agent program in a CDN node;
the CDN node server receives the inspection task from the central server, wherein the inspection task at least carries inspection parameters of a target domain name;
the CDN node server checks a source station under the target domain name according to the checking parameters to obtain a first checking result of the target domain name;
the CDN node server sends the first check result to the central server;
and the central server receives a first check result from the CDN node server and performs statistical analysis to obtain a second check result of the target domain name.
21. A CDN check system, comprising: the central server and the CDN node server are provided with a service agent program;
the central server is configured to generate a check task according to a preset check parameter of a target domain name, and issue the check task to the CDN node server; the CDN node server is configured to receive a first check result from the CDN node server and perform statistical analysis to obtain a second check result of the target domain name;
the CDN node server is configured to: receiving an inspection task from a central server, wherein the inspection task at least carries an inspection parameter of a target domain name; according to the inspection parameters, inspecting a source station under the target domain name to obtain a first inspection result of the target domain name; and sending the first checking result to the central server.
CN201710801005.8A 2017-09-07 2017-09-07 CDN (content delivery network) checking method, device and system Active CN109474484B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710801005.8A CN109474484B (en) 2017-09-07 2017-09-07 CDN (content delivery network) checking method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710801005.8A CN109474484B (en) 2017-09-07 2017-09-07 CDN (content delivery network) checking method, device and system

Publications (2)

Publication Number Publication Date
CN109474484A CN109474484A (en) 2019-03-15
CN109474484B true CN109474484B (en) 2022-04-26

Family

ID=65657572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710801005.8A Active CN109474484B (en) 2017-09-07 2017-09-07 CDN (content delivery network) checking method, device and system

Country Status (1)

Country Link
CN (1) CN109474484B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851269A (en) * 2019-10-17 2020-02-28 上海易点时空网络有限公司 Optimization method, device, equipment and storage medium for load balancing of Linux virtual server
WO2021237612A1 (en) * 2020-05-28 2021-12-02 深圳市欢太科技有限公司 Health check method and apparatus, electronic device and storage medium
CN113010410A (en) * 2020-12-08 2021-06-22 云智慧(北京)科技有限公司 Method and system for monitoring and evaluating CDN performance based on backbone network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136969B (en) * 2011-02-17 2013-04-10 北京蓝汛通信技术有限责任公司 Method, device and system for probing link quality
CN102932466B (en) * 2012-11-07 2015-09-23 网宿科技股份有限公司 The distributed source method for supervising of content-based distributing network and system
CN104410691B (en) * 2014-11-27 2018-06-08 网宿科技股份有限公司 A kind of website accelerated method and system based on content distributing network
US20170149821A1 (en) * 2015-11-25 2017-05-25 Le Holdings (Beijing) Co., Ltd. Method And System For Protection From DDoS Attack For CDN Server Group

Also Published As

Publication number Publication date
CN109474484A (en) 2019-03-15

Similar Documents

Publication Publication Date Title
US11159450B2 (en) Nonintrusive dynamically-scalable network load generation
CN110096659B (en) Page display method, device and equipment and readable storage medium
US11177999B2 (en) Correlating computing network events
CN110427323B (en) Application testing method, device, proxy server and system
CN104993953B (en) The method and apparatus for detecting network service state
US9444718B2 (en) Distributed platform test network
US9058252B2 (en) Request-based server health modeling
US7203720B2 (en) Web server hit multiplier and redirector
US20200327045A1 (en) Test System and Test Method
CN109474484B (en) CDN (content delivery network) checking method, device and system
US20160011926A1 (en) Method for processing data quality exceptions in a data processing system
CN109587258B (en) Service activity detection method and device
CN103117907A (en) Network speed test method and system and method and system for selecting accelerating server
CN107026758B (en) Information processing method, information processing system and server for CDN service update
US20150195181A1 (en) Testing of dynamic web content applications
CN109617966A (en) A kind of cloud pipe Platform deployment system and method based on Openstack
CN106126419A (en) The adjustment method of a kind of application program and device
CN110955544A (en) Method, device and system for detecting usability of web system
CN111628878A (en) Fault positioning method, device and system based on multi-stage network nodes
CN108694116B (en) Network stability testing method, device and system of VPC cluster
CN111294257B (en) Method, device and system for automatic pressure test of application server
CN107547674A (en) Address distribution method and device
CN107483294B (en) Method and device for monitoring network request
CN109347766A (en) A kind of method and device of scheduling of resource
CN104754029A (en) Method, device and system for determining primary management server

Legal Events

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