CN112153160A - Access request processing method and device and electronic equipment - Google Patents

Access request processing method and device and electronic equipment Download PDF

Info

Publication number
CN112153160A
CN112153160A CN202011069197.6A CN202011069197A CN112153160A CN 112153160 A CN112153160 A CN 112153160A CN 202011069197 A CN202011069197 A CN 202011069197A CN 112153160 A CN112153160 A CN 112153160A
Authority
CN
China
Prior art keywords
domain name
node
access request
upper node
target domain
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.)
Pending
Application number
CN202011069197.6A
Other languages
Chinese (zh)
Inventor
姜然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202011069197.6A priority Critical patent/CN112153160A/en
Publication of CN112153160A publication Critical patent/CN112153160A/en
Priority to PCT/CN2021/107856 priority patent/WO2022068333A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention provides a processing method and a device of an access request and electronic equipment, and relates to the technical field of Internet, wherein the method comprises the steps of receiving the access request of a client aiming at a target domain name; judging whether the data of the target domain name is stored locally in the node equipment; and if the data of the target domain name is not stored, determining an upper node for processing the access request according to the target domain name, and processing the access request according to the determined upper node. According to the embodiment of the invention, by presetting the association relationship between the domain name and the back source node, when the content data of the target domain name requesting for access is not stored in the node equipment, the back source node corresponding to the target domain name can be determined to carry out back source, so that only the resource of the target domain name is cached to the associated upper node, the redundant storage problem caused by caching the same resource in a plurality of upper nodes in a preferred back source mode is effectively relieved, and the overall caching capacity of the CDN is enhanced.

Description

Access request processing method and device and electronic equipment
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method and an apparatus for processing an access request, and an electronic device.
Background
Generally, a Content Delivery Network (CDN) node is divided into two levels, an edge node and an upper node, and the nodes in different levels play different roles. The edge node is used for serving the access of a user to the domain name and caching the content of the domain name. When the edge node does not access the content cache of the domain name corresponding to the access request, the edge node can access the corresponding upper node, if the upper node has the cache content of the domain name, the edge node can directly respond to the edge node, and if the upper node does not have the cache content of the domain name, the upper node returns the domain name source station to pull the corresponding cache content, then caches the cache content to the node, and then responds to the edge node.
At present, in an existing CDN node source returning manner, for example, a source is selected preferentially, because an edge node does not distinguish a domain name when returning to an upper node, but detects connectivity of the upper node and selects a source by using a polling round-robin method, this manner may cause multiple upper nodes to cache the same resource at the same time, and if there is no required resource in the caches of these multiple upper nodes, they all pull the resource from the source station, which may further cause a higher source returning rate for domain name access, and cause redundant storage of the upper nodes, thereby reducing the overall caching capability of the content distribution network.
On the whole, the existing CDN node back-sourcing mode also has the problems of a higher back-sourcing rate of domain name access, more serious redundant storage of upper-layer nodes, and a weaker overall caching capability of the content delivery network.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, and an electronic device for processing an access request, which can reduce a backsourcing rate of domain name access, reduce redundant storage of upper nodes in a CDN network, and further enhance an overall caching capability of the CDN network.
In a first aspect, an embodiment of the present invention provides an access request processing method, which is applied to a node device of a content distribution network, and the method includes: receiving an access request of a client aiming at a target domain name; judging whether the data of the target domain name is stored locally in the node equipment; and if the data of the target domain name is not stored, determining an upper node for processing the access request according to the target domain name, and processing the access request according to the determined upper node.
In an optional embodiment of the present invention, the node device pre-stores a first association relationship between a domain name and an upper node; the step of determining an upper node for processing the access request according to the target domain name includes: determining an upper node associated with the target domain name according to the first association relation; and determining the determined upper node as the upper node for processing the access request.
In an optional embodiment of the present invention, the first association relationship is pre-stored in a domain name system of the node device in a form of a server resource record; the step of determining the upper node associated with the target domain name according to the first association relationship includes: searching a server resource record associated with the target domain name from the domain name system; wherein the server resource record includes: a domain name, an IP address of an upper node associated with the domain name, and a weight of the upper node; and determining the upper node associated with the target domain name according to the searched server resource record.
In an alternative embodiment of the present invention, the server resource record is generated by: receiving a second association relation between a preset domain name and a preset hash ring issued by a preset management node in the content distribution network, and a hash ring rule corresponding to the hash ring; wherein the hash ring rule comprises: the identity of the upper node forming the hash ring and the weight of the upper node; and generating a server resource record corresponding to the domain name according to the second association relation and the hash ring rule.
In an optional embodiment of the present invention, the step of generating the server resource record corresponding to the domain name according to the second association relationship and the hash ring rule includes: and obtaining the server resource record corresponding to the domain name through hash calculation according to the second association relation and the hash ring rule.
In an optional embodiment of the present invention, the server resource record has a plurality of domain names, and the plurality of domain names are divided into at least one domain name group, and each domain name group is associated with an IP address of the same upper node.
In an optional embodiment of the present invention, the weight of the upper node in the hash ring is determined by: and determining the weight of the upper node according to the uplink bandwidth of the upper node in the hash ring.
In an optional embodiment of the present invention, the step of determining the upper node associated with the target domain name according to the found server resource record includes: analyzing the searched server resource record through domain name analysis service to obtain the IP address in the server resource record; and determining the node equipment corresponding to the IP address as an upper node associated with the target domain name.
In an optional embodiment of the present invention, the step of processing the access request according to the determined upper node includes: if a plurality of upper nodes are determined, screening the upper node with the maximum weight from the plurality of determined upper nodes; and processing the access request through the screened upper-layer node.
In an optional embodiment of the present invention, the step of processing the access request according to the determined upper node includes: if the determined upper nodes are all detected to have faults, determining target upper nodes from the upper nodes except the upper nodes preset to be associated with the target domain name in the content distribution network; the access request is processed by the target upper node.
In a second aspect, an embodiment of the present invention further provides an apparatus for processing an access request, where the apparatus is applied to a node device of a content distribution network, and the apparatus includes: the access request receiving module is used for receiving an access request of a client aiming at a target domain name; the judging module is used for judging whether the data of the target domain name is stored locally in the node equipment; and the access request processing module is used for determining an upper node for processing the access request according to the target domain name if the data of the target domain name is not stored, and processing the access request according to the determined upper node.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the processing method for the access request.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the above-mentioned method for processing an access request.
The embodiment of the invention has the following beneficial effects:
the access request processing method, the access request processing device and the electronic equipment provided by the embodiment of the invention receive an access request of a client aiming at a target domain name; judging whether the data of the target domain name is stored locally in the node equipment; and if the data of the target domain name is not stored, determining an upper node for processing the access request according to the target domain name, and processing the access request according to the determined upper node. In the method, by presetting the association relationship between the domain name and the back source node, when the content data of the target domain name requesting for access is not stored in the node device, the back source node corresponding to the target domain name can be determined to carry out back source according to the target domain name, so that only the resources of the target domain name are cached to the associated upper node, and polling on the upper node is not needed, thereby effectively relieving the redundant storage problem caused by caching the same resources in a plurality of upper nodes in a preferred back source mode, saving the cache space of the upper node, and enhancing the overall cache capacity of the CDN.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a processing method of an access request according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another method for processing an access request according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a hash back-to-source system framework according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an access request processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Icon: 41-access request receiving module; 42-a judgment module; 43-access request processing module; 51-a processor; 52-a memory; 53-bus; 54-communication interface.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present 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.
In view of the problems that the existing CDN node back-sourcing mode has a high back-sourcing rate of domain name access and the redundant storage of upper-layer nodes is relatively serious, the method, the apparatus, and the electronic device for processing an access request according to the embodiments of the present invention may be applied to various scenarios in which a content delivery network processes an access request. For the convenience of understanding the present embodiment, a detailed description will be given to a processing method of an access request disclosed in the present embodiment.
Referring to fig. 1, a flowchart of a processing method for an access request provided in this embodiment is shown, where the method is applied to a node device of a content distribution network, as seen in fig. 1, the method includes the following steps:
step S102: and receiving an access request of the client aiming at the target domain name.
Here, the content Delivery network, that is, a CDN (content Delivery network) network, is a distributed network formed by a cluster of node servers distributed in different areas, and a central node server of the CDN network delivers user content to the node servers, and provides content data to a user through the node servers, thereby effectively solving an internet network congestion condition and improving a response speed of a user accessing a website and usability of the website. The CDN comprises a plurality of nodes and is used for providing services such as caching, acceleration and the like for a user; the nodes are generally divided into edge nodes, middle level nodes, upper level nodes, etc. The edge nodes are used for serving main access of the domain name and caching the content of the domain name; when the edge node does not have the content cache of the domain name, the upper node is accessed, if the upper node has the domain name cache content, the upper node directly responds to the result of the edge node, and if the upper node does not have the domain name cache content, the upper node returns to the domain name source station to be pulled and cached on the node and responds to the edge node.
In this embodiment, the node device of the content distribution network may be a single device, such as a Cache device; the cluster may also be a multi-machine cluster, for example, a multi-machine cluster composed of a Linux Virtual Server (LVS), a Relay device (Relay), a Cache device, a Live device, and the like. In at least one possible embodiment, the node device is a cache server belonging to an edge node. In this embodiment, a node device receives an access request of a client for a target domain name, where the target domain name may be any domain name, for example: com, abc.com, and the like.
Step S104: and judging whether the data of the target domain name is stored locally in the node equipment.
And searching the content cache of the target domain name from the local to judge whether the data of the target domain name is stored locally. If the node device does not receive the access request for the target domain name for the first time, the content of the target domain name may be cached locally, so that the access request may be responded to according to the locally cached content. If the node device receives the access request for the target domain name for the first time, the content of the target domain name may not be cached locally, and at this time, the source needs to be returned to pull the relevant content to be cached to the node, and the access request is responded.
Step S106: and if the data of the target domain name is not stored, determining an upper node for processing the access request according to the target domain name, and processing the access request according to the determined upper node.
Here, by establishing the association relationship between the domain name and the upper node in advance, the corresponding upper node can be determined according to the domain name when the source is required to be returned. In this embodiment, if after receiving an access request from a client, the node device determines that data of the target domain name is not locally stored, it may determine a corresponding associated upper node according to the target domain name, so as to process the access request according to the associated node. Specifically, the node device forwards the access request to the determined upper node, and if the cache content of the target domain name is stored in the upper node, the node device is directly responded; if not, the upper node is required to return to the domain name source station to pull the content of the target domain name and cache the content to the upper node, and then the upper node responds to the node equipment.
Thus, with the method for processing an access request provided in this embodiment, since the association relationship between the domain name and the back-to-source node is preset, when the node device does not store the content data of the target domain name requested to be accessed, the back-to-source node corresponding to the association can be determined according to the target domain name to perform back-to-source, so that only the resource of the target domain name needs to be cached in the upper-level node of the association. Compared with a preferred source returning mode in the prior art, the method does not need to poll the upper nodes, and the problem of redundant storage caused by caching the same resources in a plurality of upper nodes is solved.
The access request processing method provided by the embodiment of the invention receives an access request of a client aiming at a target domain name; judging whether the data of the target domain name is stored locally in the node equipment; and if the data of the target domain name is not stored, determining an upper node for processing the access request according to the target domain name, and processing the access request according to the determined upper node. The method relieves the problem of redundant storage caused by caching the same resources in a plurality of upper nodes, saves the cache space of the upper nodes and enhances the overall cache capacity of the CDN.
On the basis of the processing method of the access request shown in fig. 1, the embodiment of the present invention further provides another processing method of the access request, and the method mainly describes a specific implementation process of step S106 (determining an upper node for processing the access request according to the target domain name) in the foregoing embodiment.
Fig. 2 is a schematic flow chart of another processing method of an access request, which is applied to a node device of a content distribution network, wherein the method includes the following steps:
step S202: and receiving an access request of the client aiming at the target domain name.
Step S204: and judging whether the data of the target domain name is locally stored in the node equipment or not, wherein the first association relationship between the domain name and the upper-layer node is pre-stored in the node equipment.
Here, step S202 and step S204 in this embodiment correspond to step S102 and step S104 in the foregoing embodiment, and corresponding contents may refer to corresponding parts of the foregoing embodiment, which are not described herein again.
Step S206: and if the data of the target domain name is not stored, determining an upper node associated with the target domain name according to the first association relation.
In one possible implementation manner, the first association relationship is stored in the domain name system of the node device in advance in the form of a server resource record. Moreover, the step of determining the upper node associated with the target domain name according to the first association relationship may be implemented by the following steps 11 to 12:
(11) searching a server resource record associated with the target domain name from the domain name system; wherein the server resource record includes: a domain name, an IP address of an upper node associated with the domain name, and a weight of the upper node.
Here, a Server Resource record (SRV) is a service provided by a record Server and is used to describe what service a Server can provide. For example, assume a server resource record is: com,202.108.22.5, 0.7; com, 47.104.150.239, 0.3>, the meaning of the record expression is: com, the IP address of the upper node related to the domain name is 202.108.22.5, and the weight of the upper node is 0.7; and the other domain name is cn. binding. com, the IP address of the upper node associated with the domain name is 47.104.150.239, and the weight of the upper node is 0.3.
In practical operation, if there are a plurality of domain names in the server resource record, the domain names may be further divided into one or more domain name groups, and each domain name group is associated with an IP address of the same upper node, where domain names having the same magnitude and similar service logics may be divided into one domain name group, thereby implementing a back-source policy for managing domain names in units of groups. Thus, the content of the server resource record corresponds to: a domain name group, an IP address of an upper node associated with the domain name group, and a weight of the upper node.
In one possible embodiment, the server resource record is generated through the following steps 21 to 22:
(21) receiving a second association relation between a preset domain name and a preset hash ring issued by a preset management node in the content distribution network, and a hash ring rule corresponding to the hash ring; wherein the hash ring rule comprises: the identity of the upper node that forms the hash ring, and the weight of the upper node.
In actual operation, a hash ring may be created in advance by a management node in the content distribution network, for example, a management server, where the hash ring is to store data to be stored in a specified storage location through a hash algorithm, and when querying, the data is retrieved after the storage location is found through the same algorithm. Here, the hash ring is created according to a preset hash ring rule, wherein the hash ring rule includes an identity of an upper node constituting the hash ring and a weight of the upper node.
In at least one possible implementation, the weight of the upper node may be determined according to an uplink bandwidth of the upper node in the hash ring. Here, the uplink bandwidth refers to the maximum bandwidth that can be actually used by the node, and the weight corresponding to the node is larger as the uplink bandwidth is larger. For example, assuming that the hash ring includes 3 upper nodes, the identities of which are A, B and C, and the uplink bandwidths of which are 10GB/s, 25GB/s and 15GB/s, the weights of the three nodes can be set to 0.2, 0.5 and 0.3.
Therefore, the management node creates a hash ring in advance, constructs a hash ring rule, establishes a second association relation between the hash ring and the domain name, and uniformly issues the hash ring rule and the second association relation to each edge node, thereby realizing the configuration of the hash ring policy on each node.
(22) And generating a server resource record corresponding to the domain name according to the second association relation and the hash ring rule.
In this embodiment, the node device obtains the server resource record corresponding to the domain name through hash calculation according to the received second association relationship and the hash ring rule, and loads the generated server resource record into a domain name system of the node device.
(12) And determining the upper node associated with the target domain name according to the searched server resource record.
In at least one possible implementation manner, the server resource record searched by the domain name resolution service may be analyzed to obtain an IP address in the server resource record; and then determining the node equipment corresponding to the IP address as an upper node associated with the target domain name.
Step S208: and determining the determined upper node as the upper node for processing the access request, and processing the access request according to the determined upper node.
In actual operation, assuming that there are a plurality of determined upper nodes, the upper node with the largest weight can be screened from the plurality of determined upper nodes; and processing the access request through the screened upper node.
For example, it is assumed that the upper nodes associated with the target domain name include node a, node B, node C, and node D, and the weights corresponding to the node re-server resource records are: 0.2, 0.4, 0.1, and 0.3, node B may be screened as the upper node where the weight is the greatest, and the access request is processed by node B. Therefore, even if a plurality of upper nodes are managed by the target domain name, the upper node which finally processes the access request is processed by only one upper node, so that the condition that a plurality of upper nodes return to the source for the access request is avoided.
In addition, when an upper node in the hash rule fails or is overloaded for service, the management node can sense the change in real time, recalculate the hash result according to the second association relation and the hash ring rule, generate a new server resource record and store the new server resource record in the internal domain name resolution system, so that the real-time removal of the failed node and the protection of the overloaded node can be ensured.
In another possible implementation, if the node device detects that all the determined upper nodes have faults, determining a target upper node from the upper nodes except the upper node preset to be associated with the target domain name in the content distribution network; the access request is then processed by the target upper node. That is, when the access request is processed in the above hash source returning manner, if each upper node in the hash ring associated with the target domain name fails, a preferred source returning manner is triggered to ensure that the access request of the client is processed.
According to the method for processing the access request, the domain names are divided into a plurality of groups through the Hash ring algorithm, when the domain name groups are located at the source returning upper-layer nodes, the domain names in the same group only return to a certain node, and a large amount of redundancy of resources at the plurality of upper-layer nodes is avoided, so that the overall cache capacity of the upper-layer nodes is improved, and the source station source returning rate of the domain names is reduced.
In order to more clearly understand the processing method of the access request provided by the foregoing embodiment, an application example is described below.
Referring to fig. 3, it is a schematic diagram of a hash back-to-source system framework, where the system is implemented based on the processing method of the access request in the foregoing embodiment. In the embodiment shown in fig. 3, the system comprises three parts: and managing and scheduling the system and the nodes by the central control hash ring. Wherein, the central control hash ring management comprises: creating a hash ring, adjusting the weight value of a node in the hash ring, editing the rule of an edge node returning to the hash ring, editing the rule of a hash ring returning source, and issuing the rule of the hash ring; the scheduling system includes: analyzing the configuration of a hash ring, analyzing a domain name group and generating a domain name srv record by combining the configuration of the hash ring, adjusting a hash strategy according to the node load, providing domain name srv record query, regenerating the domain name srv record after a failure node removes the hash ring, and returning a processing result of a preferred return source when the hash is abnormal; the node section includes: inquiring the domain name srv record, calculating the node address of the domain name source returning according to the srv record through a Hash algorithm, and returning to the source in a preferred mode when the Hash is abnormal.
In actual operation, the specific implementation and operation of the hash ring in the system shown in fig. 3 are as follows:
firstly, a hash ring is created through a central control productization page, nodes included in the hash ring and the weight of each node need to be defined during creation, wherein the weight of each node can be roughly matched according to the uplink bandwidth of the node. After the Hash ring is created, the Hash ring is added into the topology by editing the node back-to-source topology, and then the topology configuration is issued to each node, so that the configuration of the Hash ring strategy on the node is completed.
Then, the dispatching system generates an internally used hash domain name srv record according to a hash ring rule issued on the node and the association between the domain name group and the hash ring, and loads the srv record into the internal domain name resolution.
And finally, when the cache service of the node analyzes the target domain name of the client access request, acquiring the IP address of the back-source upper-layer node corresponding to the target domain name through an internal domain name analysis system, thereby performing back-source operation.
When a node in the Hash rule fails or is overloaded for service, the dispatching system can sense the change in real time, recalculate the Hash result and regenerate srv records, and the newly produced srv records are stored in the internal domain name resolution system, so that the real-time removal of the failed node and the protection of the overloaded node are ensured. In addition, in order to avoid the failure of the hash ring system, the system also supports the use of a preferred source-returning strategy scheme.
In this way, by using the hash source-returning system in this embodiment, when processing an access request of a client, a request for the same file can be realized, and only exists on the same node in an upper node. When the upper node of the stored file fails, the hash result is recalculated, so that the return source caused by the failure is only limited to the cache content related to the upper node, and the cache content of other upper nodes is not influenced.
The hash provenance system provided by this embodiment has the same technical features as the access request processing method provided by the above embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
Corresponding to the processing method of the access request shown in fig. 1, an embodiment of the present invention further provides an access request processing apparatus, see fig. 4, which is a schematic structural diagram of an access request processing apparatus, the apparatus is applied to a node device of a content distribution network, as can be seen from fig. 4, the apparatus includes an access request receiving module 41, a determining module 42, and an access request processing module 43, which are connected in sequence, where functions of each module are as follows:
an access request receiving module 41, configured to receive an access request of a client for a target domain name;
a determining module 42, configured to determine whether the data of the target domain name is stored locally in the node device;
and an access request processing module 43, configured to determine, according to the target domain name, an upper node for processing the access request if the data of the target domain name is not stored, and process the access request according to the determined upper node.
The processing device for the access request provided by the embodiment of the invention receives the access request of a client aiming at a target domain name; judging whether the data of the target domain name is stored locally in the node equipment; and if the data of the target domain name is not stored, determining an upper node for processing the access request according to the target domain name, and processing the access request according to the determined upper node. In the device, by presetting the association relationship between the domain name and the back source node, when the content data of the target domain name requesting for access is not stored in the node equipment, the back source node corresponding to the target domain name can be determined to carry out back source according to the target domain name, so that only the resources of the target domain name are cached to the associated upper node, and the upper node is not required to be polled, thereby effectively relieving the redundant storage problem caused by caching the same resources in a plurality of upper nodes in a preferred back source mode, saving the cache space of the upper node, and enhancing the overall cache capacity of the CDN.
In one possible implementation manner, the node device pre-stores a first association relationship between a domain name and an upper node; the access request processing module 43 is further configured to: determining an upper node associated with the target domain name according to the first association relation; and determining the determined upper node as the upper node for processing the access request.
In another possible implementation manner, the first association relationship is stored in a domain name system of the node device in advance in the form of a server resource record; the access request processing module 43 is further configured to: searching a server resource record associated with the target domain name from the domain name system; wherein the server resource record includes: a domain name, an IP address of an upper node associated with the domain name, and a weight of the upper node; and determining the upper node associated with the target domain name according to the searched server resource record.
In another possible embodiment, the server resource record is generated by: receiving a second association relation between a preset domain name and a preset hash ring issued by a preset management node in the content distribution network, and a hash ring rule corresponding to the hash ring; wherein the hash ring rule comprises: the identity of the upper node forming the hash ring and the weight of the upper node; and generating a server resource record corresponding to the domain name according to the second association relation and the hash ring rule.
In another possible implementation manner, the step of generating the server resource record corresponding to the domain name according to the second association relationship and the hash ring rule includes: and obtaining the server resource record corresponding to the domain name through hash calculation according to the second association relation and the hash ring rule.
In another possible implementation, the server resource record has a plurality of domain names, and the domain names are divided into at least one domain name group, and each domain name group is associated with an IP address of the same upper node.
In another possible implementation, the weight of the upper node in the hash ring is determined by: and determining the weight of the upper node according to the uplink bandwidth of the upper node in the hash ring.
In another possible implementation manner, the step of determining the upper node associated with the target domain name according to the found server resource record includes: analyzing the searched server resource record through domain name analysis service to obtain an IP address in the server resource record; and determining the node equipment corresponding to the IP address as an upper node associated with the target domain name.
In another possible implementation, the access request processing module 43 is further configured to: if a plurality of upper nodes are determined, screening the upper node with the maximum weight from the plurality of determined upper nodes; and processing the access request through the screened upper-layer node.
In another possible implementation, the access request processing module 43 is further configured to: if the determined upper nodes are all detected to have faults, determining target upper nodes from the upper nodes except the upper nodes preset to be associated with the target domain name in the content distribution network; the access request is processed by the target upper node.
The implementation principle and the generated technical effect of the processing apparatus for an access request provided by the embodiment of the present invention are the same as those of the foregoing processing method for an access request, and for brief description, reference may be made to corresponding contents in the foregoing processing method for an access request where no mention is made in the embodiment of the processing apparatus for an access request.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which is a schematic structural diagram of the electronic device, where the electronic device includes a processor 51 and a memory 52, the memory 52 stores machine executable instructions capable of being executed by the processor 51, and the processor 51 executes the machine executable instructions to implement the processing method of the access request.
In the embodiment shown in fig. 5, the electronic device further comprises a bus 53 and a communication interface 54, wherein the processor 51, the communication interface 54 and the memory 52 are connected by the bus.
The Memory 52 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 54 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
The processor 51 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 51. The Processor 51 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory, and the processor 51 reads the information in the memory 52, and completes the steps of the processing method of the access request of the foregoing embodiment in combination with the hardware thereof.
An embodiment of the present invention further provides a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the method for processing the access request, and specific implementation may refer to the foregoing method embodiment, and is not described herein again.
The method for processing an access request, the apparatus for processing an access request, and the computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program codes, where instructions included in the program codes may be used to execute the method for processing an access request described in the foregoing method embodiments, and specific implementations may refer to the method embodiments and are not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (13)

1. A method for processing an access request, applied to a node device of a content distribution network, the method comprising:
receiving an access request of a client aiming at a target domain name;
judging whether the data of the target domain name is stored locally in the node equipment;
and if the data of the target domain name is not stored, determining an upper node for processing the access request according to the target domain name, and processing the access request according to the determined upper node.
2. The method according to claim 1, wherein a first association relationship between a domain name and an upper node is pre-stored in the node device;
the step of determining an upper node for processing the access request according to the target domain name includes:
determining an upper node associated with the target domain name according to the first association relation;
and determining the determined upper node as the upper node for processing the access request.
3. The method according to claim 2, wherein the first association relationship is pre-stored in a domain name system of the node device in the form of a server resource record;
the step of determining an upper node associated with the target domain name according to the first association relationship includes:
searching a server resource record associated with the target domain name from the domain name system; wherein the server resource record comprises: a domain name, an IP address of an upper node associated with the domain name, and a weight of the upper node;
and determining an upper node associated with the target domain name according to the searched server resource record.
4. The method of claim 3, wherein the server resource record is generated by:
receiving a second association relation between a preset domain name and a preset hash ring issued by a preset management node in the content distribution network, and a hash ring rule corresponding to the hash ring; wherein the hash ring rule comprises: the identity of an upper node forming the hash ring and the weight of the upper node;
and generating a server resource record corresponding to the domain name according to the second association relation and the hash ring rule.
5. The method according to claim 4, wherein the step of generating the server resource record corresponding to the domain name according to the second association relationship and the hash ring rule includes:
and obtaining the server resource record corresponding to the domain name through hash calculation according to the second association relation and the hash ring rule.
6. The method according to any one of claims 3 to 5, wherein there are a plurality of domain names in the server resource record, and the domain names are divided into at least one domain name group, and each domain name group is associated with an IP address of the same upper node.
7. The method according to claim 4, wherein the weight of the upper node in the hash ring is determined by:
and determining the weight of the upper node according to the uplink bandwidth of the upper node in the hash ring.
8. The method for processing an access request according to claim 3, wherein the step of determining the upper node associated with the target domain name according to the found server resource record includes:
analyzing the searched server resource record through domain name analysis service to obtain an IP address in the server resource record;
and determining the node equipment corresponding to the IP address as an upper node associated with the target domain name.
9. The method according to claim 1, wherein the step of processing the access request according to the determined upper node comprises:
if a plurality of the determined upper-layer nodes exist, screening the upper-layer node with the maximum weight from the plurality of the determined upper-layer nodes;
and processing the access request through the screened upper-layer node.
10. The method according to claim 1, wherein the step of processing the access request according to the determined upper node comprises:
if the determined upper nodes are all detected to have faults, determining target upper nodes from the upper nodes except the upper nodes preset to be associated with the target domain name in the content distribution network;
and processing the access request through the target upper node.
11. An apparatus for processing an access request, applied to a node device of a content distribution network, the apparatus comprising:
the access request receiving module is used for receiving an access request of a client aiming at a target domain name;
the judging module is used for judging whether the data of the target domain name is stored locally in the node equipment;
and the access request processing module is used for determining an upper node for processing the access request according to the target domain name if the data of the target domain name is not stored, and processing the access request according to the determined upper node.
12. An electronic device, comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of processing an access request of any one of claims 1 to 10.
13. A computer-readable storage medium having stored thereon computer-executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of processing an access request of any one of claims 1 to 10.
CN202011069197.6A 2020-09-30 2020-09-30 Access request processing method and device and electronic equipment Pending CN112153160A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011069197.6A CN112153160A (en) 2020-09-30 2020-09-30 Access request processing method and device and electronic equipment
PCT/CN2021/107856 WO2022068333A1 (en) 2020-09-30 2021-07-22 Access request processing method and apparatus, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011069197.6A CN112153160A (en) 2020-09-30 2020-09-30 Access request processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112153160A true CN112153160A (en) 2020-12-29

Family

ID=73952543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011069197.6A Pending CN112153160A (en) 2020-09-30 2020-09-30 Access request processing method and device and electronic equipment

Country Status (2)

Country Link
CN (1) CN112153160A (en)
WO (1) WO2022068333A1 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112929456A (en) * 2021-05-11 2021-06-08 杭州又拍云科技有限公司 Method for protecting abnormal state of centralized source returning and source station
CN113312612A (en) * 2021-07-29 2021-08-27 支付宝(杭州)信息技术有限公司 Application access method and device in multi-party security computing
CN113472852A (en) * 2021-06-02 2021-10-01 乐视云计算有限公司 CDN node back-source method, device and equipment
CN113873302A (en) * 2021-09-29 2021-12-31 北京金山云网络技术有限公司 Content distribution method, content distribution device, storage medium and electronic equipment
CN113992760A (en) * 2021-10-22 2022-01-28 北京百度网讯科技有限公司 Back source flow scheduling method, device, equipment and storage medium
CN114025023A (en) * 2022-01-04 2022-02-08 北京金山云网络技术有限公司 Source returning method, device, equipment and computer readable storage medium
WO2022068333A1 (en) * 2020-09-30 2022-04-07 北京金山云网络技术有限公司 Access request processing method and apparatus, electronic device, and computer-readable storage medium
CN114900562A (en) * 2022-05-09 2022-08-12 北京百度网讯科技有限公司 Resource acquisition method and device, electronic equipment and storage medium
WO2022170934A1 (en) * 2021-02-09 2022-08-18 北京金山云网络技术有限公司 Content delivery network bandwidth scheduling method, apparatus, and device
CN115150258A (en) * 2021-03-30 2022-10-04 天翼云科技有限公司 CDN node configuration method, system and storage medium
CN115250294A (en) * 2021-04-25 2022-10-28 贵州白山云科技股份有限公司 Data request processing method based on cloud distribution, and system, medium and equipment thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020052942A1 (en) * 2000-07-19 2002-05-02 Swildens Eric Sven-Johan Content delivery and global traffic management network system
US20150237159A1 (en) * 2014-02-19 2015-08-20 Level 3 Communications, Llc Content delivery network architecture with edge proxy
CN105262841A (en) * 2015-11-06 2016-01-20 浪潮软件集团有限公司 CDN network load balancing implementation method and CDN scheduling server
CN108737470A (en) * 2017-04-19 2018-11-02 贵州白山云科技有限公司 A kind of access request time source method and apparatus
CN109639801A (en) * 2018-12-17 2019-04-16 深圳市网心科技有限公司 Back end distribution and data capture method and system
CN110430286A (en) * 2019-08-30 2019-11-08 杭州领智云画科技有限公司 Method, apparatus, equipment and the storage medium of resource are obtained in CDN system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9160809B2 (en) * 2012-11-26 2015-10-13 Go Daddy Operating Company, LLC DNS overriding-based methods of accelerating content delivery
US9813515B2 (en) * 2013-10-04 2017-11-07 Akamai Technologies, Inc. Systems and methods for caching content with notification-based invalidation with extension to clients
CN104754073A (en) * 2015-03-25 2015-07-01 百度在线网络技术(北京)有限公司 Resource access method and device
CN112153160A (en) * 2020-09-30 2020-12-29 北京金山云网络技术有限公司 Access request processing method and device and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020052942A1 (en) * 2000-07-19 2002-05-02 Swildens Eric Sven-Johan Content delivery and global traffic management network system
US20150237159A1 (en) * 2014-02-19 2015-08-20 Level 3 Communications, Llc Content delivery network architecture with edge proxy
CN105262841A (en) * 2015-11-06 2016-01-20 浪潮软件集团有限公司 CDN network load balancing implementation method and CDN scheduling server
CN108737470A (en) * 2017-04-19 2018-11-02 贵州白山云科技有限公司 A kind of access request time source method and apparatus
CN111464649A (en) * 2017-04-19 2020-07-28 贵州白山云科技股份有限公司 Access request source returning method and device
CN109639801A (en) * 2018-12-17 2019-04-16 深圳市网心科技有限公司 Back end distribution and data capture method and system
CN110430286A (en) * 2019-08-30 2019-11-08 杭州领智云画科技有限公司 Method, apparatus, equipment and the storage medium of resource are obtained in CDN system

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022068333A1 (en) * 2020-09-30 2022-04-07 北京金山云网络技术有限公司 Access request processing method and apparatus, electronic device, and computer-readable storage medium
WO2022170934A1 (en) * 2021-02-09 2022-08-18 北京金山云网络技术有限公司 Content delivery network bandwidth scheduling method, apparatus, and device
CN115150258A (en) * 2021-03-30 2022-10-04 天翼云科技有限公司 CDN node configuration method, system and storage medium
CN115250294A (en) * 2021-04-25 2022-10-28 贵州白山云科技股份有限公司 Data request processing method based on cloud distribution, and system, medium and equipment thereof
CN115250294B (en) * 2021-04-25 2024-03-22 贵州白山云科技股份有限公司 Cloud distribution-based data request processing method and system, medium and equipment thereof
CN112929456A (en) * 2021-05-11 2021-06-08 杭州又拍云科技有限公司 Method for protecting abnormal state of centralized source returning and source station
CN112929456B (en) * 2021-05-11 2022-04-01 杭州又拍云科技有限公司 Method for protecting abnormal state of centralized source returning and source station
CN113472852A (en) * 2021-06-02 2021-10-01 乐视云计算有限公司 CDN node back-source method, device and equipment
CN113472852B (en) * 2021-06-02 2023-07-25 乐视云网络技术(北京)有限公司 Method, device and equipment for returning source of CDN node and storage medium
CN113312612A (en) * 2021-07-29 2021-08-27 支付宝(杭州)信息技术有限公司 Application access method and device in multi-party security computing
CN113873302A (en) * 2021-09-29 2021-12-31 北京金山云网络技术有限公司 Content distribution method, content distribution device, storage medium and electronic equipment
CN113873302B (en) * 2021-09-29 2024-04-26 北京金山云网络技术有限公司 Content distribution method, content distribution device, storage medium and electronic equipment
CN113992760A (en) * 2021-10-22 2022-01-28 北京百度网讯科技有限公司 Back source flow scheduling method, device, equipment and storage medium
CN113992760B (en) * 2021-10-22 2024-03-01 北京百度网讯科技有限公司 Method, device, equipment and storage medium for scheduling back source traffic
CN114025023B (en) * 2022-01-04 2022-05-10 北京金山云网络技术有限公司 Source returning method, device, equipment and computer readable storage medium
CN114025023A (en) * 2022-01-04 2022-02-08 北京金山云网络技术有限公司 Source returning method, device, equipment and computer readable storage medium
CN114900562A (en) * 2022-05-09 2022-08-12 北京百度网讯科技有限公司 Resource acquisition method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2022068333A1 (en) 2022-04-07

Similar Documents

Publication Publication Date Title
CN112153160A (en) Access request processing method and device and electronic equipment
US10778801B2 (en) Content delivery network architecture with edge proxy
CN109660607B (en) Service request distribution method, service request receiving method, service request distribution device, service request receiving device and server cluster
CN107426302B (en) Access scheduling method, device, system, terminal, server and storage medium
US10601767B2 (en) DNS query processing based on application information
US8510448B2 (en) Service provider registration by a content broker
CN106790324B (en) Content distribution method, virtual server management method, cloud platform and system
JP5150769B2 (en) Updating routing information using request routing and client location information
CN111464649B (en) Access request source returning method and device
CN113472852B (en) Method, device and equipment for returning source of CDN node and storage medium
JP2013525931A (en) Dynamic binding used for content delivery
CN110636068B (en) Method and device for identifying unknown CDN node in CC attack protection
CN104980478A (en) Cache sharing method, devices and system in content delivery network
CN113497817A (en) Traffic scheduling method and device, edge node of CDN (content delivery network) and server
CN107105013B (en) File processing method, server, terminal and system
CN109743357B (en) Method and device for realizing service access continuity
CN112751912B (en) Configuration adjustment method and device and electronic equipment
CN114124797B (en) Server routing method and device, electronic equipment and storage medium
CN111464624A (en) Content refreshing method and device for CDN (content delivery network) and electronic equipment
CN113596105B (en) Content acquisition method, edge node and computer readable storage medium
JP7392168B2 (en) URL refresh method, device, equipment and CDN node in CDN
CN111104376B (en) Resource file query method and device
CN113542373A (en) Routing service discovery device and method for PAAS platform
CN111125580A (en) Network resource acquisition method and device, electronic equipment and storage medium
CN113497813B (en) Content refreshing method and device for content distribution network and electronic equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201229

RJ01 Rejection of invention patent application after publication