CN112688825A - CDN node test method and device and computer equipment - Google Patents

CDN node test method and device and computer equipment Download PDF

Info

Publication number
CN112688825A
CN112688825A CN201910993074.2A CN201910993074A CN112688825A CN 112688825 A CN112688825 A CN 112688825A CN 201910993074 A CN201910993074 A CN 201910993074A CN 112688825 A CN112688825 A CN 112688825A
Authority
CN
China
Prior art keywords
resource
address
cdn node
resource distribution
tested
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
CN201910993074.2A
Other languages
Chinese (zh)
Other versions
CN112688825B (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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN201910993074.2A priority Critical patent/CN112688825B/en
Publication of CN112688825A publication Critical patent/CN112688825A/en
Application granted granted Critical
Publication of CN112688825B publication Critical patent/CN112688825B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a CDN node testing method, which comprises the following steps: receiving a resource distribution response sent by a scheduling node, and acquiring a resource address in the resource distribution response; replacing the resource address with a new resource address pointing to the CDN node to be tested; writing the new resource address in the resource distribution response in place of the resource address, and sending the resource distribution response to the user terminal; and testing the resource distribution process of the CDN node to be tested according to the test task. The invention also provides a CDN node testing device, computer equipment and a computer readable storage medium. The invention can dynamically guide the resource issuing process to the CDN node to be tested under the condition of not changing the CDN scheduling program, thereby carrying out the corresponding function test. Therefore, the flexibility of the test is improved, and the efficiency is also improved.

Description

CDN node test method and device and computer equipment
Technical Field
The invention relates to the technical field of internet, in particular to a CDN node testing method, a CDN node testing device, computer equipment and a computer readable storage medium.
Background
In a CDN (Content Delivery Network), when a part of functions in the Network are upgraded or modified, for example, a storage format of a resource changes or a hotlink rule is changed, it is generally necessary to test corresponding functions of each CDN node, such as receiving a user request, hotlink verification, resource Delivery, and the like, so as to ensure that the upgraded CDN Network is still robust.
However, in the prior art, for testing the CDN node, generally, the operation of the CDN network needs to be suspended, and then the resource request of the user is sent to the CDN node to be tested in a manner of modifying the scheduler, so that the CDN node to be tested is tested separately. That is to say, in the prior art, the CDN network in the working state needs to suspend and change the scheduler when testing the designated CDN node to be tested, and therefore, flexibility is poor and efficiency is low.
Disclosure of Invention
In view of this, the present invention provides a CDN node testing method, an apparatus, a computer device, and a computer-readable storage medium, which can solve the above-mentioned problems of lack of flexibility and low efficiency caused by the fact that a scheduling program of a CDN network needs to be modified for testing a specified CDN node to be tested.
Firstly, in order to achieve the above object, the present invention provides a CDN node testing method, where the method includes:
receiving a resource distribution response sent by a scheduling node, and acquiring a resource address in the resource distribution response; replacing the resource address with a new resource address pointing to the CDN node to be tested; writing the new resource address in the resource distribution response in place of the resource address, and sending the resource distribution response to the user terminal; and testing the resource distribution process of the CDN node to be tested according to the test task.
Preferably, the obtaining the resource address in the resource distribution response includes: acquiring a first URL address in the resource distribution response; and identifying a host field in the first URL address, so as to acquire a first host domain name corresponding to the first URL address.
Preferably, the replacing the resource address with a new resource address pointing to the CDN node to be tested includes: acquiring a second host domain name corresponding to the CDN node to be tested; and writing the second host domain name into the first URL address instead of the first host domain name to obtain a second URL address, and taking the second URL address as a new resource address.
Preferably, the obtaining the first URL address in the resource distribution response includes: and hijacking the first URL address in the resource distribution response sent by the scheduling node through a hijacking agent.
Preferably, the test task includes at least one of a hotlink test, a segment request test and a format support test.
In addition, to achieve the above object, the present invention further provides a CDN node testing apparatus, where the apparatus includes:
the acquisition module is used for receiving a resource distribution response sent by the scheduling node and acquiring a resource address in the resource distribution response; the replacing module is used for replacing the resource address with a new resource address pointing to the CDN node to be tested; the sending module is used for writing the new resource address into the resource distribution response in place of the resource address and sending the new resource address to the user terminal; and the testing module is used for testing the resource distribution process of the CDN node to be tested according to the testing task.
Preferably, the obtaining module is further configured to: acquiring a first URL address in the resource distribution response; and identifying a host field in the first URL address, so as to acquire a first host domain name corresponding to the first URL address.
Preferably, the replacement module is further configured to: acquiring a second host domain name corresponding to the CDN node to be tested; and writing the second host domain name into the first URL address instead of the first host domain name to obtain a second URL address, and taking the second URL address as a new resource address.
Further, the present invention also provides a computer device, which includes a memory and a processor, where the memory stores a computer program that can run on the processor, and when the computer program is executed by the processor, the computer program implements the steps of the CDN node testing method as described above.
Further, to achieve the above object, the present invention also provides a computer readable storage medium storing a computer program, which is executable by at least one processor to cause the at least one processor to execute the steps of the CDN node testing method as described above.
Compared with the prior art, the CDN node testing method, the CDN node testing device, the computer equipment and the computer readable storage medium provided by the invention can obtain the corresponding resource address after receiving the resource distribution response sent by the scheduling node, and then replace the resource address with a new resource address pointing to the CDN node to be tested; writing the new resource address in the resource distribution response in place of the resource address, and sending the resource distribution response to the user terminal; and finally, testing the resource distribution process of the CDN node to be tested according to the test task. By the method, the resource issuing process can be dynamically guided to the CDN node to be tested under the condition that the CDN scheduler is not changed, so that corresponding function test is carried out. Therefore, the flexibility of the test is improved, and the efficiency is also improved.
Drawings
FIG. 1 is a schematic diagram of an application environment of an embodiment of the present invention;
FIG. 2 is a schematic diagram of an application environment of another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a CDN node testing method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an embodiment of step S200 of FIG. 2;
FIG. 5 is a flowchart illustrating one embodiment of step S202 of FIG. 2;
FIG. 6 is a diagram of an alternative hardware architecture for the computer device of the present invention;
fig. 7 is a schematic diagram of program modules of an embodiment of the CDN node testing device of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Fig. 1 is a schematic diagram of an application environment according to an embodiment of the present invention. Referring to fig. 1, the computer device 1 is connected to a scheduling node, a CDN node to be tested, and a user terminal, acquires a resource address in a resource distribution response after receiving the resource distribution response sent by the scheduling node, replaces the resource address with a new resource address in the CDN node to be tested, and then tests a process of distributing resources for the CDN node to be tested. In this embodiment, the scheduling node may be any CDN node configured with a scheduler on the CDN network, or may be a source station. The computer device 1 may be used as a terminal device such as a test server, a mobile terminal, a PC, etc. In other embodiments, the computer device 1 may also serve as an independent functional module, and then attach to any CDN node or the scheduling node on the CDN network, so as to implement the function of testing the CDN node, which is not limited herein.
As shown in fig. 2, which is a schematic diagram of an application environment of another embodiment of the present invention, wherein the computer device 1 may also serve as a proxy server, so that the computer device 1, serving as a relay station where the user terminal is connected to the scheduling node, may first receive a resource request sent by a user, and then forward the resource request to the scheduling node; and then after receiving a resource distribution response sent by the scheduling node, acquiring a resource address in the resource distribution response, replacing the resource address with a new resource address in the CDN node to be tested, forwarding the new resource address to the user terminal, and finally testing the resource distribution process of the CDN node to be tested.
Fig. 3 is a flowchart illustrating a CDN node testing method according to an embodiment of the present invention. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description will exemplarily describe a computer device as an execution subject by taking the application environment shown in fig. 1 as an example.
As shown in fig. 3, the CDN node testing method may include steps S200 to S206, where:
step S200, receiving the resource distribution response sent by the scheduling node, and acquiring the resource address in the resource distribution response.
The CDN network delivers the resources on the source station to the CDN nodes by deploying the CDN nodes, so that the CDN nodes collaboratively undertake resource distribution to the user terminal after receiving the resource request of the user, and the purpose of load balancing is achieved. The testing of a CDN node is generally performed in a process of issuing a corresponding resource by the CDN node according to a resource request of a user. In this embodiment, after the computer device 1 is connected to the scheduling node, when the user terminal sends a resource request to the scheduling node, the scheduling node selects a CDN node that issues a resource according to a certain scheduling rule, generates a corresponding resource distribution response, sends the resource distribution response to the computer device 1, and forwards the resource distribution response to the user terminal through the computer device 1. The scheduling rules are stored in the scheduling nodes, and the CDN nodes for sending resources are selected according to the load conditions of the CDN nodes and the position conditions of the user terminals. Therefore, the computer device 1 can acquire the resource address in the resource distribution response.
As shown in fig. 4, in an exemplary embodiment, the acquiring the resource address in the resource distribution response in step S200 includes steps S300 to S302:
step S300, acquiring the first URL address in the resource distribution response.
Step S302, identifying a host field in the first URL address, so as to obtain a first host domain name corresponding to the first URL address.
Specifically, after receiving the resource distribution response sent by the scheduling node, the computer device 1 acquires the first URL address in the resource distribution response. Wherein the obtaining of the first URL address in the resource distribution response includes: and hijacking the first URL address in the resource distribution response sent by the scheduling node through a hijacking agent. For example, the PAC agent obtains the first URL address in the resource distribution response, but of course, the first URL address in the resource distribution response may also be obtained by other hijacking technologies. In this embodiment, the user terminal is generally connected to the CDN network through a proxy server, and therefore, a PAC proxy program may be run on the proxy server in advance, and then, when the scheduling node returns the resource distribution response to the user terminal, the computer device 1 performs traffic hijacking by controlling the PAC proxy program on the proxy server, so as to obtain a URL address corresponding to the resource distribution response. Then, the computer device 1 identifies a host field in the first URL address according to a preset host field format, so as to obtain a first host domain name corresponding to the first URL address, that is, a CDN node device corresponding to a resource address in the resource delivery response.
Step S202, the resource address is replaced by a new resource address pointing to the CDN node to be tested.
Specifically, after acquiring the resource address in the resource distribution response, the computer device 1 changes to a new resource address pointing to the CDN node to be tested. As shown in fig. 5, step S202 may include steps S400 to S402:
step S400, acquiring a second host domain name corresponding to the CDN node to be tested.
Step S402, writing the second host domain name into the first URL address instead of the first host domain name to obtain a second URL address, and taking the second URL address as a new resource address.
In this embodiment, the computer device 1 obtains a second host domain name corresponding to the CDN node to be tested according to the pre-stored information of the CDN node to be tested, then writes the second host domain name in place of the first host domain name to the first URL address, thereby obtaining a second URL address, and finally generates the second URL as a new resource address. For example, the computer device 1 stores in advance a CDN node information table including information of the CDN node, such as a host domain name and location information. After receiving a test task, obtaining a second host domain name of the CDN node to be tested in the CDN node information table, and writing the second host domain name into a first URL address in place of the first host domain name to obtain a second URL address, so as to form a new resource address corresponding to the CDN node to be tested. In this embodiment, since the URL address includes a host field, the host field is used to implement that the same IP address corresponds to different hosts. Therefore, the computer device 1 may change the CDN node to which the resource delivery response points to the CDN node to be tested by replacing the first host domain name in the host field in the first URL address with the second host domain name corresponding to the CDN node to be tested.
And step S204, writing the new resource address into the resource distribution response by replacing the resource address, and sending the resource distribution response to the user terminal.
Step S206, testing the resource distribution process of the CDN node to be tested according to the test task.
Specifically, after obtaining a new resource address corresponding to the CDN node to be tested, the computer device 1 further writes the new resource address into the resource distribution response in place of the resource address, and then sends the resource distribution response to the user terminal. Then, the computer device 1 tests the resource distribution process of the CDN node to be tested according to the distribution response according to a test task, where the test task may include at least one of a hotlink test, a segment request test, and a format support test. In the anti-theft chain test, the segment request test and the format support test, each designated CDN node needs to be tested, so that the CDN node assigned by the scheduling node and used for issuing the resources can be replaced by the CDN node to be tested in a resource address replacement mode, and the CDN node to be tested is tested.
As can be seen from the above, the CDN node testing method provided in this embodiment can obtain a corresponding resource address after receiving a resource distribution response sent by a scheduling node, and then replace the resource address with a new resource address pointing to a CDN node to be tested; writing the new resource address in the resource distribution response in place of the resource address, and sending the resource distribution response to the user terminal; and finally, testing the resource distribution process of the CDN node to be tested according to the test task. By the method, the resource issuing process can be dynamically guided to the CDN node to be tested under the condition that the CDN scheduler is not changed, so that corresponding function test is carried out. Therefore, the flexibility of the test is improved, and the efficiency is also improved.
In addition, the present invention also provides a computer device, which is shown in fig. 6 and is a schematic diagram of an optional hardware architecture of the computer device of the present invention.
In this embodiment, the computer device 1 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13, which may be communicatively connected to each other through a system bus. The computer device 1 is connected to a network (not shown in fig. 6) through a network interface 13, and is connected to a server (not shown in fig. 6) through the network for data interaction. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division MultIPle Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, or a communication network.
It is noted that fig. 6 only shows the computer device 1 with components 11-13, but it is to be understood that not all shown components are required to be implemented, and that more or less components may be implemented instead.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 11 may be an internal storage unit of the computer device 1, such as a hard disk or a memory of the computer device 1. In other embodiments, the memory 11 may also be an external storage device of the computer device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided in the computer device 1. Of course, the memory 11 may also comprise both an internal storage unit of the computer device 1 and an external storage device thereof. In this embodiment, the memory 11 is generally used for storing an operating system and various application software installed on the computer device 1, such as a program code of a hijacking agent, a program code of the CDN node testing device 200, and the like. Furthermore, the memory 11 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 12 is generally used for controlling the overall operation of the computer device 1, such as performing data interaction or communication related control and processing. In this embodiment, the processor 12 is configured to run a program code or process data stored in the memory 11, for example, run an application program of the CDN node testing device 200, which is not limited herein.
The network interface 13 may include a wireless network interface or a wired network interface, and the network interface 13 is generally used for establishing a communication connection between the computer device 1 and a scheduling node, a user terminal and a CDN node to be tested.
In this embodiment, when the CDN node testing device 200 is installed and operated in the computer device 1, when the CDN node testing device 200 is operated, the corresponding resource address can be obtained after receiving a resource distribution response sent by a scheduling node, and then the resource address is replaced with a new resource address pointing to a CDN node to be tested; writing the new resource address in the resource distribution response in place of the resource address, and sending the resource distribution response to the user terminal; and finally, testing the resource distribution process of the CDN node to be tested according to the test task. By the method, the resource issuing process can be dynamically guided to the CDN node to be tested under the condition that the CDN scheduler is not changed, so that corresponding function test is carried out. Therefore, the flexibility of the test is improved, and the efficiency is also improved.
The hardware structure and functions of the computer apparatus of the present invention have been described in detail so far. Hereinafter, various embodiments of the present invention will be proposed based on the above-described computer apparatus.
Fig. 7 is a block diagram of an embodiment of a CDN node testing device 200 according to the present invention.
In this embodiment, the CDN node testing device 200 includes a series of computer program instructions stored in the memory 11, and when the computer program instructions are executed by the processor 12, the CDN node testing function according to the embodiment of the present invention can be implemented. In some embodiments, CDN node testing device 200 may be partitioned into one or more modules based on the particular operations that the computer program instructs the various portions to implement. For example, in fig. 7, the CDN node testing device 200 may be divided into an acquisition module 201, a replacement module 202, a sending module 203 and a testing module 204. Wherein:
the obtaining module 201 is configured to receive a resource distribution response sent by a scheduling node, and obtain a resource address in the resource distribution response.
The CDN network delivers the resources on the source station to the CDN nodes by deploying the CDN nodes, so that the CDN nodes collaboratively undertake resource distribution to the user terminal after receiving the resource request of the user, and the purpose of load balancing is achieved. The testing of a CDN node is generally performed in a process of issuing a corresponding resource by the CDN node according to a resource request of a user. In this embodiment, after the computer device is connected to the scheduling node, when the user terminal sends a resource request to the scheduling node, the scheduling node selects a CDN node that issues a resource according to a certain scheduling rule, generates a corresponding resource distribution response, sends the resource distribution response to the computer device, and forwards the resource distribution response to the user terminal by the computer device. The scheduling rules are stored in the scheduling nodes, and the CDN nodes for sending resources are selected according to the load conditions of the CDN nodes and the position conditions of the user terminals. Therefore, after receiving the resource distribution response sent by the scheduling node, the obtaining module 201 obtains the resource address in the resource distribution response.
In a specific embodiment, the process of acquiring, by the acquiring module 201, the resource address in the resource distribution response includes: first, a first URL address in the resource distribution response is obtained, then a host field in the first URL address is identified, and therefore a first host domain name corresponding to the first URL address is obtained.
Specifically, after receiving the resource distribution response sent by the scheduling node, the obtaining module 201 obtains the first URL address in the resource distribution response. Wherein the obtaining of the first URL address in the resource distribution response includes: and hijacking the first URL address in the resource distribution response sent by the scheduling node through a hijacking agent. For example, the PAC agent obtains the first URL address in the resource distribution response, but of course, the first URL address in the resource distribution response may also be obtained by other hijacking technologies. In this embodiment, the user terminal is generally connected to the CDN network through a proxy server, and therefore, a PAC proxy may be run on the proxy server in advance, and then, when the scheduling node returns the resource distribution response to the user terminal, the obtaining module 201 performs traffic hijacking by controlling the PAC proxy on the proxy server, so as to obtain a URL address corresponding to the resource distribution response. Next, the obtaining module 201 identifies a host field in the first URL address according to a preset host field format, so as to obtain a first host domain name corresponding to the first URL address, that is, a CDN node device corresponding to a resource address in the resource delivery response.
The replacing module 202 is configured to replace the resource address with a new resource address pointing to the CDN node to be tested.
Specifically, after the resource address in the resource distribution response is obtained, the replacing module 202 replaces the resource address with a new resource address pointing to the CDN node to be tested. In this embodiment, the replacing module 202 obtains a second host domain name corresponding to the CDN node to be tested according to the pre-stored information of the CDN node to be tested, then writes the second host domain name in place of the first host domain name to the first URL address, so as to obtain a second URL address, and finally generates the second URL as a new resource address. For example, the replacement module 202 stores in advance a CDN node information table including information of the CDN node, such as a host domain name and location information. After receiving the test task, the replacing module 202 obtains the second host domain name of the CDN node to be tested in the CDN node information table, and is configured to replace the first host domain name and write the first URL address into the first host domain name, so as to obtain a second URL address, thereby forming a new resource address corresponding to the CDN node to be tested. In this embodiment, since the URL address includes a host field, the host field is used to implement that the same IP address corresponds to different hosts. Therefore, the replacing module 202 may replace the CDN node to which the resource delivery response points to the CDN node to be tested by replacing the first host domain name in the host field in the first URL address with the second host domain name corresponding to the CDN node to be tested.
The sending module 203 is configured to write the new resource address in the resource distribution response in place of the resource address, and send the new resource address to the user terminal.
The testing module 204 is configured to test a process of distributing resources of the CDN node to be tested according to the test task.
Specifically, after obtaining a new resource address corresponding to the CDN node to be tested, the sending module 203 further writes the new resource address into the resource distribution response in place of the resource address, and then sends the resource distribution response to the user terminal. Next, the testing module 204 tests the resource distribution process of the CDN node to be tested according to the distribution response according to a testing task, where the testing task may include at least one of a hotlink test, a segment request test, and a format support test. Because each designated CDN node needs to be tested in the anti-theft chain test, the segment request test and the format support test, the computer equipment replaces the CDN node assigned by the scheduling node and used for issuing the resource with the CDN node to be tested in a resource address replacement mode, and therefore the CDN node to be tested is tested.
As can be seen from the above, the computer device can obtain the corresponding resource address after receiving the resource distribution response sent by the scheduling node, and then replace the resource address with a new resource address pointing to the CDN node to be tested; writing the new resource address in the resource distribution response in place of the resource address, and sending the resource distribution response to the user terminal; and finally, testing the resource distribution process of the CDN node to be tested according to the test task. By the method, the resource issuing process can be dynamically guided to the CDN node to be tested under the condition that the CDN scheduler is not changed, so that corresponding function test is carried out. Therefore, the flexibility of the test is improved, and the efficiency is also improved.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A CDN node test method is characterized by comprising the following steps:
receiving a resource distribution response sent by a scheduling node, and acquiring a resource address in the resource distribution response;
replacing the resource address with a new resource address pointing to the CDN node to be tested;
writing the new resource address in the resource distribution response in place of the resource address, and sending the resource distribution response to the user terminal;
and testing the resource distribution process of the CDN node to be tested according to the test task.
2. The CDN node testing method of claim 1, wherein the obtaining the resource address in the resource delivery response comprises:
acquiring a first URL address in the resource distribution response;
and identifying a host field in the first URL address, so as to acquire a first host domain name corresponding to the first URL address.
3. The CDN node testing method of claim 2, wherein the replacing the resource address with a new resource address pointing to a CDN node to be tested comprises:
acquiring a second host domain name corresponding to the CDN node to be tested;
and writing the second host domain name into the first URL address instead of the first host domain name to obtain a second URL address, and taking the second URL address as a new resource address.
4. The CDN node testing method of claim 2, wherein the obtaining the first URL address in the resource delivery response comprises:
and hijacking the first URL address in the resource distribution response sent by the scheduling node through a hijacking agent.
5. The CDN node testing method of claim 1 wherein the testing task comprises at least one of a hotlink test, a split request test and a format support test.
6. A CDN node testing device, the device comprising:
the acquisition module is used for receiving a resource distribution response sent by the scheduling node and acquiring a resource address in the resource distribution response;
the replacing module is used for replacing the resource address with a new resource address pointing to the CDN node to be tested;
the sending module is used for writing the new resource address into the resource distribution response in place of the resource address and sending the new resource address to the user terminal;
and the testing module is used for testing the resource distribution process of the CDN node to be tested according to the testing task.
7. The CDN node testing device of claim 6, wherein the obtaining module is further configured to:
acquiring a first URL address in the resource distribution response;
and identifying a host field in the first URL address, so as to acquire a first host domain name corresponding to the first URL address.
8. The CDN node testing device of claim 7 wherein the replacement module is further to:
acquiring a second host domain name corresponding to the CDN node to be tested;
and writing the second host domain name into the first URL address instead of the first host domain name to obtain a second URL address, and taking the second URL address as a new resource address.
9. A computer device, characterized in that the computer device comprises a memory, a processor, the memory having stored thereon a computer program executable on the processor, the computer program, when executed by the processor, implementing the steps of the CDN node testing method of any one of claims 1-5.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program executable by at least one processor to cause the at least one processor to perform the steps of the CDN node testing method of any one of claims 1-5.
CN201910993074.2A 2019-10-18 2019-10-18 CDN node test method and device and computer equipment Active CN112688825B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910993074.2A CN112688825B (en) 2019-10-18 2019-10-18 CDN node test method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910993074.2A CN112688825B (en) 2019-10-18 2019-10-18 CDN node test method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN112688825A true CN112688825A (en) 2021-04-20
CN112688825B CN112688825B (en) 2022-04-05

Family

ID=75445581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910993074.2A Active CN112688825B (en) 2019-10-18 2019-10-18 CDN node test method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN112688825B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741643A (en) * 2009-12-24 2010-06-16 北京世纪互联宽带数据中心有限公司 Content delivery network node detecting method and system
CN102347864A (en) * 2011-11-02 2012-02-08 网宿科技股份有限公司 System and method for monitoring service quality of content distribution networks
US20130318173A1 (en) * 2012-05-24 2013-11-28 International Business Machines Corporation Automatically replacing localhost as hostname in url with fully qualified domain name or ip address
CN104468817A (en) * 2014-12-22 2015-03-25 北京奇虎科技有限公司 Method and device for achieving resource download through CDN, server and client side
CN109981408A (en) * 2019-03-26 2019-07-05 网宿科技股份有限公司 A kind of method and device, the system of CDN server off-line test

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741643A (en) * 2009-12-24 2010-06-16 北京世纪互联宽带数据中心有限公司 Content delivery network node detecting method and system
CN102347864A (en) * 2011-11-02 2012-02-08 网宿科技股份有限公司 System and method for monitoring service quality of content distribution networks
US20130318173A1 (en) * 2012-05-24 2013-11-28 International Business Machines Corporation Automatically replacing localhost as hostname in url with fully qualified domain name or ip address
CN104468817A (en) * 2014-12-22 2015-03-25 北京奇虎科技有限公司 Method and device for achieving resource download through CDN, server and client side
CN109981408A (en) * 2019-03-26 2019-07-05 网宿科技股份有限公司 A kind of method and device, the system of CDN server off-line test

Also Published As

Publication number Publication date
CN112688825B (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN107920112B (en) Configuration file pushing method supporting gray mode, central server and storage medium
CN108717379B (en) Electronic device, distributed task scheduling method and storage medium
CN109284205B (en) Snapshot backup method and device, computer equipment and storage medium
CN107911401B (en) Application plug-in extension function method and application server
CN107193609B (en) Function module calling method and device in application and electronic equipment
CN112579622B (en) Method, device and equipment for processing service data
CN108255513A (en) Electronic device, the data-interface based on springmvc and its illustrate automatic generation method and storage medium
CN110837391B (en) Application program hot updating method and device, storage medium and electronic equipment
CN113704110A (en) Automatic testing method and device for user interface
CN108243254A (en) Electronic device, the method and storage medium of the publication of application upgrade version
CN113645308B (en) Mobile terminal TCP communication, device, equipment and storage medium
CN112818270B (en) Data cross-domain transfer method and device and computer equipment
CN112422604B (en) File uploading method, device and system and computer equipment
CN112688825B (en) CDN node test method and device and computer equipment
CN107977410B (en) Bookshelf management method based on electronic book application and electronic equipment
CN111142885B (en) eSIM equipment management method, device, equipment and storage medium
CN111314424B (en) Component management method and system of service platform
CN111126604A (en) Model training method, device, server and storage medium
CN112416384A (en) Software upgrading method and device and computer equipment
WO2023124241A1 (en) Service testing method, server, terminal device and storage medium
CN108829574B (en) Test data laying method, test server and computer readable storage medium
KR20130023567A (en) Method and apparatus for copying file
CN115617555A (en) Information processing system and method
CN114327548A (en) Software upgrading method and related device
CN112104513B (en) Visual software load method, device, equipment and storage medium

Legal Events

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