Cache node scheduling method and apparatus, and device and medium

By receiving and comparing DNS resolution results in the CDN and performing resource prefetching, the problem of sudden increase in return to origin after the edge layer cache node's parent layer node is switched is solved, and the service performance and business request efficiency of the cache node are improved.

WO2024174694A1PCT designated stage expired Publication Date: 2024-08-29CHINA TELECOM CLOUD TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/139692
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-24
Filing Date
2023-12-19
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

In a content distribution network (CDN), changes in the parent cache node of an edge layer cache node lead to a sudden increase in back-to-origin, affecting business request efficiency and the service performance of the cache node.

Method used

By receiving and comparing the DNS resolution results, the edge layer cache node sends a resource request carrying the old parent layer cache node information to the parent layer cache node that may cache the target resource after the parent layer node is switched, to perform resource prefetching and reduce the number of times of returning to the source.

Benefits of technology

It effectively reduces the number of times the edge layer cache node returns to the origin after switching parent layer nodes, and improves the service performance and business request efficiency of the cache node.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023139692_29082024_PF_FP_ABST
    Figure CN2023139692_29082024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a cache node scheduling method and apparatus, and a device and a medium, which aim to avoid the influence of a back-to-source sudden increase on a normal service. The method comprises: receiving a request for a target resource; performing DNS resolution on the target resource to obtain a first resolution result, and acquiring a second resolution result from a cache, wherein the second resolution result is a DNS resolution result that is previously obtained by means of performing DNS resolution on the target resource; when the first resolution result is different from the second resolution result, determining a first parent-layer cache node according to the first resolution result, and determining a second parent-layer cache node according to the second resolution result; and when the first parent-layer cache node is different from the second parent-layer cache node, sending to the first parent-layer cache node a resource request which carries information of the second parent-layer cache node, such that the first parent-layer cache node acquires the target resource from the second parent-layer cache node, and returns the target resource to an edge-layer cache node.
Need to check novelty before this filing date? Find Prior Art

Description

A cache node scheduling method, device, equipment, and medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on February 24, 2023, with application number 202310163245.5, and application name “A cache node scheduling method, device, equipment, and medium”, all contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the technical field of content distribution networks, and in particular to a cache node scheduling method, apparatus, device, and medium. Background Art

[0004] By utilizing cache nodes at different levels in the Content Delivery Network (CDN), resources from source sites that are farther away from users can be cached in cache nodes that are closer to users. This allows users to obtain resources nearby when requesting a resource, thereby reducing pressure on the source site and improving access speed.

[0005] However, when the parent cache node of the edge layer cache node changes due to machine cutover and resource adjustment (that is, the parent node of the edge layer cache node switches), a sudden increase in back-to-source traffic will occur, affecting the execution efficiency of normal business requests and reducing the service performance of the cache node.

[0006] Summary of the Invention

[0007] In view of the above problems, embodiments of the present application provide a cache node scheduling method, apparatus and device, medium and product to overcome the above problems or at least partially solve the above problems.

[0008] In a first aspect of an embodiment of the present application, a cache node scheduling method is provided, which is applied to an edge layer cache node. The method includes:

[0009] receiving a request for a target resource;

[0010] Performing a Domain Name System (DNS) resolution on the target resource to obtain a first resolution result, and obtaining a second resolution result from the cache, where the second resolution result is the DNS resolution result obtained by performing the DNS resolution on the target resource previously;

[0011] If the first parsing result and the second parsing result are different, determining a first parent cache node according to the first parsing result, and determining a second parent cache node according to the second parsing result;

[0012] When the first parent cache node and the second parent cache node are different, a resource request carrying information of the second parent cache node is sent to the first parent cache node, so that the first parent cache node obtains the target resource from the second parent cache node and returns the target resource to the edge cache node.

[0013] A second aspect of an embodiment of the present application provides a cache node scheduling method, which is applied to a parent cache node after an edge cache node switches to a parent node. The method includes:

[0014] Receive a resource request from an edge layer cache node, where the resource request carries information of a first node, where the first node is a parent layer cache node before the edge layer cache node performs parent layer node switching;

[0015] Generate and send a prefetch request to the first node based on the configured prefetch header and information of the first node;

[0016] Receive the target resource returned by the first node in response to the prefetch request, and return the target resource to the edge layer cache node.

[0017] A third aspect of the embodiments of the present application provides a cache node scheduling method, which is applied to a parent cache node of an edge cache node before the parent cache node switches, the method comprising:

[0018] receiving a prefetch request from a third node, where the third node is a parent cache node after the edge cache node performs parent node switching;

[0019] In a case where the target resource corresponding to the prefetch request is cached, returning the target resource to the third node, so that the third node returns the target resource to the edge layer cache node;

[0020] In the case that the target resource corresponding to the prefetch request is not cached, an abnormal status code is returned to the third node, so that the third node returns to the source or returns to the parent.

[0021] In a fourth aspect of an embodiment of the present application, a cache node scheduling device is provided, which is applied to an edge layer cache node, and the device includes:

[0022] A request receiving module, used for receiving a request for a target resource;

[0023] A DNS resolution module is used to perform DNS resolution on the target resource to obtain a first resolution result, and obtain a second resolution result from the cache, where the second resolution result is the DNS resolution result obtained by previously performing DNS resolution on the target resource;

[0024] a node determination module, configured to determine a first parent cache node according to the first parsing result and a second parent cache node according to the second parsing result when the first parsing result and the second parsing result are different;

[0025] The resource request module is used to send a resource request carrying information of the second parent cache node to the first parent cache node when the first parent cache node and the second parent cache node are different, so that the first parent cache node obtains the target resource from the second parent cache node and returns the target resource to the edge cache node.

[0026] In a fifth aspect of the embodiments of the present application, a cache node scheduling device is provided, which is applied to a parent cache node after an edge cache node switches to a parent node. The device includes:

[0027] A first receiving module is configured to receive a resource request from an edge layer cache node, where the resource request carries information about a first node, where the first node is a parent layer cache node before the edge layer cache node switches to a parent layer node;

[0028] A first generating module, configured to generate and send a prefetch request to the first node according to the configured prefetch header and information of the first node;

[0029] The first transmission module is configured to receive a target resource returned by the first node in response to the pre-fetch request, and return the target resource to the edge layer cache node.

[0030] In a sixth aspect of the embodiments of the present application, a cache node scheduling device is provided, which is applied to a parent cache node of an edge cache node before the parent cache node is switched. The device includes:

[0031] A prefetch request receiving module, configured to receive a prefetch request from a third node, where the third node is a parent cache node after the edge cache node has undergone parent node switching;

[0032] A first response module is configured to return the target resource to the third node if the target resource corresponding to the prefetch request is cached, so that the third node returns the target resource to the edge layer cache node;

[0033] The second response module is used to return an abnormal status code to the third node when the target resource corresponding to the pre-fetch request is not cached, so that the third node returns to the source or returns to the parent.

[0034] In the seventh aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the program, the steps of the cache node scheduling method of the first aspect are implemented, or the steps of the cache node scheduling method of the second aspect are implemented, or the steps of the cache node scheduling method of the third aspect are implemented.

[0035] In an eighth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the cache node scheduling method of the first aspect or the steps of the cache node scheduling method of the second aspect or the steps of the cache node scheduling method of the third aspect are implemented.

[0036] In a ninth aspect of an embodiment of the present application, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the cache node scheduling method of the first aspect, or implements the steps of the cache node scheduling method of the second aspect, or implements the steps of the cache node scheduling method of the third aspect.

[0037] The embodiments of the present application include the following advantages:

[0038] In this embodiment, the edge layer cache node can, based on the first parsing result and the second parsing result, promptly find the second parent layer cache node that may cache the target resource after the parent layer node is switched, and send a resource request carrying the information of the second parent layer cache node to the first parent layer cache node, so that the first parent layer cache node can pre-fetch resources from the second parent layer cache node, thereby reducing the number of back-to-source times of the edge layer cache node after the parent layer node is switched, avoiding the impact on the execution efficiency of normal business requests due to the sudden increase in back-to-source, and thus improving the service performance of the cache node. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0040] Figure 1 is a flowchart of the implementation of the existing consistent hashing scheme

[0041] FIG2 is a flowchart of an implementation method of a cache node scheduling method in an embodiment of the present application;

[0042] FIG3 is a schematic diagram of an implementation process of a cache node scheduling method according to an embodiment of the present application;

[0043] FIG4 is a flowchart of another cache node scheduling method according to an embodiment of the present application;

[0044] FIG5 is a flowchart of another cache node scheduling method according to an embodiment of the present application;

[0045] FIG6 is a schematic structural diagram of a cache node scheduling device according to an embodiment of the present application;

[0046] FIG7 is a schematic structural diagram of another cache node scheduling device according to an embodiment of the present application;

[0047] FIG8 is a schematic structural diagram of another cache node scheduling device according to an embodiment of the present application;

[0048] FIG9 is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0050] In a CDN system, the multi-tiered design ensures that both edge-tier cache nodes and their parent-tier cache nodes cache resources. When users request resources, if they can find a hit in an edge-tier cache node or a parent-tier cache node, they can directly access the corresponding resource. Therefore, a high cache hit rate is essential for maintaining normal CDN service. A low resource hit rate in a CDN system can significantly impact origin servers, impacting the normal execution of user requests and, in severe cases, leading to CDN system service failures.

[0051] The existing CDN system mainly adopts a consistent hashing scheme to ensure a high resource hit rate. As shown in Figure 1, when the user's business request (i.e., a request for a certain resource) reaches the edge layer cache node, the edge layer cache node can request the target resource from its parent layer cache node when it has not cached the target resource or the cache time of the target resource exceeds the survival time. If the parent layer cache node is configured using a domain name in the configuration file associated with the edge layer cache node, the edge layer cache node can construct a consistent hash ring (referred to as a hash ring) containing the domain names and IP addresses of each parent layer cache node associated with the target resource based on the DNS resolution result obtained from the Domain Name System (DNS), and obtain the corresponding IP address based on the hash value of the domain name corresponding to the target resource in the consistent hashing ring and go to the corresponding parent layer cache node to obtain the target resource.

[0052] It can be understood that when the parent layer cache node of the edge layer cache node does not change, the DNS resolution result obtained by the edge layer cache node usually remains unchanged. Therefore, the consistent hash ring constructed by the DNS resolution result can enable the edge layer cache node to obtain specific resources from a specific parent layer cache node (that is, a specified parent layer machine), thereby improving the resource hit rate.

[0053] Each time the edge layer cache node returns to the parent layer cache node to obtain resources (such as the cache time of the resource exceeds the configured survival time), it needs to delete the temporary information corresponding to the previously established consistent hash ring and reinitialize it (such as re-obtaining the DNS resolution result and building a consistent hash ring). This allows the edge layer cache node to build a new consistent hash ring based on the new DNS resolution result when its parent layer cache node switches, thereby obtaining resources from the new parent layer cache node.

[0054] Based on the consistent hashing scheme described above, each resource is typically cached in only one parent cache node of the edge cache node. However, as business volume increases, the parent cache nodes of the edge cache node will also continue to expand. When the parent cache node changes due to machine cutover and resource adjustments, the DNS resolution result containing the parent cache node information will also be updated. When the edge cache node obtains resources based on the new DNS resolution result, it may obtain resources from the parent cache node that does not cache the resource, resulting in a sudden increase in back-to-source requests, which affects the efficiency of normal business request execution and reduces the service performance of the cache devices in the CDN system.

[0055] In response to the problems existing in the above-mentioned related technologies, the present application proposes a cache node scheduling method, which adds automated cache node scheduling on the basis of the original consistent hashing scheme, so that when the edge layer cache node obtains resources from the new parent layer cache node due to changes in the DNS resolution results, the new parent layer cache node can first pre-fetch resources from the parent layer cache node that may cache the resource, thereby reducing the number of back-to-source times of the edge layer cache node after switching the parent layer node, avoiding the impact on the execution efficiency of normal business requests due to a sudden increase in back-to-source, and thereby improving the service performance of the cache node.

[0056] The cache node scheduling method provided by the embodiment of the present application is described in detail below through some embodiments and application scenarios in conjunction with the accompanying drawings.

[0057] In the first aspect, as shown in FIG2 , which is a flowchart of an implementation of a cache node scheduling method provided by an embodiment of the present application, and applied to edge layer cache nodes, the method may include the following steps:

[0058] Step S11: Receive a request for a target resource.

[0059] In specific implementation, the edge layer cache node can be directly connected to the user's client. At this time, the request for the target resource is the business request issued by the client. The edge layer cache node can also be the upper-layer cache node (i.e., the parent-layer cache node) of other edge layer cache nodes. At this time, the request for the target resource can be a return-to-parent related request issued by its lower-layer cache node, or a prefetch request issued by its same-level cache node for prefetching resources.

[0060] Step S12: performing DNS resolution on the target resource to obtain a first resolution result, and obtaining a second resolution result from the cache, where the second resolution result is the DNS resolution result obtained by previously performing DNS resolution on the target resource.

[0061] It can be understood that for the request for the target resource currently received by the edge layer cache node, the first resolution result is: the DNS resolution result obtained by the edge layer cache node when performing DNS resolution on the target resource after receiving the request; the second resolution result is: the DNS resolution result obtained by the edge layer cache node when performing DNS resolution on the target resource before receiving the request. The DNS resolution result obtained by performing DNS resolution on the target resource before is cached in the memory by the edge layer cache node.

[0062] In specific implementation, after receiving a request for a target resource, the edge layer cache node will query the DNS for information about each parent layer cache node (i.e., parent layer node) for the target resource (such as the domain name and IP address of the parent layer cache node) to obtain a first resolution result, and obtain the information about each parent layer cache node previously obtained from the DNS query for the target resource from the cache of the edge layer cache node or the DNS cache to obtain a second resolution result.

[0063] Step S13: When the first parsing result and the second parsing result are different, a first parent cache node is determined according to the first parsing result, and a second parent cache node is determined according to the second parsing result.

[0064] It is understandable that the DNS resolution results (such as the first resolution result and the second resolution result) may contain multiple IPs. Therefore, the process of the edge layer cache node determining the parent layer cache node based on the DNS resolution results mainly includes the IP screening process, that is, the edge layer cache node will perform IP screening based on the obtained DNS resolution results to find the IP of a suitable parent layer cache node (such as the IP of a parent layer cache node with a higher resource hit rate) to obtain the target resource.

[0065] In specific implementation, considering that the parent layer cache node corresponding to the target resource before the parent layer node switches is more likely to have cached the target resource, the edge layer cache node can perceive whether its own parent layer node has been switched by comparing the first resolution result and the second resolution result, so that when the first resolution result and the second resolution result are different (that is, the parent layer node has been switched), the parent layer cache node corresponding to the target resource before the parent layer node is switched is determined in time according to the second resolution result, and the parent layer cache node corresponding to the target resource after the parent layer node is switched is determined according to the first resolution result (that is, the first parent layer cache node or the third node described below).

[0066] Step S14: When the first parent cache node and the second parent cache node are different, a resource request carrying information of the second parent cache node is sent to the first parent cache node, so that the first parent cache node obtains the target resource from the second parent cache node and returns the target resource to the edge cache node.

[0067] It is understandable that before and after the parent layer node is switched, the parent layer cache node corresponding to some resources determined by the edge layer cache node based on the DNS resolution results (i.e., the first resolution result and the second resolution result) may not have changed (i.e., the first parent layer cache node is the same as the second parent layer cache node), which means that after the parent layer node is switched, the edge layer cache node can still hit these resources, so there is no need to pre-fetch these resources.

[0068] Considering that the first parent cache node and the second parent cache node are different, if the edge cache node directly returns to the first parent cache node to obtain the target resource, since the first parent cache node and the parent cache node to which the first parent cache node returns to the parent may not have cached the target resource, the edge cache node will eventually need to obtain the target resource from the source station, resulting in a sudden increase in the number of returns to the source after the parent node switches.

[0069] Therefore, when the parent layer cache node in the edge layer cache node of this application switches, it will first send a resource request carrying the information of the old parent layer cache node (i.e., the second parent layer cache node) corresponding to the target resource, so as to schedule the new parent layer cache node (i.e., the first parent layer cache node) corresponding to the target resource to go to the old parent layer cache node to obtain the target resource, thereby reducing the number of back-to-source times after the parent layer cache node switches.

[0070] By adopting the technical solution of the embodiment of the present application, the edge layer cache node can, based on the first parsing result and the second parsing result, promptly find the second parent layer cache node that may cache the target resource after the parent layer node is switched, and send a resource request carrying the information of the second parent layer cache node to the first parent layer cache node, so that the first parent layer cache node can pre-fetch resources from the second parent layer cache node, thereby reducing the number of back-to-source times of the edge layer cache node after the parent layer node is switched, avoiding the impact on the execution efficiency of normal business requests due to the sudden increase in back-to-source, and thereby improving the service performance of the cache node.

[0071] The above technical solution is further described below in conjunction with Figure 3. As shown in Figure 3, the embodiment of the present application provides an implementation process of a cache node scheduling method, including:

[0072] (1) The edge layer cache node determines whether the DNS resolution result is different or whether there is a pre-fetch request already in progress.

[0073] In specific implementation, when the edge layer cache node switches the parent layer node, the DNS will cache the information of the relevant parent layer cache nodes after the parent layer node switches. Whenever the edge layer cache node receives a request for a certain resource (i.e., the target resource), it will request the DNS for the information of each parent layer cache node currently associated with the target resource, obtain the DNS resolution result, and thus complete the DNS resolution of the target resource.

[0074] After obtaining the DNS resolution result currently corresponding to the target resource (i.e., the first resolution result), the edge layer cache node compares the first resolution result with the DNS resolution result previously obtained from the DNS request (i.e., the second resolution result). If the first resolution result and the second resolution result are different, it means that the parent layer cache node of the edge layer cache node has changed (i.e., the edge layer cache node has switched the parent layer node). The DNS resolution result previously obtained from the DNS request can be saved in a database associated with the edge layer cache node (such as HostDB).

[0075] As a possible implementation method, considering that the edge layer cache node may frequently switch the parent layer node in a short period of time, at this time, in order to find the parent layer cache node that is more likely to cache the target resource, the edge layer cache node needs to obtain the information of the relevant parent layer cache node before the first parent layer node switch in the time period. Therefore, the minimum switching time (i.e., the first target time) can be added to the configuration file of the edge layer cache node to limit the edge layer cache node from updating the DNS resolution result previously obtained from the DNS request.

[0076] For example, each time an edge cache node switches its parent node, the DNS will cache the relevant parent cache node information before and after the parent node switch. Within a certain time period, after the edge cache node switches its parent node for the first time, the edge cache node will cache the first historical resolution result corresponding to the target resource obtained from the DNS (including the relevant parent cache node information before the parent node switch) and obtain the configured first target time from the configuration file.

[0077] If the cache time of the first historical resolution result does not exceed the first target time, the edge layer cache node can directly determine the first historical resolution result as the second resolution result. It is understood that within the first target time, no matter how many times the edge layer cache node has switched parent nodes, the information of the relevant parent layer cache node before the first parent layer node switch will be used as the second resolution result (i.e., the update of the old hash ring, etc. will be restricted) to determine the old parent layer cache node that is more likely to cache the target resource.

[0078] When the cache time of the first historical resolution result exceeds the first target time and the second historical resolution result corresponding to the target resource reacquired from the DNS is different from the first historical resolution result, the second historical resolution result is determined as the second resolution result.

[0079] It can be understood that in order to reduce the number of old parent layer cache nodes determined to be unavailable nodes (such as nodes that have completed machine cutover and have been deleted), after the first target time, if the edge layer cache node switches the parent layer node again, and the information of the relevant parent layer cache node before the secondary parent layer node switch (that is, the second historical resolution result) is different from the first historical resolution result, the edge layer cache node can use the second historical resolution result to update the cached first historical resolution result, so that the edge layer cache node can use the second historical resolution result as the second resolution result to determine the available old parent layer cache node.

[0080] It should be noted that the edge-layer cache node's caching time for historical resolution results (such as the first and second historical resolution results) obtained after each parent-layer node switch is not limited by the lifetime. For example, the edge-layer cache node may only obtain and cache the historical resolution result once after each parent-layer node switch, and then retrieve the historical resolution result from the cache at any subsequent time. A corresponding lifetime can also be added to the edge-layer cache node's configuration file so that the edge-layer cache node obtains historical resolution results from the DNS multiple times based on the lifetime.

[0081] For example, after the edge layer cache node performs a parent layer node switch, the edge layer cache node caches the third historical resolution result corresponding to the target resource obtained from the DNS (i.e., the information of the relevant parent layer cache node before the parent layer node switch in the current DNS cache), and determines whether the third historical resolution result is configured with a survival time according to the configuration file. In the case where the third historical resolution result is configured with a survival time, the edge layer cache node periodically obtains the third historical resolution result corresponding to the target resource from the DNS according to the survival time, and uses the newly obtained third historical resolution result each time to overwrite the third historical resolution result corresponding to the target resource cached last time. Each time the second resolution result is obtained, the edge layer cache node will determine the currently cached third historical resolution result as the second resolution result.

[0082] It can be understood that, depending on the different configured conditions for triggering the acquisition of historical parsing results (such as the edge layer cache node can be configured to: only when the cache time of the third historical parsing result exceeds the survival time and a request for the target resource is received, then the third historical parsing result corresponding to the target resource will be re-acquired, or the edge layer cache node can be configured to: when the cache time of the third historical parsing result exceeds the survival time, then the third historical parsing result corresponding to the target resource will be re-acquired), the time interval between two consecutive acquisitions of the third historical parsing result by the edge layer cache node can be the same or different.

[0083] (2) When the DNS resolution results are different or there is an ongoing pre-fetch request, the edge layer cache node sends a resource request carrying the information of the corresponding old parent layer cache node to the corresponding new parent layer cache node; when the DNS resolution results are the same or there is no ongoing pre-fetch request, the edge layer cache node still obtains the target resource from the corresponding old parent layer cache node.

[0084] In specific implementation, if the DNS resolution result is the same or there is no pre-fetch request in progress, it means that the specific node that the edge layer cache node returns to the parent has not changed. At this time, the edge layer cache node can normally obtain the target resource directly from the corresponding parent layer cache node (equivalent to the old parent layer corresponding to the subsequent parent layer node switch).

[0085] In the case where the DNS resolution results are different or there is a pre-fetch request already in progress, the edge layer cache node can construct a first hash ring and a second hash ring based on the corresponding DNS resolution results before and after the parent layer node is switched (i.e., the first resolution result and the second resolution result), and obtain the information (such as IP and port) of the new parent layer cache node (i.e., the first parent layer cache node) and the old parent layer cache node (i.e., the second parent layer cache node) based on the hash value of the domain name corresponding to the target resource in the first hash ring and the second hash ring. After the establishment of the second hash ring, it can be saved in the cache of the DNS and / or edge cache node for subsequent access at any time.

[0086] If the hash values ​​of the domain names corresponding to the target resources obtained from the first hash ring and the second hash ring are different, and / or the information of the new parent cache node is different from that of the old parent cache node, it means that the change of the parent cache node affects the specific node of the edge cache node back to the parent. Then the edge cache node sends a resource request carrying the information of the corresponding old parent cache node to the corresponding new parent cache node to schedule the new parent cache node to pre-fetch resources.

[0087] As a possible implementation method, the parent's effective time (i.e., the second target time) can be added back to the configuration file of the edge layer cache node to limit the duration of the edge layer cache node scheduling the new parent layer cache node for resource prefetching through a resource request carrying a request header (i.e., the information of the second parent layer cache node) after sensing the parent layer node switching.

[0088] Exemplarily, the edge layer cache node can obtain the configured second target time, and within the second target time after the edge layer cache node switches the parent layer node, send a resource request carrying information of the second parent layer cache node to the first parent layer cache node, wherein the information of the second parent layer cache node may include the IP and port of the second parent layer cache node.

[0089] (3) The new parent cache node receives a resource request carrying information of the corresponding old parent cache node, generates and sends a prefetch request to the old parent cache node.

[0090] In specific implementation, when the new parent layer cache node processes the resource request issued by the edge layer machine, it will detect whether the resource request carries a request header. If it carries a request header and the new parent layer cache node has not cached the target resource corresponding to the resource request, it will first pre-fetch the resource from the cache node corresponding to the IP in the request header.

[0091] Exemplarily, after the edge layer cache node switches the parent layer node, the parent layer cache node (i.e., the new parent layer cache node) receives the resource request of the edge layer cache node, which carries the information of the first node (i.e., the old parent layer cache node); the new parent layer cache node generates and sends a prefetch request to the first node based on the configured prefetch header and the information of the first node, wherein the configured prefetch header can be a "Ctr-Pre-Request: yes" field, indicating that the request is a prefetch request, and other requests of the new parent layer cache node (such as related requests back to the parent) can add a "Ctr-Pre-Request: no" field, indicating that the request is a non-prefetch request; the new parent layer cache node receives the target resource returned by the first node for the prefetch request, and returns the target resource to the edge layer cache node.

[0092] As a possible implementation method, considering that after the edge layer cache node switches the parent layer node, the old parent layer cache node may stop serving, at this time, the new parent layer cache node will get an abnormal status code when prefetching any resource from the old parent layer cache node. If the new parent layer cache node keeps retrying the request to the old parent layer cache node, the resource request efficiency will be greatly reduced. Therefore, when the new parent layer cache node fails to obtain resources from the first node (such as receiving an abnormal status code for a prefetch request for any resource), the information of the first node (such as IP) is marked as unavailable information, that is, the unavailable information represents the information of the first node marked when the edge layer node failed to obtain resources from the first node before; and before each time it is necessary to prefetch resources from the first node, it is first determined whether the information of the first node is unavailable information. If the information of the first node is not unavailable information, a prefetch request is generated and sent to the first node based on the configured prefetch header and the information of the first node.

[0093] For example, the new parent cache node can determine whether the IP of the old parent cache node carried in the received resource request is available. If it is not available, it will not pre-fetch resources from the old parent cache node, but will return to the source and the parent according to the configuration file associated with the new parent cache node.

[0094] (4) The old parent cache node receives the prefetch request and returns the target resource corresponding to the prefetch request to the new parent cache node. The new parent cache node then returns the target resource to the corresponding edge cache node.

[0095] In specific implementation, the old parent cache node receives the prefetch request from the third node (i.e., the new parent cache node) and queries whether it has cached the target resource corresponding to the prefetch request. In the case where the target resource corresponding to the prefetch request is cached, the old parent cache node returns a normal status code and target resource to the third node, so that the third node returns the target resource to the edge cache node; in the case where the target resource corresponding to the prefetch request is not cached, the old parent cache node returns an abnormal status code to the third node, so that the third node returns the target resource to the edge cache node. Among them, returning to the parent means that the third node directly obtains the target resource from its own parent cache node; returning to the source means that the parent cache node of the third node does not cache the target resource (or does not have a valid cache of the target resource), and the parent cache node of the third node needs to continue to obtain the target resource from the upper cache node (if the cache nodes at all levels of the upper layer do not have the target resource, the target resource will eventually be obtained from the source station), and then the third node obtains the target resource from the parent cache node.

[0096] After receiving the abnormal status code, the third node will not retry to pre-fetch resources from the old parent cache node multiple times to avoid the link becoming longer due to multiple retries, and will delete the pre-fetch header and the information of the old parent cache node carried in the pre-fetch request to generate a return-to-parent related request and send it to the return-to-parent related node (i.e., the second-layer parent cache node) to avoid the return-to-parent related node from performing additional resource pre-fetching due to receiving the pre-fetch header and the information of the old parent cache node.

[0097] As a possible implementation method, when the received resource request is a shard request, the new parent cache node obtains the cache uniform resource locator (URL) of the shard corresponding to the resource request, generates and sends a prefetch request for the corresponding shard to the old parent cache node based on the configured prefetch header, cache URL, and information of the old parent cache node.

[0098] It is understandable that, considering that the edge layer cache node may generate multiple shard requests based on the received request for the target resource, each shard request is used to request a shard of the target resource. In the existing CDN system, the cache node will use the query result for the index shard (such as the first shard of the target resource) to respond to any shard request corresponding to the target resource. That is to say, the new parent layer cache node generates a prefetch request based on any received shard request, and after sending the prefetch request to the old parent layer cache node, the old parent layer cache node will query whether it has cached the index shard of the target resource corresponding to the prefetch request. In the case that the old parent layer cache node does not cache the shard corresponding to the prefetch request, but has cached the index shard, the old parent layer cache node will still return a normal status code to the new parent layer cache node, but at this time the new parent layer cache node cannot obtain the corresponding shard from the old parent layer cache node, nor will it return to the source or back to the parent, resulting in the new parent layer cache node and the edge layer cache node caching the wrong resource.

[0099] In order to avoid the above-mentioned situation of caching incorrect resources, the new parent layer cache node in this application will add the cache url (i.e., the Ctl-Chash-Key header referred to in Figure 3) in the received shard request to the prefetch request. The old parent layer cache node can directly query whether it has cached the shard corresponding to the prefetch request based on the cache url, thereby skipping the operation of the shard plug-in (i.e., the old parent layer cache node will not use the query result for the index slice to respond to the prefetch request for the shard), so that the new parent layer cache node can know the actual caching status of the shard in the old parent layer cache node through the received status code, and can return to the source or parent in time, thereby avoiding the problem of cache errors.

[0100] Based on the above embodiments, the present application compares the DNS resolution results before and after the parent node switch based on the existing consistent hashing back to the parent scheme, and realizes the scheduling of each cache node in the CDN system through the information interaction between the edge layer node, the new parent layer cache node and the old parent layer cache node. By pre-fetching resources between groups through the same-layer cache nodes, the cache of the old parent layer cache node before the parent layer node switch can be obtained, and it can adapt to complete requests and sharded requests without adding other configurations. It solves the problem of a sudden increase in the source return after the parent layer node switch in the original scheme logic, and can adapt to the situation of multiple switching of the parent layer node in a short period of time. There is no need to manually increase the cache of the parent layer cache node to spread the resources, and completes the automatic cache node scheduling.

[0101] In a second aspect, as shown in FIG4 , which is a flowchart of another cache node scheduling method provided in an embodiment of the present application, the method is applied to the parent cache node after the edge cache node performs parent node switching. The method may include the following steps:

[0102] Step S21: receiving a resource request from an edge layer cache node, where the resource request carries information about a first node, where the first node is the parent layer cache node of the edge layer cache node before the parent layer node is switched;

[0103] Step S22: Generate and send a prefetch request to the first node based on the configured prefetch header and information of the first node;

[0104] Step S23: receiving the target resource returned by the first node in response to the pre-fetch request, and returning the target resource to the edge layer cache node.

[0105] By adopting the technical solution of the embodiment of the present application, the edge layer cache node can, based on the first parsing result and the second parsing result, promptly find the second parent layer cache node that may cache the target resource after the parent layer node is switched, and send a resource request carrying the information of the second parent layer cache node to the first parent layer cache node, so that the first parent layer cache node can pre-fetch resources from the second parent layer cache node, thereby reducing the number of back-to-source times of the edge layer cache node after the parent layer node is switched, avoiding the impact on the execution efficiency of normal business requests due to the sudden increase in back-to-source, and thereby improving the service performance of the cache node.

[0106] As a possible implementation,

[0107] Generate and send a prefetch request to the first node based on the configured prefetch header and information about the first node, including:

[0108] Determine whether the information of the first node is unavailable information, where the unavailable information is used to represent: information of the first node marked when the edge layer node previously failed to obtain resources from the first node;

[0109] When the information of the first node is not unavailable information, a prefetch request is generated and sent to the first node according to the configured prefetch header and the information of the first node.

[0110] As a possible implementation, generating and sending a prefetch request to the first node according to the configured prefetch header and information of the first node includes:

[0111] If the resource request is a fragmented request, obtain the cache uniform resource locator URL of the fragment corresponding to the resource request;

[0112] According to the configured prefetch header, cache URL, and information of the first node, a prefetch request for the corresponding shard is generated and sent to the first node.

[0113] In a third aspect, as shown in FIG5 , which is a flowchart of an implementation of another cache node scheduling method provided in an embodiment of the present application, the method is applied to a parent cache node before an edge cache node switches to a parent node. The method may include the following steps:

[0114] Step S31: receiving a prefetch request from a third node, where the third node is a parent cache node after the edge cache node undergoes parent node switching;

[0115] Step S32: if the target resource corresponding to the prefetch request is cached, return the target resource to the third node, so that the third node returns the target resource to the edge layer cache node;

[0116] Step S33: If the target resource corresponding to the pre-fetch request is not cached, an abnormal status code is returned to the third node, so that the third node returns to the source or to the parent.

[0117] By adopting the technical solution of the embodiment of the present application, the edge layer cache node can, based on the first parsing result and the second parsing result, promptly find the second parent layer cache node that may cache the target resource after the parent layer node is switched, and send a resource request carrying the information of the second parent layer cache node to the first parent layer cache node, so that the first parent layer cache node can pre-fetch resources from the second parent layer cache node, thereby reducing the number of back-to-source times of the edge layer cache node after the parent layer node is switched, avoiding the impact on the execution efficiency of normal business requests due to the sudden increase in back-to-source, and thereby improving the service performance of the cache node.

[0118] For the sake of simplicity, the method embodiments are described as a series of action combinations. However, those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all partial embodiments of the present application, and the actions involved are not necessarily required by the embodiments of the present application.

[0119] In a fourth aspect, FIG6 is a schematic structural diagram of a cache node scheduling device according to an embodiment of the present application. The device is applied to an edge layer cache node, and the device includes:

[0120] A request receiving module, used for receiving a request for a target resource;

[0121] A DNS resolution module is used to perform DNS resolution on the target resource to obtain a first resolution result, and obtain a second resolution result from the cache, where the second resolution result is the DNS resolution result obtained by previously performing DNS resolution on the target resource;

[0122] a node determination module, configured to determine a first parent cache node according to the first parsing result and a second parent cache node according to the second parsing result when the first parsing result and the second parsing result are different;

[0123] The resource request module is used to send a resource request carrying information of the second parent cache node to the first parent cache node when the first parent cache node and the second parent cache node are different, so that the first parent cache node obtains the target resource from the second parent cache node and returns the target resource to the edge cache node.

[0124] By adopting the technical solution of the embodiment of the present application, the edge layer cache node can, based on the first parsing result and the second parsing result, promptly find the second parent layer cache node that may cache the target resource after the parent layer node is switched, and send a resource request carrying the information of the second parent layer cache node to the first parent layer cache node, so that the first parent layer cache node can pre-fetch resources from the second parent layer cache node, thereby reducing the number of back-to-source times of the edge layer cache node after the parent layer node is switched, avoiding the impact on the execution efficiency of normal business requests due to the sudden increase in back-to-source, and thereby improving the service performance of the cache node.

[0125] In some embodiments of the present application, before obtaining the second parsing result from the cache, the apparatus further includes:

[0126] A first acquisition module is configured to cache a first historical resolution result corresponding to a target resource obtained from the DNS after the edge layer cache node switches to a parent layer node, and obtain a configured first target time;

[0127] The DNS resolution module includes:

[0128] A first parsing submodule is configured to determine the first historical parsing result as the second parsing result if the cache time of the first historical parsing result does not exceed the first target time;

[0129] The second resolution submodule is configured to determine the second historical resolution result as the second resolution result when the cache time of the first historical resolution result exceeds the first target time and the second historical resolution result corresponding to the target resource reacquired from the DNS is different from the first historical resolution result.

[0130] In some embodiments of the present application, before obtaining the second parsing result from the cache, the apparatus further includes:

[0131] A second acquisition module is configured to cache a third historical resolution result corresponding to the target resource obtained from the DNS after the edge layer cache node switches the parent layer node;

[0132] A third acquisition module is configured to periodically update the cached third historical parsing result corresponding to the target resource according to the survival time when the third historical parsing result is configured with a survival time;

[0133] The DNS resolution module includes:

[0134] The third parsing submodule is configured to determine the third historical parsing result currently cached by the edge layer cache node as the second parsing result.

[0135] In some embodiments of the present application, the resource request module includes:

[0136] A first resource request submodule is used to obtain a configured second target time;

[0137] The second resource request submodule is configured to send a resource request carrying information of the second parent cache node to the first parent cache node within a second target time after the edge cache node switches the parent node.

[0138] In some embodiments of the present application, the node determination module includes:

[0139] A first determining module is configured to construct a first hash ring according to the first parsing result, and obtain a second hash ring corresponding to the second parsing result from the cache of the edge layer cache node;

[0140] The second determining module is used to determine the first parent layer cache node and the second parent layer cache node according to the first hash ring and the second hash ring respectively.

[0141] In a fifth aspect, FIG7 is a schematic structural diagram of another cache node scheduling device according to an embodiment of the present application, which is applied to a parent cache node after an edge layer cache node switches a parent layer node, and the device includes:

[0142] A first receiving module is configured to receive a resource request from an edge layer cache node, where the resource request carries information about a first node, where the first node is a parent layer cache node before the edge layer cache node switches to a parent layer node;

[0143] A first generating module, configured to generate and send a prefetch request to the first node according to the configured prefetch header and information of the first node;

[0144] The first transmission module is configured to receive a target resource returned by the first node in response to the pre-fetch request, and return the target resource to the edge layer cache node.

[0145] By adopting the technical solution of the embodiment of the present application, the edge layer cache node can, based on the first parsing result and the second parsing result, promptly find the second parent layer cache node that may cache the target resource after the parent layer node is switched, and send a resource request carrying the information of the second parent layer cache node to the first parent layer cache node, so that the first parent layer cache node can pre-fetch resources from the second parent layer cache node, thereby reducing the number of back-to-source times of the edge layer cache node after the parent layer node is switched, avoiding the impact on the execution efficiency of normal business requests due to the sudden increase in back-to-source, and thereby improving the service performance of the cache node.

[0146] In some embodiments of the present application,

[0147] The first generation module includes:

[0148] The first generating submodule is used to determine whether the information of the first node is unavailable information, where the unavailable information is used to represent: information of the first node marked when the edge layer node previously failed to obtain resources from the first node;

[0149] The second generating submodule is configured to generate and send a prefetch request to the first node according to the configured prefetch header and the information of the first node when the information of the first node does not belong to unavailable information.

[0150] In some embodiments of the present application, the first generation module includes:

[0151] The third generation submodule is used to obtain the cache uniform resource locator URL of the slice corresponding to the resource request when the resource request is a slice request;

[0152] The fourth generation submodule is used to generate and send a prefetch request for the corresponding fragment to the first node based on the configured prefetch header, cache URL, and information of the first node.

[0153] In a sixth aspect, FIG8 is a schematic structural diagram of another cache node scheduling device according to an embodiment of the present application, which is applied to a parent cache node before an edge layer cache node switches to a parent layer node. The device includes:

[0154] A prefetch request receiving module, configured to receive a prefetch request from a third node, where the third node is a parent cache node after the edge cache node has undergone parent node switching;

[0155] A first response module is configured to return the target resource to the third node if the target resource corresponding to the prefetch request is cached, so that the third node returns the target resource to the edge layer cache node;

[0156] The second response module is used to return an abnormal status code to the third node when the target resource corresponding to the pre-fetch request is not cached, so that the third node returns to the source or returns to the parent.

[0157] By adopting the technical solution of the embodiment of the present application, the edge layer cache node can, based on the first parsing result and the second parsing result, promptly find the second parent layer cache node that may cache the target resource after the parent layer node is switched, and send a resource request carrying the information of the second parent layer cache node to the first parent layer cache node, so that the first parent layer cache node can pre-fetch resources from the second parent layer cache node, thereby reducing the number of back-to-source times of the edge layer cache node after the parent layer node is switched, avoiding the impact on the execution efficiency of normal business requests due to the sudden increase in back-to-source, and thereby improving the service performance of the cache node.

[0158] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.

[0159] The present application also provides an electronic device, as shown in Figure 9, which is a schematic diagram of the electronic device provided in the present application. As shown in Figure 9, the electronic device 100 includes a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus. The memory 110 stores a computer program that can be executed on the processor 120 to implement the steps of the cache node scheduling method disclosed in the present application.

[0160] The embodiment of the present application further provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the cache node scheduling method disclosed in the embodiment of the present application is implemented.

[0161] An embodiment of the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the cache node scheduling method disclosed in the embodiment of the present application.

[0162] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0163] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0164] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, systems, devices, storage media, and program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0165] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0166] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0167] Although some embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0168] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0169] The above is a detailed introduction to the cache node scheduling method, device and equipment, medium and product provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A cache node scheduling method, characterized in that: Applied to edge layer cache nodes, the method includes: receiving a request for a target resource; Performing a domain name system DNS resolution on the target resource to obtain a first resolution result, and acquiring a second resolution result from a cache, where the second resolution result is a DNS resolution result obtained by previously performing a DNS resolution on the target resource; When the first parsing result and the second parsing result are different, determining a first parent cache node according to the first parsing result, and determining a second parent cache node according to the second parsing result; In the case that the first parent cache node is different from the second parent cache node, a resource request carrying information of the second parent cache node is sent to the first parent cache node, so that the first parent cache node obtains the target resource from the second parent cache node and returns the target resource to the edge cache node.

2. The method according to claim 1, characterized in that Before obtaining the second parsing result from the cache, the method further includes: After the edge layer cache node performs parent layer node switching, caches the first historical resolution result corresponding to the target resource obtained from the DNS, and obtains the configured first target time; The obtaining the second parsing result from the cache includes: If the cache time of the first historical analysis result does not exceed the first target time, determining the first historical analysis result as the second analysis result; When the cache time of the first historical resolution result exceeds the first target time and the second historical resolution result corresponding to the target resource reacquired from the DNS is different from the first historical resolution result, the second historical resolution result is determined as the second resolution result.

3. The method according to claim 1, characterized in that Before obtaining the second parsing result from the cache, the method further includes: After the edge layer cache node performs parent layer node switching, caches the third historical resolution result corresponding to the target resource obtained from the DNS; In the case where the third historical analysis result is configured with a survival time, periodically updating the cached third historical analysis result corresponding to the target resource according to the survival time; The obtaining the second parsing result from the cache includes: The third historical parsing result currently cached by the edge layer cache node is determined as the second parsing result.

4. The method according to any one of claims 1 to 3, characterized in that: The sending the resource request carrying the information of the second parent cache node to the first parent cache node includes: Get the configured second target time; Within the second target time after the edge layer cache node performs parent layer node switching, a resource request carrying information of the second parent layer cache node is sent to the first parent layer cache node.

5. The method according to any one of claims 1 to 3, characterized in that: The method of determining a first parent cache node according to the first parsing result and determining a second parent cache node according to the second parsing result when the first parsing result and the second parsing result are different includes: Constructing a first hash ring according to the first parsing result, and obtaining a second hash ring corresponding to the second parsing result from the cache of the edge layer cache node; The first parent cache node and the second parent cache node are determined respectively according to the first hash ring and the second hash ring.

6. A cache node scheduling method, characterized in that: Applied to the parent layer cache node after the edge layer cache node performs parent layer node switching, the method includes: Receive a resource request from the edge layer cache node, where the resource request carries information of a first node, where the first node is a parent layer cache node before the edge layer cache node performs a parent layer node switch; Generate and send a prefetch request to the first node according to the configured prefetch header and information of the first node; Receive the target resource returned by the first node in response to the pre-fetch request, and return the target resource to the edge layer cache node.

7. The method according to claim 6, characterized in that The generating, according to the configured prefetch header and the information of the first node, and sending the prefetch request to the first node comprises: Determine whether the information of the first node is unavailable information, where the unavailable information is used to represent: information of the first node marked when the edge layer node previously failed to obtain resources from the first node; When the information of the first node does not belong to unavailable information, a prefetch request is generated and sent to the first node according to the configured prefetch header and the information of the first node.

8. The method according to claim 6 or 7, characterized in that: The generating, according to the configured prefetch header and the information of the first node, and sending the prefetch request to the first node comprises: In the case where the resource request is a slice request, obtaining a cache uniform resource locator URL of the slice corresponding to the resource request; According to the configured prefetch header, the cache URL, and the information of the first node, a prefetch request for the corresponding segment is generated and sent to the first node.

9. A cache node scheduling method, characterized in that: Applied to a parent layer cache node before an edge layer cache node switches a parent layer node, the method includes: receiving a pre-fetch request from a third node, where the third node is a parent cache node after the edge layer cache node performs parent layer node switching; In the case where the target resource corresponding to the pre-fetch request is cached, returning the target resource to the third node, so that the third node returns the target resource to the edge layer cache node; In the case where the target resource corresponding to the pre-fetch request is not cached, an abnormal status code is returned to the third node, so that the third node returns to the source or returns to the parent.

10. A cache node scheduling device, characterized in that: Applied to edge layer cache nodes, the device comprises: A request receiving module, used for receiving a request for a target resource; A DNS resolution module is used to perform DNS resolution on the target resource to obtain a first resolution result, and obtain a second resolution result from a cache, where the second resolution result is a DNS resolution result obtained by previously performing DNS resolution on the target resource; a node determination module, configured to determine a first parent cache node according to the first analysis result and a second parent cache node according to the second analysis result when the first analysis result and the second analysis result are different; A resource request module is used to send a resource request carrying information of the second parent layer cache node to the first parent layer cache node when the first parent layer cache node is different from the second parent layer cache node, so that the first parent layer cache node obtains the target resource from the second parent layer cache node and returns the target resource to the edge layer cache node.

11. A cache node scheduling device, characterized in that: Applied to the parent layer cache node after the edge layer cache node performs parent layer node switching, the device comprises: A first receiving module is used to receive a resource request of the edge layer cache node, where the resource request carries information of a first node, where the first node is a parent layer cache node before the edge layer cache node performs a parent layer node switch; A first generating module, configured to generate and send a prefetch request to the first node according to the configured prefetch header and information of the first node; The first transmission module is configured to receive the target resource returned by the first node in response to the pre-fetch request, and return the target resource to the edge layer cache node.

12. A cache node scheduling device, characterized in that: Applied to the parent layer cache node before the edge layer cache node switches the parent layer node, the device comprises: A pre-fetch request receiving module, used for receiving a pre-fetch request from a third node, wherein the third node is a parent layer cache node after the edge layer cache node performs parent layer node switching; A first response module, configured to return the target resource to the third node if the target resource corresponding to the pre-fetch request is cached, so that the third node returns the target resource to the edge layer cache node; The second response module is used to return an abnormal status code to the third node when the target resource corresponding to the pre-fetch request is not cached, so that the third node returns to the source or returns to the parent.

13. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the cache node scheduling method according to any one of claims 1 to 5, or to implement the cache node scheduling method according to any one of claims 6 to 8, or to implement the cache node scheduling method according to claim 9.

14. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the cache node scheduling method according to any one of claims 1 to 5 is implemented, or the cache node scheduling method according to any one of claims 6 to 8 is implemented, or the cache node scheduling method according to claim 9 is implemented.

15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the cache node scheduling method according to any one of claims 1 to 5 is implemented, or the cache node scheduling method according to any one of claims 6 to 8 is implemented, or the cache node scheduling method according to claim 9 is implemented.

Citation Information

Patent Citations

  • Data access method and data access device of content delivery network

    CN108173952A

  • Service access method and apparatus

    CN109413163A

  • Source returning method, device and equipment of CDN node

    CN113472852A

  • Resource request processing method and device, computer equipment and medium

    CN115208955A

  • Cache node scheduling method and device, equipment and medium

    CN115842863A