CN110855806A - Domain name request processing method and device and server - Google Patents

Domain name request processing method and device and server Download PDF

Info

Publication number
CN110855806A
CN110855806A CN201910923464.2A CN201910923464A CN110855806A CN 110855806 A CN110855806 A CN 110855806A CN 201910923464 A CN201910923464 A CN 201910923464A CN 110855806 A CN110855806 A CN 110855806A
Authority
CN
China
Prior art keywords
domain name
name request
resolution result
analysis result
duration
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
CN201910923464.2A
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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201910923464.2A priority Critical patent/CN110855806A/en
Publication of CN110855806A publication Critical patent/CN110855806A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention relates to the technical field of internet communication, and discloses a domain name request processing method, a domain name request processing device and a server. The domain name request processing method comprises the following steps: acquiring a first analysis result corresponding to a domain name request to be responded; judging whether the storage time length of the first analysis result exceeds a preset time length threshold value or not; wherein, the time length threshold value is larger than the expiration time length corresponding to the first analysis result; and if the storage duration of the first analysis result does not exceed the preset duration threshold, taking the first analysis result as the response content of the domain name request. In the invention, for the first analysis result with the storage duration exceeding the effective duration and being less than the duration threshold, the first analysis result is still judged to be effective, the analysis result does not need to be obtained again from the DNS server, the processing speed of the domain name request is improved, the processing success rate of the domain name request is improved to a certain extent, and the service quality is improved.

Description

Domain name request processing method and device and server
Technical Field
The embodiment of the invention relates to the technical field of internet communication, in particular to a domain name request processing method, a domain name request processing device and a server.
Background
A Content Delivery Network (CDN) is an intelligent virtual Network built on the basis of the existing Network, and users can obtain required Content nearby by using functional modules of load balancing, Content Delivery, scheduling and the like of a central platform by means of edge servers deployed in various places, so that Network congestion is reduced, and the access response speed and hit rate of the users are increased. When the CDN server carries out domain name resolution, if a resolution result cached locally is overdue, a query request needs to be sent to the DNS server, if the query is successful, the resolution result returned by the DNS server is received, and the resolution result is returned; and if the query fails, clearing the analysis result of the local cache and returning a null value.
However, the inventors found that at least the following problems exist in the prior art: when the analysis result of the local cache is out of date, the health conditions of the network and the DNS server are excessively depended, and the service waiting time is long.
Disclosure of Invention
An object of embodiments of the present invention is to provide a method and an apparatus for processing a domain name request, and a server, where for a first resolution result whose storage duration exceeds an effective duration and is less than a duration threshold, it is still determined that the first resolution result is valid, and it is not necessary to obtain a resolution result again from a DNS server, so that a processing speed of a domain name request is increased, and a success rate of processing a domain name request is increased to a certain extent, thereby improving service quality.
In order to solve the above technical problem, an embodiment of the present invention provides a domain name request processing method, including: acquiring a first analysis result corresponding to a domain name request to be responded; judging whether the storage time length of the first analysis result exceeds a preset time length threshold value or not; wherein, the time length threshold value is larger than the expiration time length corresponding to the first analysis result; and if the storage duration of the first analysis result does not exceed the preset duration threshold, taking the first analysis result as the response content of the domain name request.
An embodiment of the present invention provides a domain name request processing apparatus, including: the system comprises a business module and a data access module connected with the business module; the data access module is used for acquiring a first analysis result corresponding to the domain name request to be responded, and judging whether the storage duration of the first analysis result exceeds a preset duration threshold value; wherein, the time length threshold value is larger than the expiration time length corresponding to the first analysis result; and the service module is used for taking the first analysis result as the response content of the domain name request when the data access module judges that the storage time length of the first analysis result does not exceed the preset time length threshold.
An embodiment of the present invention further provides a server, including: the domain name request processing device.
Compared with the prior art, the method and the device for analyzing the domain name request have the advantages that when the domain name request is received, the analysis corresponding to the domain name request to be responded is firstly obtained, whether the storage time length of the first analysis result is greater than a preset time length threshold value or not is judged, and when the storage time length of the first analysis result does not exceed the preset time length threshold value, the first analysis result is used as the response content of the domain name request; because the time length threshold is longer than the expiration time length of the first analysis result, which is equivalent to increasing the effective time of the first analysis result, for the first analysis result of which the storage time length is longer than the effective time length and shorter than the time length threshold, the first analysis result is still judged to be effective, the analysis result does not need to be obtained again from the DNS, the processing speed of the domain name request is increased, the processing success rate of the domain name request is increased to a certain extent, and the service quality is improved.
In addition, before determining whether the storage duration of the first analysis result exceeds a preset duration threshold, the method further includes: judging whether the storage time length exceeds the expiration time length or not; and if the storage duration exceeds the expiration duration, the step of judging whether the storage duration of the first analysis result exceeds a preset duration threshold value is carried out. In this embodiment, only when the first parsing result is expired, whether the storage duration exceeds the expiration duration is determined, so as to avoid repeated determination.
In addition, when the storage duration of the first analysis result is judged to exceed a preset duration threshold, a query request comprising a domain name request is sent to the DNS; and if a second resolution result corresponding to the domain name request returned by the DNS server is not received, taking the first resolution result as the response content of the domain name request. In this embodiment, when the first resolution result corresponding to the obtained domain name request is invalid and the latest resolution result cannot be obtained from the DNS server, the invalid first resolution result is used as the response content of the domain name request, so as to continue to execute the corresponding service, and further improve the success rate of processing the domain name request.
In addition, when the storage duration of the first analysis result is judged not to exceed the preset effective duration, a query request comprising a domain name request is sent to the DNS; and when a second resolution result corresponding to the domain name request returned by the DNS is received, replacing the first resolution result with the second resolution result. In this embodiment, when the storage duration of the first resolution result is longer than the expiration duration of the first resolution result and shorter than the effective duration of the first resolution result, that is, for the first resolution result that has expired but does not exceed the effective duration, the first resolution result is directly used as the response content of the domain name request, it is not necessary to wait for the DNS server to return the resolution result, and the latest resolution result returned by the DNS server is used to update the first resolution result in the local cache, so that the asynchronous update of the expired first resolution result is realized.
When a second resolution result corresponding to the domain name request returned by the DNS server is received, the second resolution result is used as the response content of the domain name request.
In addition, acquiring a first resolution result corresponding to the domain name request to be responded includes: judging whether a first resolution result corresponding to the domain name request exists in the cache; if the first resolution result corresponding to the domain name request exists in the cache, the first resolution result corresponding to the domain name request is obtained from the cache; and if the first resolution result corresponding to the domain name request does not exist in the cache, acquiring the first resolution result corresponding to the domain name request from the DNS server. The embodiment provides a specific implementation mode for acquiring a first resolution result corresponding to a domain name request to be responded.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a detailed flowchart of a domain name request processing method according to a first embodiment of the present invention;
fig. 2 is a detailed flowchart of a domain name request processing method according to a second embodiment of the present invention;
fig. 3 is a detailed flowchart of a domain name request processing method according to a third embodiment of the present invention;
fig. 4 is a block diagram schematically illustrating a domain name request processing apparatus according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The first embodiment of the present invention relates to a domain name request processing method, which is applied to a server, wherein the server is a CDN server, and a system layered architecture of the CDN server at least includes: a service layer and a data access layer; in addition, the CDN server is also connected with at least one DNS server.
Fig. 1 shows a specific flow of the domain name request processing method according to the present embodiment.
Step 101, obtaining a first resolution result corresponding to a domain name request to be responded.
Specifically, in the process of executing a configured service (e.g., a live broadcast service), if a domain name query needs to be performed for the service, a service layer of the CDN server initiates a domain name request to a data access layer, where the domain name request is a query request of a domain name including the service, and the data access layer obtains an analysis result of the domain name, that is, a first analysis result corresponding to a domain name request to be responded, and the first analysis result is an IP address of the domain name. The specific way for the data access layer to obtain the first resolution result of the domain name is as follows: when receiving a query request including a domain name, a data access layer firstly judges whether an analysis result corresponding to the domain name exists in a local cache, and if the analysis result corresponding to the domain name exists in the local cache, the data access layer directly obtains the analysis result corresponding to the domain name from the local cache as a first analysis result; if the domain name does not exist, initiating a query request including the domain name to the DNS server, waiting for the DNS server to return an analysis result corresponding to the domain name, namely acquiring the analysis result corresponding to the domain name request from the DNS server as a first analysis result, and caching the first analysis result. When the DNS server returns a first analysis result corresponding to the domain name request, the expiration time of the first analysis result is set, the expiration time is carried in the first analysis result, and when the storage time of the first analysis result exceeds the expiration time, the first analysis result is expired.
And 102, judging whether the storage time length of the first analysis result exceeds a preset time length threshold value. If yes, directly ending; if not, go to step 103.
Specifically, when the data access layer caches the analysis results, the data access layer records the storage duration of each analysis result, and meanwhile, a duration threshold is preset in the data access layer to represent the effective duration of each analysis result, wherein the duration threshold is greater than the expiration duration of each analysis result. After acquiring a first analysis result corresponding to the domain name request, the data access layer judges whether the storage duration of the first analysis result exceeds a preset duration threshold, if the storage duration of the first analysis result does not exceed the preset duration threshold, the first analysis result is still valid, and the first analysis result is returned to the service layer no matter whether the storage duration of the first analysis result exceeds the corresponding expiration duration, and the step 103 is entered; otherwise, the first analysis result is failed, and the first analysis result cannot be returned to the service layer, and the process is finished directly. In this step, it is generally determined whether the storage duration of the first analysis result exceeds a preset duration threshold only for the first analysis result obtained from the local cache.
And 103, taking the first resolution result as the response content of the domain name request.
Specifically, when receiving a first analysis result returned by the data access layer, the service layer continues to execute the service by using the first analysis result as response content required by the executed service.
Compared with the prior art, the method includes the steps that when a domain name request is received, a first analysis result corresponding to the domain name request to be responded is obtained, whether the storage time length of the first analysis result is larger than a preset time length threshold value or not is judged, and when the storage time length of the first analysis result does not exceed the preset time length threshold value, the first analysis result is used as response content of the domain name request; because the time length threshold is greater than the expiration time length of the first analysis result, which is equivalent to increasing the effective time of the first analysis result, for the first analysis result of which the storage time length exceeds the effective time length and is less than the time length threshold, the first analysis result is still judged to be effective, the analysis result does not need to be obtained again from the DNS, the processing speed of the domain name request is increased, the processing success rate of the domain name request is increased to a certain extent, and the service quality is improved.
A second embodiment of the present invention relates to a domain name request processing method, which is an improvement over the first embodiment, and the main improvements are: asynchronous updating of the analytic result is achieved.
Fig. 2 shows a specific flow of the domain name request processing method according to the present embodiment.
Step 201, a first resolution result corresponding to the domain name request to be responded is obtained.
Specifically, this step is substantially the same as step 101 in the first embodiment, and is not described herein again.
Step 202, determine whether the storage duration exceeds the expiration duration. If yes, go to step 203; if not, the process is ended directly.
Specifically, when caching the analysis results, the data access layer records the storage duration of each analysis result, and the analysis results returned by the DNS server include the expiration duration of the analysis results. After acquiring a first resolution result corresponding to the domain name request, the data access layer judges whether the storage duration of the first resolution result exceeds the expiration duration corresponding to the first resolution result, that is, judges whether the first resolution result is expired, and if the first resolution result is expired, the data access layer enters step 203 to judge whether the storage duration of the first resolution result exceeds a preset duration threshold, that is, judges whether the first resolution result is within a preset effective duration; if the first analysis result is not expired, the first analysis result can be directly returned to the service layer, and the service layer takes the first analysis result as the response content of the domain name request and continues to execute the corresponding service.
Step 203, determining whether the storage duration of the first analysis result exceeds a preset duration threshold. If yes, directly ending; if not, go to step 204.
Specifically, this step is substantially the same as step 102 in the first embodiment, and is not described herein again.
And step 204, using the first resolution result as the response content of the domain name request.
Specifically, this step is substantially the same as step 103 in the first embodiment, and is not described herein again.
Step 205, a query request including a domain name request is sent to a DNS server.
Specifically, as shown in steps 202 and 203, the storage duration of the first resolution result is longer than the expiration duration of the first resolution result and shorter than the effective duration of the first resolution result, which indicates that the first resolution result in the local cache is expired, and after the data access layer returns the first resolution result to the service layer, the data access layer initiates a query request including the domain name request to the DNS server, so as to obtain the latest resolution result corresponding to the domain name request from the DNS server.
And step 206, when a second resolution result corresponding to the domain name request returned by the DNS server is received, replacing the first resolution result with the second resolution result.
Specifically, when receiving a query request including a domain name request, the DNS server obtains a latest resolution result corresponding to the domain name request as a second resolution result, and then returns the second resolution result to the CDN server, after receiving the second resolution result, a data access layer of the CDN server replaces a resolution result in the cache with the second resolution result, that is, replaces an expired resolution result (i.e., a first resolution result) in the local cache with a latest resolution result (i.e., a second resolution result) in the DNS server, thereby implementing updating of the expired first resolution result.
Compared with the first embodiment, when the storage duration of the resolution result is longer than the expiration duration of the resolution result and shorter than the effective duration of the resolution result, that is, for the first resolution result that has expired but does not exceed the effective duration, the first resolution result is directly used as the response content of the domain name request, it is not necessary to wait for the DNS server to return the resolution result, and the latest second resolution result returned by the DNS server is used to update the first resolution result in the local cache, thereby implementing asynchronous update of the expired first resolution result.
A third embodiment of the present invention relates to a domain name request processing method, which is an improvement over the first embodiment, and has the main improvements that: and when the first resolution result corresponding to the acquired domain name request is invalid and the latest resolution result cannot be acquired from the DNS, taking the invalid first resolution result as the response content of the domain name request.
A specific flow of the preset manner of the correspondence between the check value and the password information in this embodiment is shown in fig. 3.
Step 301, obtaining a first resolution result corresponding to the domain name request to be responded.
Specifically, this step is substantially the same as step 101 in the first embodiment, and is not described herein again.
Step 302, determine whether the storage duration of the first parsing result exceeds a preset duration threshold. If yes, go to step 303; if not, go to step 306.
Specifically, this step is substantially the same as step 102 in the first embodiment, and is not repeated here, but the main differences are: when it is determined that the storage duration of the first analysis result exceeds the preset duration threshold, it indicates that the first analysis result is expired and failed, and then step 303 is performed.
Step 303, send a query request including a domain name request to the DNS server.
Specifically, the data access layer initiates a query request including the domain name request to the DNS server to obtain the latest resolution result from the DNS server.
Step 304, determining whether a second resolution result corresponding to the domain name request returned by the DNS server is received. If yes, go to step 305; if not, go to step 306.
And step 305, using the second resolution result as the response content of the domain name request.
Step 306, using the first resolution result as the response content of the domain name request.
Specifically, when receiving a query request including a domain name request, the DNS server may locally obtain a latest resolution result, that is, a second resolution result, corresponding to the domain name request from the DNS server if the network state and the health state of the DNS server are both good, and then return the second resolution result to the CDN server, after receiving the second resolution result, a data access layer of the CDN server returns the second resolution result to a service layer, and removes a first resolution result corresponding to the domain name request in a local cache, and the service layer takes the second resolution result as response content of the domain name request, continues to execute a corresponding service, and then may remove the first resolution result in the local cache, and cache the second resolution result; if the network state or the health state of the DNS server is in a problem, it may not be possible to return the second resolution result corresponding to the domain name request to the CDN server, and when the second resolution result is not received by the data access layer of the CDN server within a preset time, it is determined that the query is failed, and because the first resolution result in the local cache has not been cleared, the first resolution result is returned to the service layer first, so that the service layer uses the first resolution result as the response content of the domain name request, continues to execute the corresponding service, and then may continue to send the query request including the domain name request to the DNS server, so as to obtain the latest resolution result.
Compared with the first embodiment, when the first resolution result corresponding to the obtained domain name request is invalid and the latest resolution result cannot be obtained from the DNS server, the embodiment uses the invalid first resolution result as the response content of the domain name request, so as to continue to execute the corresponding service, and further improve the success rate of processing the domain name request. The present embodiment can be modified from the second embodiment, and the same technical effects can be achieved.
A fourth embodiment of the present invention relates to a domain name request processing apparatus applied to a server, where the server is a CDN server, and a system hierarchical architecture of the CDN server at least includes: a service layer and a data access layer; in addition, the CDN server is also connected with at least one DNS server.
In this embodiment, referring to fig. 4, the domain name request processing apparatus includes: the service module 1 is connected with the data access module 2 of the service module 1; the service module 1 corresponds to the service layer, and the data access module 2 corresponds to the data access layer.
In the process of executing configured service (for example, live broadcast service), if domain name query needs to be performed on the service, the service module 1 of the CND server initiates a domain name request to the data access module 2, where the domain name request is a query request of a domain name including the service.
The data access module 2 is used for acquiring a first analysis result corresponding to the domain name request to be responded, and judging whether the storage duration of the first analysis result exceeds a preset duration threshold; and the time length threshold is greater than the expiration time length corresponding to the first analysis result. Specifically, when receiving the domain name request sent by the service module 1, the data access module 2 obtains an analysis result corresponding to the domain name, that is, a first analysis result corresponding to the domain name request to be responded, where the first analysis result is the IP address of the domain name. When the data access module 2 caches the analysis results, the storage duration of each analysis result is recorded, and meanwhile, a duration threshold value is preset in the data access module 2 to represent the effective duration of each analysis result, wherein the duration threshold value is greater than the expiration duration of each analysis result. The data access module 2 judges whether the storage time length of the first analysis result exceeds a preset time length threshold or not after acquiring the first analysis result corresponding to the domain name request, if the storage time length of the first analysis result does not exceed the preset time length threshold, the first analysis result is still valid, and the first analysis result is returned to the service layer no matter whether the storage time length of the first analysis result exceeds the corresponding expiration time length or not; otherwise, the first analysis result is failed, and the first analysis result cannot be returned to the service layer, and the process is finished directly. Generally, only when the obtained first analysis result is from the local cache, whether the storage duration of the first analysis result exceeds a preset duration threshold is determined.
In one example, the data access module 2 is configured to determine whether a first resolution result corresponding to the domain name request exists in the cache; if the first resolution result corresponding to the domain name request exists in the cache, the data access module 2 acquires the first resolution result corresponding to the domain name request from the cache; if the first resolution result corresponding to the domain name request does not exist in the cache, the data access module 2 obtains the first resolution result corresponding to the domain name request from the DNS server.
The service module 1 is further configured to, when the data access module 2 determines that the storage duration of the first analysis result does not exceed the preset duration threshold, use the first analysis result as response content of the domain name request, that is, when the service module 1 receives the first analysis result returned by the data access module 2, use the first analysis result as response content required by the executed service, and continue to execute the service.
Since the first embodiment corresponds to the present embodiment, the present embodiment can be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and the technical effects that can be achieved in the first embodiment can also be achieved in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
Compared with the prior art, the method includes the steps that when a domain name request is received, a first analysis result corresponding to the domain name request to be responded is obtained, whether the storage time length of the first analysis result is larger than a preset time length threshold value or not is judged, and when the storage time length of the first analysis result does not exceed the preset time length threshold value, the first analysis result is used as response content of the domain name request; because the time length threshold is greater than the expiration time length of the first analysis result, which is equivalent to increasing the effective time of the first analysis result, for the first analysis result of which the storage time length exceeds the effective time length and is less than the time length threshold, the first analysis result is still judged to be effective, the analysis result does not need to be obtained again from the DNS, the processing speed of the domain name request is increased, the processing success rate of the domain name request is increased to a certain extent, and the service quality is improved.
A fifth embodiment of the present invention relates to a domain name request processing apparatus, and is an improvement of the fourth embodiment, and the main improvements are that: asynchronous updating of the analytic result is achieved.
The data access module 2 is further configured to determine whether the storage duration exceeds the expiration duration, and determine whether the storage duration of the first parsing result exceeds a preset duration threshold when it is determined that the storage duration exceeds the expiration duration.
The data access module 2 is further configured to send a query request including a domain name request to the DNS server when it is determined that the storage duration of the first resolution result does not exceed the preset effective duration.
The data access module 2 is further configured to replace the first resolution result with the second resolution result when receiving the second resolution result corresponding to the domain name request returned by the DNS server.
Since the second embodiment corresponds to the present embodiment, the present embodiment can be implemented in cooperation with the second embodiment. The related technical details mentioned in the second embodiment are still valid in this embodiment, and the technical effects that can be achieved in the second embodiment can also be achieved in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the second embodiment.
Compared with the fourth embodiment, when the storage duration of the resolution result is longer than the expiration duration of the resolution result and shorter than the effective duration of the resolution result, that is, for the first resolution result that has expired but does not exceed the effective duration, the first resolution result is directly used as the response content of the domain name request, it is not necessary to wait for the DNS server to return the resolution result, and the latest second resolution result returned by the DNS server is used to update the first resolution result in the local cache, thereby implementing asynchronous update of the expired first resolution result.
A sixth embodiment of the present invention relates to a domain name request processing apparatus, and is an improvement of the fourth embodiment, the main improvements being: and when the resolution result corresponding to the acquired domain name request is invalid and the latest resolution result cannot be acquired from the DNS, taking the invalid resolution result as the response content of the domain name request.
The data access module 2 is further configured to send a query request including a domain name request to the DNS server when it is determined that the storage duration of the first resolution result exceeds a preset duration threshold.
The data access module 2 is further configured to, when a second resolution result corresponding to the domain name request returned by the DNS server is not received, use the first resolution result as response content of the domain name request.
The service module 1 is further configured to, when the data access module 2 receives a second resolution result corresponding to the domain name request returned by the DNS server, use the second resolution result as response content of the domain name request.
Since the third embodiment corresponds to the present embodiment, the present embodiment can be implemented in cooperation with the third embodiment. The related technical details mentioned in the third embodiment are still valid in this embodiment, and the technical effects that can be achieved in the third embodiment can also be achieved in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the third embodiment.
Compared with the fourth embodiment, in the present embodiment, when the first resolution result corresponding to the obtained domain name request fails to be obtained and the latest resolution result cannot be obtained from the DNS server, the first resolution result that has failed is used as the response content of the domain name request, so as to continue to execute the corresponding service, and further improve the success rate of processing the domain name request. In addition, the present embodiment can be modified from the fifth embodiment, and the same technical effects can be achieved.
A seventh embodiment of the present invention relates to a server which is a CDN server and includes the domain name request processing apparatus according to any one of the fourth to sixth embodiments.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (13)

1. A method for processing a domain name request, comprising:
acquiring a first analysis result corresponding to a domain name request to be responded;
judging whether the storage time length of the first analysis result exceeds a preset time length threshold value or not; wherein the time length threshold is greater than an expiration time length corresponding to the first analysis result;
and if the storage duration of the first analysis result does not exceed a preset duration threshold, taking the first analysis result as the response content of the domain name request.
2. The domain name request processing method according to claim 1, wherein before the determining whether the storage duration of the first resolution result exceeds a preset duration threshold, the method further comprises:
judging whether the storage time length exceeds the expiration time length or not;
and if the storage duration exceeds the expiration duration, the step of judging whether the storage duration of the first analysis result exceeds a preset duration threshold value is carried out.
3. The domain name request processing method according to claim 1 or 2, wherein when it is determined that the storage duration of the first resolution result exceeds a preset duration threshold, a query request including the domain name request is sent to a DNS server;
and if a second resolution result corresponding to the domain name request returned by the DNS server is not received, taking the first resolution result as the response content of the domain name request.
4. The domain name request processing method according to claim 2, wherein when it is determined that the storage duration of the first resolution result does not exceed a preset effective duration, a query request including the domain name request is sent to a DNS server;
and when a second resolution result corresponding to the domain name request returned by the DNS server is received, replacing the first resolution result with the second resolution result.
5. The method according to claim 3, wherein when a second resolution result corresponding to the domain name request returned by the DNS server is received, the second resolution result is used as a response content of the domain name request.
6. The method according to claim 1, wherein the obtaining a first resolution result corresponding to the domain name request to be responded comprises:
judging whether a first resolution result corresponding to the domain name request exists in a cache;
if the first resolution result corresponding to the domain name request exists in the cache, the first resolution result corresponding to the domain name request is obtained from the cache;
and if the first resolution result corresponding to the domain name request does not exist in the cache, acquiring the first resolution result corresponding to the domain name request from the DNS server.
7. A domain name request processing apparatus, comprising: the system comprises a business module and a data access module connected with the business module;
the data access module is used for acquiring a first analysis result corresponding to a domain name request to be responded, and judging whether the storage duration of the first analysis result exceeds a preset duration threshold value; wherein the time length threshold is greater than an expiration time length corresponding to the first analysis result;
and the service module is used for taking the first analysis result as the response content of the domain name request when the data access module judges that the storage time length of the first analysis result does not exceed a preset time length threshold.
8. The domain name request processing apparatus according to claim 7, wherein the data access module is further configured to determine whether the storage duration exceeds the expiration duration, and determine whether the storage duration of the first resolution result exceeds a preset duration threshold when it is determined that the storage duration exceeds the expiration duration.
9. The apparatus according to claim 7 or 8, wherein the data access module is further configured to send a query request including the domain name request to a DNS server when it is determined that the storage duration of the first resolution result exceeds a preset duration threshold;
the data access module is further configured to, when a second resolution result corresponding to the domain name request returned by the DNS server is not received, use the first resolution result as response content of the domain name request.
10. The apparatus according to claim 8, wherein the data access module is further configured to send a query request including the domain name request to a DNS server when determining that the storage duration of the first resolution result does not exceed a preset effective duration;
the data access module is further configured to replace the first resolution result with a second resolution result when receiving the second resolution result corresponding to the domain name request returned by the DNS server.
11. The apparatus according to claim 9, wherein the service module is further configured to, when the data access module receives a second resolution result corresponding to the domain name request returned by the DNS server, use the second resolution result as response content of the domain name request.
12. The device according to claim 7, wherein the data access module is configured to determine whether a first resolution result corresponding to the domain name request exists in a cache; if the first resolution result corresponding to the domain name request exists in the cache, the first resolution result corresponding to the domain name request is obtained from the cache; and if the first resolution result corresponding to the domain name request does not exist in the cache, acquiring the first resolution result corresponding to the domain name request from the DNS server.
13. A server, comprising: the domain name request processing apparatus of any one of claims 7 to 12.
CN201910923464.2A 2019-09-27 2019-09-27 Domain name request processing method and device and server Pending CN110855806A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910923464.2A CN110855806A (en) 2019-09-27 2019-09-27 Domain name request processing method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910923464.2A CN110855806A (en) 2019-09-27 2019-09-27 Domain name request processing method and device and server

Publications (1)

Publication Number Publication Date
CN110855806A true CN110855806A (en) 2020-02-28

Family

ID=69596371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910923464.2A Pending CN110855806A (en) 2019-09-27 2019-09-27 Domain name request processing method and device and server

Country Status (1)

Country Link
CN (1) CN110855806A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422705A (en) * 2020-10-12 2021-02-26 聚好看科技股份有限公司 Server, data processing method and medium
CN114143230A (en) * 2020-09-02 2022-03-04 中国移动通信集团安徽有限公司 Method and device for calculating DNS (Domain name Server) resolution time of dual-stack user

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025795A (en) * 2010-01-22 2011-04-20 中国移动通信集团北京有限公司 DNS response message processing method, DNS server and system
EP2615773A1 (en) * 2012-01-10 2013-07-17 Thomson Licensing Method and device for timestamping data and method and device for verification of a timestamp
CN104079534A (en) * 2013-03-27 2014-10-01 中国移动通信集团北京有限公司 Method and system of implementing HTTP (Hyper Text Transport Protocol) cache
CN106331212A (en) * 2016-08-25 2017-01-11 北京润通丰华科技有限公司 Domain name server (DNS) cache camping-based domain name resolution method and system
CN108040085A (en) * 2017-11-20 2018-05-15 广州华多网络科技有限公司 Method for network access, device and server
CN109639748A (en) * 2017-10-09 2019-04-16 阿里巴巴集团控股有限公司 Buffering updating method, device, system and the domain name system of dns server
CN109714443A (en) * 2017-10-25 2019-05-03 中国电信股份有限公司 Name server, domain name backup method and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025795A (en) * 2010-01-22 2011-04-20 中国移动通信集团北京有限公司 DNS response message processing method, DNS server and system
EP2615773A1 (en) * 2012-01-10 2013-07-17 Thomson Licensing Method and device for timestamping data and method and device for verification of a timestamp
CN104079534A (en) * 2013-03-27 2014-10-01 中国移动通信集团北京有限公司 Method and system of implementing HTTP (Hyper Text Transport Protocol) cache
CN106331212A (en) * 2016-08-25 2017-01-11 北京润通丰华科技有限公司 Domain name server (DNS) cache camping-based domain name resolution method and system
CN109639748A (en) * 2017-10-09 2019-04-16 阿里巴巴集团控股有限公司 Buffering updating method, device, system and the domain name system of dns server
CN109714443A (en) * 2017-10-25 2019-05-03 中国电信股份有限公司 Name server, domain name backup method and computer readable storage medium
CN108040085A (en) * 2017-11-20 2018-05-15 广州华多网络科技有限公司 Method for network access, device and server

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143230A (en) * 2020-09-02 2022-03-04 中国移动通信集团安徽有限公司 Method and device for calculating DNS (Domain name Server) resolution time of dual-stack user
CN114143230B (en) * 2020-09-02 2023-07-21 中国移动通信集团安徽有限公司 Dual-stack user DNS analysis duration calculation method and device
CN112422705A (en) * 2020-10-12 2021-02-26 聚好看科技股份有限公司 Server, data processing method and medium

Similar Documents

Publication Publication Date Title
US11909639B2 (en) Request routing based on class
CN108429701B (en) Network acceleration system
CN102984286B (en) Method and device and system of domain name server (DNS) for buffering updating
CN112087644B (en) Pull stream request processing method, device and system, electronic equipment and storage medium
US20020138511A1 (en) Method and system for class-based management of dynamic content in a networked environment
US20170339101A1 (en) Communication method and communication apparatus
WO2009124014A2 (en) Cache optimzation
CN108429777B (en) Data updating method based on cache and server
EP2869508A1 (en) Method for receiving message, and deep packet inspection device and system
US20120054295A1 (en) Method and apparatus for providing or acquiring the contents of a network resource for a mobile device
CN106331212A (en) Domain name server (DNS) cache camping-based domain name resolution method and system
CN107959576B (en) Flow charging method and system and cache device
CN1403954A (en) Content transmitting system using agent content service device
CN110855806A (en) Domain name request processing method and device and server
CN109586937B (en) Operation and maintenance method, equipment and storage medium of cache system
CN106550056A (en) A kind of domain name analytic method and device
CN106411978B (en) Resource caching method and device
CN109788050B (en) Method, system, electronic device and medium for acquiring IP address of source station
WO2017007380A1 (en) Method performed by a cache server for managing content requests
CN108055299B (en) Portal page pushing method, network access server and Portal authentication system
CN113938464A (en) Access request method and terminal
CN114338630B (en) Domain name access method, device, electronic equipment, storage medium and program product
CN113596105B (en) Content acquisition method, edge node and computer readable storage medium
CN111901449B (en) Method and device for optimizing domain name access
CN112839070B (en) Data processing method and device and node equipment in CDN (content delivery network)

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

Application publication date: 20200228