CN112839089A - CDN quality detection method and system - Google Patents

CDN quality detection method and system Download PDF

Info

Publication number
CN112839089A
CN112839089A CN202110023975.6A CN202110023975A CN112839089A CN 112839089 A CN112839089 A CN 112839089A CN 202110023975 A CN202110023975 A CN 202110023975A CN 112839089 A CN112839089 A CN 112839089A
Authority
CN
China
Prior art keywords
domain name
server
node
cdn
external platform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110023975.6A
Other languages
Chinese (zh)
Other versions
CN112839089B (en
Inventor
陈静芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN202110023975.6A priority Critical patent/CN112839089B/en
Publication of CN112839089A publication Critical patent/CN112839089A/en
Application granted granted Critical
Publication of CN112839089B publication Critical patent/CN112839089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Abstract

The invention discloses a detection method and a system for CDN quality, wherein the method comprises the following steps: a central DNS server receives a first domain name resolution request aiming at an original access domain name sent by an external platform and generates a CNAME record, wherein the CNAME record points to a CDN node to be detected and comprises a random sub-domain name which points to the CDN node to be detected and has a unique identifier; the central DNS server feeds back the CNAME record to the external platform, so that the external platform initiates a second domain name resolution request to a domain name server in the CDN node to be detected according to the CNAME record; when the random sub-domain name meets the detection condition, the domain name server or the CDN node to be detected records a log file so as to analyze the service quality of the CDN node to be detected according to the log file. The technical scheme provided by the application can monitor the whole access process of the user client, so that the acceleration effect is comprehensively evaluated.

Description

CDN quality detection method and system
Technical Field
The invention relates to the technical field of internet, in particular to a method and a system for detecting CDN quality.
Background
In the CDN (Content Delivery Network) technology, analyzing an acceleration effect of a user when using a CDN acceleration service is a problem that a CDN manufacturer pays attention to. Currently, only when a CDN node receives an access request from a user client, the CDN node can track a subsequent access process, thereby monitoring an acceleration effect in the access process. The process before the CDN node receives the access request cannot be monitored currently, so that the acceleration effect cannot be evaluated comprehensively.
Disclosure of Invention
The application aims to provide a CDN quality detection method and a CDN quality detection system, which can monitor the whole access process of a user client, so that the acceleration effect can be comprehensively evaluated.
In order to achieve the above object, an aspect of the present application provides a method for detecting CDN quality, where the method includes: a central DNS server receives a first domain name resolution request aiming at an original access domain name sent by an external platform and generates a CNAME record, wherein the CNAME record points to a CDN node to be detected and comprises a random sub-domain name which points to the CDN node to be detected and has a unique identifier; the central DNS server feeds back the CNAME record to the external platform, so that the external platform initiates a second domain name resolution request to a domain name server in the CDN node to be detected according to the CNAME record; when the random sub-domain name meets the detection condition, the domain name server or the CDN node to be detected records a log file so as to analyze the service quality of the CDN node to be detected according to the log file. .
In order to achieve the above object, another aspect of the present application further provides a system for detecting CDN quality, where the system includes: the system comprises a central DNS server, a CDN node, a domain name server in the CDN node and an HTTP detection server in the CDN node, wherein: the central DNS server is used for receiving a first domain name resolution request aiming at an original access domain name sent by an external platform and generating a CNAME record, wherein the CNAME record points to a CDN node to be detected and comprises a random sub-domain name which points to the CDN node to be detected and has a unique identifier; feeding back the CNAME record to the external platform, so that the external platform initiates a second domain name resolution request aiming at the CNAME record to a domain name server in the CDN node to be detected according to the CNAME record; the domain name server or the CDN node to be detected is used for recording a log file when the random sub-domain name meets detection conditions so as to analyze the service quality of the CDN node according to the log file.
In order to achieve the above object, another aspect of the present application further provides a computer storage medium for storing a computer program, where the computer program is executed to implement the above method for detecting CDN quality.
As can be seen from the above, in the technical solutions provided in one or more embodiments of the present application, before a domain name server in a CDN node receives a domain name resolution request sent by an external platform, a test request initiated by the external platform is processed by a central DNS server to generate a corresponding CNAME record, where the CNAME record includes a random sub-domain name with a unique identifier, and the unique identifier may be used as a basis for monitoring quality detection information. Therefore, when the external platform acquires resources for the CNAME record, the whole process can be tracked through the unique identifier, and finally, the acceleration effect can be comprehensively evaluated through the quality detection information bound with the unique identifier in the target page.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a system architecture including a central HTTP server according to an embodiment of the present invention;
fig. 2 is an interaction diagram of a detection method of CDN quality in an embodiment of the present invention;
FIG. 3 is a flow diagram of domain name resolution in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a system interaction including a central DNS server according to an embodiment of the present invention;
FIG. 5 is an interaction diagram including a central HTTP server in an embodiment of the present invention;
FIG. 6 is a schematic diagram of an interaction involving a central DNS server in an embodiment of the present invention;
fig. 7 is an interaction diagram of the HTTP probe server responding to the test request in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to the detailed description of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art without any inventive work based on the embodiments in the present application are within the scope of protection of the present application.
With the development of the CDN market, CDN products are more and more complex, and analyzing the acceleration effect of each link in the use process of a user also becomes a first thing concerned by CDN manufacturers. Which links are experienced in a user's request for a download, what is returned by those links, is what needs to be recorded and analyzed. However, it is generally an unrealizable matter to let users without CDN related knowledge assist in analyzing the acceleration quality of each link in the internet access process. At this time, if a scheme can detect the service quality through the browser, the operation difficulty of a common user can be reduced, and the workload of technicians can be reduced. Currently, the CDN only adds a tracking code to the HTTP request header when the edge CDN receives the HTTP request, and each subsequent CDN component can record the tracking code and the operation content when processing the request. However, this approach only knows the information after the request is received by the edge CDN, and cannot know the information before the request goes to the edge node, such as what its DNS egress IP is, why the request goes to this CDN node.
Similarly, as the CDN market expands, more and more CDN vendors appear, and a third-party platform for testing the quality of the CDN service node also appears, and the customer may refer to the test result of the third platform to select a CDN vendor. Similarly, the CDN manufacturer may also improve the quality of the CDN service node through a test of the third-party platform. In the testing process using the third-party platform, a CDN manufacturer can only know the public network outlet IP and the download rate of each request at the edge CDN service node, but cannot know other information that can be used to improve the service quality of the CDN service node, such as the DNS outlet IP and the time delay of each request. For this reason, it is very important for the CDN manufacturer to construct a system for detecting the service quality of the CDN service node, which can be associated with the DNS egress IP.
The method for detecting CDN quality provided in an embodiment of the present application may be applied to a system architecture shown in fig. 1. In the system architecture, a central HTTP server and various CDN nodes may be included. The central HTTP server may interact with devices of the external platform. It should be noted that the external platform herein may refer to the third party platform for testing the quality of the CDN service node, or may refer to a user who wants to test the quality of the CDN service node. The device of the external platform may be a monitoring device of the third party platform or may be a terminal device of the user.
For professional users, when the quality of a CDN node is tested, a random sub-domain name can be directly added to a domain name for an acceleration request, all related components of the CDN, including DNS servers, scheduling, buffering, and the like, can be compatible with a case where a domain name includes a random sub-domain name, and the returned result is the same regardless of whether the domain name includes a random sub-domain name. And when the back edge CDN receives the HTTP request, the unique ID in the random sub-domain name can be used as a tracking code in an HTTP request header, or the association between the unique ID and the tracking code is established. Finally, the interface can be used to query the log center for information about the unique ID.
For the detection of the third-party platform, the central HTTP server may automatically and evenly distribute the cyclic test requests of the third-party platform to all CDN service nodes using a redirection technique, and the new domain name of the redirected link contains the random sub-domain name.
In the CDN node, a domain name server and an HTTP probe server may be included. The test request of the external platform is received by the central HTTP server, and the central HTTP server can schedule the test request of the external platform to the CDN node to be detected, so that the domain name server and the HTTP detection server in the CDN node process the test request.
Referring to fig. 2 and 5, the method for detecting CDN quality in the present embodiment may include the following steps.
S11: the central HTTP server receives a test request sent by an external platform and generates a redirection link, the redirection link points to a CDN node to be detected, and a domain name in the redirection link comprises a random sub-domain name with a unique identifier.
In this embodiment, the external platform may initiate one or more test requests to the central HTTP server, and the central HTTP server may schedule the one or more test requests to the corresponding CDN nodes through a preset scheduling policy. Specifically, in order to test each CDN node evenly, the central HTTP server may schedule the test requests sent by the external platform evenly to each CDN. For example, the central HTTP server may have a node list of CDN nodes, and the central HTTP server may sequentially distribute the test requests according to an arrangement order of the CDN nodes in the node list. For example, there are currently a total of 3 CDN nodes, and when the central HTTP server receives the first test request, the first test request may be scheduled to the first CDN node. Similarly, when the central HTTP server receives the second test request, the second test request may be dispatched to the second CDN node. By analogy, a central HTTP server may distribute multiple test requests evenly among multiple CDN nodes. Certainly, in practical application, the central HTTP server may further execute a scheduling policy for load balancing, and preferentially schedule the test request to the CDN node with a lower load, which is not described herein again.
In this embodiment, when the external platform initiates a test request, the test request is usually resolved by a local DNS server of the external platform first. Referring to fig. 3, assuming that the external platform initiates a test request www.test.com, the local DNS server will query the com domain name server for the resolution result after resolving the test request. com domain name server may return an NS record to the local DNS server, the NS record pointing to test. Similarly, the local DNS server may query the test.com domain name server for the resolution result, and the test.com domain name server may return the IP address of the central HTTP server. In this way, the local DNS server can provide the IP address of the central HTTP server to the external platform, which can then initiate a test request www.test.com/uri through the browser to the central HTTP server. In this embodiment, after receiving the test request sent by the external platform, the central HTTP server may determine, according to the above-described manner, a CDN node that processes the test request, and query, from information of the CDN node acquired in advance, a node domain name of the CDN node. To track subsequent request processes, the central HTTP server may generate a redirect link by including a random sub-domain name in the node domain name. In particular, the central HTTP server may generate a unique identifier and set the number of probes, thereby generating a random sub-domain name from the unique identifier and the number of probes. The Unique Identifier may be a hash value of an IP address and a timestamp of an external platform that initiates the test request, a character string processed according to the number of the current test requests, or a Universal Unique Identifier (UUID), and the specific implementation form may be flexibly set as required as long as the uniqueness is ensured. The set detection times can be used for limiting the transmission times of the test requests between the external platform and the CDN node, quality detection information (time delay, packet loss rate and the like) between the external platform and the CDN node can be obtained through each detection, the accuracy of the quality detection information can be influenced by the detection times, and the actual numerical value of the detection times can be flexibly set according to the detection requirements. The random sub-domain name may be the concatenation of the unique identification and the number of detections. For example, if the unique identifier is guid and the number of detections is 2, then the random sub-domain name may be guid2.
In this embodiment, a redirect link may be constructed based on the node domain name and the random sub-domain name. Specifically, the random sub-domain name may be used as a prefix and spliced with the node domain name, so as to obtain the domain name in the redirection link. For example, if the node domain name is nodeb.test.com, the domain name obtained by concatenation is guid2. nodeb.test.com, and the finally constructed redirection link may be guid2. nodeb.test.com/uri.
In an embodiment, if the central HTTP server receives a plurality of test requests from the external platform, a respective redirection link may be generated for each test request, so that the test requests are redirected among a plurality of preset CDN nodes. Since these test requests may all be initiated by the same external platform, the central HTTP server needs not to cache the current redirection link when feeding back the current redirection link to the external platform. The aim of the processing is that multiple test requests of the equipment of the same external platform can not all arrive at the same CDN node due to the existence of buffering, so that the test data of the subsequent links are requested to be inaccurate, and the balanced distribution of the test requests is realized.
S13: and the central HTTP server feeds back the redirection link to the external platform, and the external platform initiates a domain name resolution request to a domain name server in the CDN node to be detected according to the redirection link.
In this embodiment, after the central HTTP server generates the redirection link, the redirection link may be fed back to the external platform by returning 302 the status code. After receiving the redirection link, the external platform may initiate an access request for the redirection link again. Specifically, for the redirect link guid2.nodex. test.com/uri, the local DNS server of the external platform may query the test.com domain name server for the corresponding resolution result. Com domain name server may return an NS record of domain name nodeb. Thus, the local DNS server may initiate a domain name resolution request for guid2.nodex. test.com to the domain name server in the CDN node.
S15: when the random sub-domain name meets detection conditions, the domain name server feeds back an address of an HTTP detection server in the CDN node to be detected to the external platform, and the domain name server or the CDN node records a log file so as to analyze the service quality of the CDN node according to the log file.
In this embodiment, after receiving a domain name resolution request sent by a local DNS server of an external platform, a domain name server in a CDN node can determine whether a random sub-domain name in the domain name resolution request meets a detection condition. Specifically, the random sub-domain name includes a current detection number, and if the current detection number is greater than 1, it indicates that the random sub-domain name does not meet the detection condition. And only when the current detection times are the specified value 1, the random sub-domain name is expressed to meet the detection condition.
In this embodiment, if the random sub-domain name does not meet the detection condition, the domain name server may update the detection times in the domain name requested to be resolved, so as to generate the domain name including the updated random sub-domain name. Specifically, the domain name server may subtract 1 from the detection number in the random sub-domain name to obtain an updated detection number, and generate the updated domain name based on the updated detection number. For example, the domain name in the domain name resolution request received by the domain name server is guid2.nodex. test.com, and the number of detections is 2 at this time, which does not meet the detection condition, so the number of detections may be reduced by 1 to generate the updated domain name guid1.nodex. test.com. After generating the updated domain name, the domain name server may feed back the updated domain name to the external platform.
In this embodiment, after receiving the updated domain name, the external platform may initiate a domain name resolution request for the updated domain name to a domain name server in the CDN node according to similar steps. Thus, the domain name server may receive a domain name resolution request with a domain name of guid1.nodex. test. At this time, the detection times in the random sub-domain name are 1, and the detection conditions are met, so that the domain name server can feed back the IP address of the HTTP detection server in the CDN node to be detected to the external platform. Thus, the external platform can acquire the target page from the HTTP probe server through the HTTP GET request based on the initial redirection link guid2. nondeX.test.com/uri according to the IP address of the HTTP probe server. In the target page, quality probe information may be included that is bound to a unique identifier in the random sub-domain name. Of course, the target page may also include a link, and when the link is clicked, the quality detection information bound by the unique identifier may be displayed.
In one embodiment, the quality detection information between the external platform and the CDN node to be detected may be recorded by a domain name server in the CDN node. Specifically, taking the time delay in the quality detection information as an example, when the domain name server receives a domain name resolution request initiated by an external platform, the domain name server may record a first time node of the first domain name resolution request and record a second time node of the last domain name resolution request. For example, in the above example, the first domain name resolution request is for guid2. nodeb.test.com, and the last domain name resolution request is for guid1. nodeb.test.com, which may be recorded. The domain name server may then identify a number of times the updated domain name is fed back between the first time node and the second time node. In the above example, the domain name server only feeds back the updated domain name once between the first time node and the second time node. Of course, in practical applications, the number of detections in the domain name corresponding to the first domain name resolution request may be 3 or more, so that the domain name server may feed back the updated domain name for many times.
In this embodiment, the domain name server may determine the time delay between the external platform and the CDN node according to the time difference between the first time node and the second time node and the number of times. Specifically, the time delay between the external platform and the CDN node can be expressed by a formula (t2-t1)/c, where t2 represents the second time node, t1 represents the first time node, and c represents the number of times the updated domain name is fed back.
The time delay between the external platform and the CDN node can be determined in the manner described above, because the external platform of the third-party platform and the local DNS server thereof are usually deployed in the same machine room, and then the interval between two requests of the local DNS server can be regarded as the time delay from the external platform to the CDN node.
In this embodiment, in addition to recording the time delay information, the domain name server may also bind the request time of the domain name resolution request, the outlet IP address of the domain name server, and the unique identifier together, and then may record the time delay information in the log file synchronously. Therefore, a series of bound quality detection information can be inquired in the log file by retrieving the unique identifier.
In one embodiment, when the HTTP probe server receives a download request from an external platform, if the download request does not include a unique identifier, a random sub-domain name with the unique identifier may be included in the redirection link. For example, after the HTTP probe server receives the download request nodeb. The redirection link is still directed to the HTTP probe server itself, and the redirection link includes a unique identifier guid and a probe count 2. After the HTTP probe server feeds back the redirection link to the external platform, the external platform may initiate a domain name resolution request to a domain name server in the CDN node through the local DNS server. When the domain name server judges that the random sub-domain name meets the detection condition, the address of the HTTP detection server can be fed back to the external platform. In this way, the external platform can acquire the target page from the HTTP probe server based on the redirection link, and during this access process, because the redirection link has the unique identifier, the process can be tracked. The target page may still contain the quality detection information bound to the unique identifier.
Referring to fig. 7, a user initiates a download request nodeb.test.com/uri to the HTTP probe server of the CDN node, and the HTTP probe server of the CDN node returns a redirection link including a random sub-domain name, where the new redirection link is similar to guid1. nodeb.test.com/uri. At this time, the local DNS of the user needs to request the DNS probe server of the CDN service node to resolve the new domain name guid1.nodex. When the DNS detection server analyzes the domain name, the number of times of arrival detection is found, and the IP of the HTTP detection server returned to the CDN service node is an A record or an AAAA record to be requested.
The user initiates a downloading request, guid1. nondex. test.com/uri, to an HTTP detection server of the CDN service node, and the HTTP server of the CDN node normally responds to a downloading page which can contain a link capable of opening detailed information of the unique ID in each link by clicking.
An embodiment of the present application further provides a system for detecting CDN quality, where the system includes: the system comprises a central HTTP server, CDN nodes, a domain name server in the CDN nodes and HTTP detection servers in the CDN nodes, wherein:
the central HTTP server is used for receiving a test request sent by an external platform and generating a redirection link, the redirection link points to a CDN node to be detected, and a domain name in the redirection link comprises a random sub-domain name with a unique identifier; feeding back the redirection link to the external platform so that the external platform initiates a domain name resolution request to a domain name server in the CDN node to be detected;
the domain name server is configured to feed back, to the external platform, an address of an HTTP probe server in the CDN node to be probed when the random sub-domain name meets a probing condition, so that the external platform obtains a target page from the HTTP probe server based on the redirection link, where the target page includes quality probe information bound to the unique identifier.
In another embodiment of the present application, when the third party testing platform does not support redirection, the central DNS server or the DNS probe server of the CDN node may be implemented by returning the CNAME. In this case, the system architecture does not include a central HTTP server, but includes a central DNS server, so that the quality probe information can be tracked based on the central DNS server. Specifically referring to fig. 4 and fig. 6, the method for detecting CDN quality in the present embodiment may include the following steps.
S21: the central DNS server receives a first domain name resolution request aiming at an original access domain name sent by an external platform, and generates a CNAME record, wherein the CNAME record points to a CDN node to be detected, and the CNAME record comprises a random sub-domain name with a unique identifier.
In this embodiment, the external platform may sequentially query the com domain name server and the test.com domain name server for the resolution result by the local DNS server with respect to the original access domain name dns.test.com as described in step S11, and the test.com domain name server may feed back an NS record pointing to the central DNS server to the external platform. In this way, the external platform may initiate a first domain name resolution request to the central DNS server for the original access domain name DNS.
In this embodiment, when the central DNS server resolves the original access domain name, the central DNS server may distribute a plurality of domain name resolution requests among a plurality of CDN nodes in a balanced manner in a similar manner to that in step S11. And to track subsequent access procedures, a random sub-domain name may be added to the original domain name, thereby generating a CNAME record. Specifically, the central DNS server may determine a CDN node that processes the original access domain name, and obtain a node domain name of the CDN node. Then, a unique identifier and detection times can be generated, and a random sub-domain name can be generated according to the unique identifier and the detection times. Finally, a CNAME record may be constructed based on the node domain name and the random sub-domain name. The above processes of determining the CDN node, generating the unique identifier, setting the detection times, and generating the random sub-domain name may refer to the description in the foregoing steps, for example, if the unique identifier is guid, and the detection times are 2, then the random sub-domain name may be guid2.
In this embodiment, a CNAME record may be constructed based on the node domain name and the random subdomain name. Specifically, the random sub-domain name may be used as a prefix and spliced with the node domain name, so as to obtain the domain name in the CNAME record. For example, if the node domain name is nodeb.test.com, the domain name obtained by concatenation is guid2. nodeb.test.com, and the finally constructed CNAME record may point to guid2. nodeb.test.com.
In an embodiment, if the central DNS server receives a plurality of domain name resolution requests sent by the external platform, a CNAME record may be generated for each domain name resolution request, so that the test requests corresponding to the domain name resolution requests are distributed among a plurality of preset CDN nodes. Wherein, the central DNS server may set the survival time of the current CNAME record to 0 when feeding back the current CNAME record to the external platform. Therefore, when the device of the same external platform requests the test request of the same domain name again, the request is sent to the central DNS again, so that the CDN node can be reselected, the domain name resolution request cannot be directly distributed to the same CDN node according to the existing CNAME record, and the balanced distribution of the test request can be realized.
S23: and the central DNS server feeds back the CNAME record to the external platform, so that the external platform initiates a second domain name resolution request aiming at the CNAME record to a domain name server in the CDN node to be detected.
In this embodiment, after receiving the CNAME record fed back by the central DNS server, the external platform may initiate a second domain name resolution request to the domain name server in the CDN node. The specific process is described in step S13.
S25: when the random sub-domain name meets the detection condition, the domain name server feeds back the address of the HTTP detection server in the CDN node to be detected to the external platform, so that the external platform obtains a target page from the HTTP detection server based on the original access domain name, wherein the target page comprises quality detection information bound with the unique identifier.
In this embodiment, the domain name server in the CDN node may still determine whether the random sub-domain name meets the detection condition according to the detection times in the random sub-domain name. And if the detection condition is met, the IP address of the HTTP detection server can be fed back to the external platform. If the random sub-domain name does not meet the detection condition, the domain name server may update the detection times in the CNAME record to generate an updated CNAME record. Then, the domain name server feeds back the updated CNAME record to the external platform, so that the external platform initiates a domain name resolution request for the updated CNAME record to a domain name server in a CDN node. Similar procedures can be referred to the description of step S15, and are not described here.
In this embodiment, after receiving the IP address of the HTTP probe server, the external platform may initiate a page acquisition request to the HTTP probe server in the HTTP GET manner. Different from the central HTTP server, under the architecture of the central DNS server, the external platform acquires the target page for the original access domain name DNS. In the original access domain name, a random sub-domain name is not included, so that the acquisition process of the page cannot be monitored according to the unique identifier, and the quality detection information between the external platform and the CDN node in the page acquisition process cannot be detected. This is also a drawback of using a central DNS server to enable information tracking, which can be addressed in the system architecture of a central HTTP server.
In one embodiment, when the HTTP probe server receives a download request from an external platform, if the download request does not include a unique identifier, a random sub-domain name with the unique identifier may be included in the redirection link. For example, after the HTTP probe server receives the download request nodeb. The redirection link is still directed to the HTTP probe server itself, and the redirection link includes a unique identifier guid and a probe count 2. After the HTTP probe server feeds back the redirection link to the external platform, the external platform may initiate a domain name resolution request to a domain name server in the CDN node through the local DNS server. When the domain name server judges that the random sub-domain name meets the detection condition, the address of the HTTP detection server can be fed back to the external platform. In this way, the external platform can acquire the target page from the HTTP probe server based on the redirection link, and during this access process, because the redirection link has the unique identifier, the process can be tracked. The target page may still contain the quality detection information bound to the unique identifier.
The present application further provides a detection system for CDN quality, the system includes: the system comprises a central DNS server, a CDN node, a domain name server in the CDN node and an HTTP detection server in the CDN node, wherein:
the central DNS server is used for receiving a first domain name resolution request aiming at an original access domain name sent by an external platform and generating a CNAME record, wherein the CNAME record points to a CDN node to be detected and comprises a random sub-domain name with a unique identifier; feeding back the CNAME record to the external platform so that the external platform initiates a second domain name resolution request aiming at the CNAME record to a domain name server in the CDN node to be detected;
the domain name server is configured to feed back, to the external platform, an address of an HTTP probe server in the CDN node to be probed when the random sub-domain name meets a probing condition, so that the external platform obtains a target page from the HTTP probe server based on the original access domain name, where the target page includes quality probe information bound to the unique identifier.
In another embodiment of the present application, a method for detecting CDN quality is further provided, where the method may be applied to a domain name server in a CDN node, and the method includes:
s31: receiving a domain name resolution request aiming at a target domain name sent by an external platform, wherein the target domain name comprises an original domain name and a random sub-domain name, and the random sub-domain name has a unique identifier;
s33: and identifying the current detection times corresponding to the unique identifier, and when the current detection times meet detection conditions, feeding back an address of an HTTP detection server in the CDN node to the external platform, wherein the domain name server or the CDN node records a log file so as to analyze the service quality of the CDN node according to the log file.
In one embodiment, the method further comprises:
if the current detection times do not meet the detection conditions, the domain name server updates the detection times in the domain name resolution request to generate an updated CNAME record;
and the domain name server feeds back the updated CNAME record to the external platform, so that the external platform initiates a domain name resolution request aiming at the updated CNAME record to the domain name server.
The specific implementation of the above steps may refer to the description in the foregoing embodiments, and will not be described herein again.
The application also provides a domain name server in the CDN node, the domain name server comprises a processor and a memory, the memory is used for storing a computer program, and when the computer program is executed by the processor, the detection method of the CDN quality executed by the domain name server is realized.
In this application, the memory may include physical means for storing information, typically media that digitize the information and store it in an electrical, magnetic, or optical manner. The memory may in turn comprise: devices that store information using electrical energy, such as RAM or ROM; devices that store information using magnetic energy, such as hard disks, floppy disks, tapes, core memories, bubble memories, or usb disks; devices for storing information optically, such as CDs or DVDs. Of course, there are other ways of memory, such as quantum memory or graphene memory, among others.
In the present application, the processor may be implemented in any suitable way. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth.
The present application further provides a computer storage medium, where the computer storage medium is used to store a computer program, and when the computer program is executed, the computer program is used to implement the above-mentioned method for detecting CDN quality.
As can be seen from the above, in the technical solutions provided in one or more embodiments of the present application, before a domain name server in a CDN node receives a domain name resolution request sent by an external platform, a test request initiated by the external platform is processed by a central HTTP server or a central DNS server to generate a corresponding redirection link or CNAME record, where the redirection link or CNAME record includes a random sub-domain name with a unique identifier, and the unique identifier may be used as a basis for monitoring quality detection information. Therefore, when the external platform acquires resources for the redirection link or the CNAME record, the whole process can be tracked through the unique identifier, and finally the acceleration effect can be comprehensively evaluated through the quality detection information bound with the unique identifier in the target page.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for both the system and domain name server embodiments, reference may be made to the introduction of embodiments of the method described above for comparison.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and 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.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, 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, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. 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 apparatus that comprises the element.
The above description is only an embodiment of the present application, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A CDN quality detection method is characterized by comprising the following steps:
a central DNS server receives a first domain name resolution request aiming at an original access domain name sent by an external platform and generates a CNAME record, wherein the CNAME record points to a CDN node to be detected and comprises a random sub-domain name which points to the CDN node to be detected and has a unique identifier;
the central DNS server feeds back the CNAME record to the external platform, so that the external platform initiates a second domain name resolution request to a domain name server in the CDN node to be detected according to the CNAME record;
when the random sub-domain name meets the detection condition, the domain name server or the CDN node to be detected records a log file so as to analyze the service quality of the CDN node to be detected according to the log file.
2. The method of claim 1, wherein generating a CNAME record comprises:
determining the CDN node to be detected for processing the original access domain name, and acquiring a node domain name of the CDN node to be detected;
generating a unique identifier and setting detection times, and generating a random sub-domain name according to the unique identifier and the detection times;
and constructing a CNAME record based on the node domain name and the random sub-domain name.
3. The method of claim 1, wherein the random sub-domain name meeting a probing condition comprises: the detection times in the random sub-domain name are specified numerical values.
4. The method of claim 1, further comprising:
when receiving a domain name resolution request initiated by the external platform, the domain name server records a first time node of the first domain name resolution request and records a second time node of the last domain name resolution request;
and the domain name server identifies the times of feeding back the updated random sub-domain name between the first time node and the second time node, and determines the time delay between the external platform and the CDN node to be detected according to the time difference between the first time node and the second time node and the times.
5. The method of claim 4, further comprising:
and the domain name server records the time delay, the request time of the domain name resolution request and the outlet IP address of the domain name server in the log file after binding the unique identifier.
6. The method of claim 1, further comprising:
if the central DNS server receives a plurality of domain name resolution requests sent by the external platform, generating a CNAME record for each domain name resolution request so as to distribute the test requests corresponding to each domain name resolution request among a plurality of preset CDN nodes to be tested;
when feeding back the current CNAME record to the external platform, the central DNS server sets the survival time of the current CNAME record to 0.
7. The method of claim 1, further comprising:
if the random sub-domain name does not meet the detection condition, the domain name server updates the detection times in the domain name requested to be analyzed so as to generate an updated CNAME record;
and the domain name server feeds back the updated CNAME record to the external platform, so that the external platform initiates a domain name resolution request aiming at the updated CNAME record to the domain name server.
8. A CDN quality detection system, the system comprising: the system comprises a central DNS server, a CDN node, a domain name server in the CDN node and an HTTP detection server in the CDN node, wherein:
the central DNS server is used for receiving a first domain name resolution request aiming at an original access domain name sent by an external platform and generating a CNAME record, wherein the CNAME record points to a CDN node to be detected and comprises a random sub-domain name which points to the CDN node to be detected and has a unique identifier; feeding back the CNAME record to the external platform, so that the external platform initiates a second domain name resolution request aiming at the CNAME record to a domain name server in the CDN node to be detected according to the CNAME record;
the domain name server or the CDN node to be detected is used for recording a log file when the random sub-domain name meets detection conditions so as to analyze the service quality of the CDN node according to the log file.
9. The system of claim 8, wherein the domain name server further comprises:
the time recording unit is used for recording a first time node of a first domain name resolution request and a second time node of a last domain name resolution request when receiving the domain name resolution request initiated by the external platform;
and the time delay determining unit is used for identifying the times of feeding back the updated random sub-domain name between the first time node and the second time node, and determining the time delay between the external platform and the CDN node according to the time difference between the first time node and the second time node and the times.
10. A computer storage medium for storing a computer program which, when executed, is adapted to carry out the method of any one of claims 1 to 7.
CN202110023975.6A 2021-01-08 2021-01-08 CDN quality detection method and system Active CN112839089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110023975.6A CN112839089B (en) 2021-01-08 2021-01-08 CDN quality detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110023975.6A CN112839089B (en) 2021-01-08 2021-01-08 CDN quality detection method and system

Publications (2)

Publication Number Publication Date
CN112839089A true CN112839089A (en) 2021-05-25
CN112839089B CN112839089B (en) 2023-06-23

Family

ID=75928835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110023975.6A Active CN112839089B (en) 2021-01-08 2021-01-08 CDN quality detection method and system

Country Status (1)

Country Link
CN (1) CN112839089B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716398A (en) * 2013-12-30 2014-04-09 北京奇虎科技有限公司 Method and system for monitoring CDN server
CN103780714A (en) * 2012-10-25 2014-05-07 中国移动通信集团北京有限公司 Method and apparatus for probing DNS server
KR101451194B1 (en) * 2013-04-11 2014-10-16 (주)씨디네트웍스 Method and apparatus for measuring distance in contents delivery network
CN106131229A (en) * 2016-09-20 2016-11-16 贵州白山云科技有限公司 The processing method of CDN business, equipment and communication system
CN107645573A (en) * 2017-09-29 2018-01-30 中国人民解放军国防科技大学 Method for detecting forwarding configuration of recursive domain name server
CN109347998A (en) * 2018-12-27 2019-02-15 网宿科技股份有限公司 A kind of detection method and system of the address DNS output port server ip

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780714A (en) * 2012-10-25 2014-05-07 中国移动通信集团北京有限公司 Method and apparatus for probing DNS server
KR101451194B1 (en) * 2013-04-11 2014-10-16 (주)씨디네트웍스 Method and apparatus for measuring distance in contents delivery network
CN103716398A (en) * 2013-12-30 2014-04-09 北京奇虎科技有限公司 Method and system for monitoring CDN server
CN106131229A (en) * 2016-09-20 2016-11-16 贵州白山云科技有限公司 The processing method of CDN business, equipment and communication system
CN107645573A (en) * 2017-09-29 2018-01-30 中国人民解放军国防科技大学 Method for detecting forwarding configuration of recursive domain name server
CN109347998A (en) * 2018-12-27 2019-02-15 网宿科技股份有限公司 A kind of detection method and system of the address DNS output port server ip

Also Published As

Publication number Publication date
CN112839089B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
TW201509157A (en) Method and system of dispatching requests in a content delivery network
CN108173979B (en) Message processing method, device, equipment and storage medium
US11228490B1 (en) Storage management for configuration discovery data
Singh et al. Characterizing the deployment and performance of multi-cdns
CN108924005A (en) Network detecting method, network detection device, medium and equipment
CN112738271B (en) CDN quality detection method, system and domain name server
Bajpai et al. A longitudinal view of dual-stacked websites—failures, latency and happy eyeballs
US11665078B1 (en) Discovery and tracing of external services
CN115509858A (en) Business system monitoring method and device, storage medium and computer equipment
CN111478792B (en) Cutover information processing method, system and device
US20200067788A1 (en) Network testing simulation
CN112839089B (en) CDN quality detection method and system
CN107948234B (en) Data processing method and device
CN110677683B (en) Video storage and video access method and distributed storage and video access system
US11297131B2 (en) Method and apparatus for multi-vendor GTM fabric
US20180181409A1 (en) Method and apparauts for accelerating loading of mobile application content
US11245750B2 (en) File server load balancing
CN114244805B (en) Domain name configuration method and device
US20200313981A1 (en) Method and device for processing a network service instantiation request
CN108228613B (en) Data reading method and device
CN111291127B (en) Data synchronization method, device, server and storage medium
CN108712515B (en) Domain name resolution method and system
CN111082977B (en) Method and device for acquiring IP address and terminal equipment
US11082484B2 (en) Load balancing system
CN112564993B (en) Method, apparatus, medium, and device for detecting bandwidth jitter

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