CN111726428A - Method, device, equipment and storage medium for selecting authoritative server - Google Patents

Method, device, equipment and storage medium for selecting authoritative server Download PDF

Info

Publication number
CN111726428A
CN111726428A CN202010534787.5A CN202010534787A CN111726428A CN 111726428 A CN111726428 A CN 111726428A CN 202010534787 A CN202010534787 A CN 202010534787A CN 111726428 A CN111726428 A CN 111726428A
Authority
CN
China
Prior art keywords
domain name
server
target
authoritative
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010534787.5A
Other languages
Chinese (zh)
Other versions
CN111726428B (en
Inventor
陈单江
梁素琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN202010534787.5A priority Critical patent/CN111726428B/en
Publication of CN111726428A publication Critical patent/CN111726428A/en
Application granted granted Critical
Publication of CN111726428B publication Critical patent/CN111726428B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a method, a device, equipment and a storage medium for selecting an authoritative server. The method comprises the following steps: recording time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server inquires a target domain name from each candidate authoritative server in an iterative mode; and according to the time delay, selecting a candidate authoritative server as a target authoritative server of the local domain name server aiming at the target domain name, thereby realizing the technical effects of improving the domain name resolution efficiency and the resolution success rate.

Description

Method, device, equipment and storage medium for selecting authoritative server
Technical Field
The present invention relates to the field of internet, and in particular, to a method, an apparatus, a device, and a storage medium for selecting an authoritative server.
Background
A Domain Name System (DNS) may resolve a Domain Name on the Internet into an Internet Protocol (IP) address so that a user may access the corresponding IP address.
In current internet applications, a client may resolve a domain name through a Local domain name server (Local DNS). Specifically, the Local DNS may query the authoritative DNS for the IP address mapped by the domain name to forward the response sent by the authoritative DNS and including the IP address to the client. In the actual access process, the time consumed in the domain name resolution process and the resolution success rate are very important, and the user experience is directly influenced by the failure of the DNS resolution or the slow DNS resolution. Improving DNS resolution efficiency and success rate is an important measure for improving user experience for each internet vendor.
In the above process. The location of the authoritative DNS is very important, and the time delay between the authoritative DNS and the Local DNS is short, so that the resolution effect of the Local DNS is influenced. In the selection of authoritative DNS, most companies adopt manual selection by workers through experience, and the requirement for accelerating the resolution efficiency of Local DNS cannot be met due to lack of basis.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a storage medium for selecting an authoritative server, which can improve the domain name resolution efficiency and the resolution success rate.
In order to achieve the above object, in a first aspect, the present application provides a method for selecting an authoritative server, including:
recording time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server inquires the target domain name from each candidate authoritative server in an iterative mode;
and selecting a candidate authoritative server as a target authoritative server of the local domain name server aiming at the target domain name according to the time delay.
Further, the recording a time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server queries the target domain name from each candidate authoritative server in an iterative manner includes:
receiving a test request of a client aiming at a candidate authoritative server of a target subdomain;
responding to the test request to determine a target domain name from the test request, wherein the target domain name in different test requests is a domain name which belongs to the same target sub-domain and comprises different random character strings;
in the process of inquiring a candidate authoritative server of a target subdomain where the target domain name is located from an authoritative server of a parent domain where the target domain name is located in an iterative manner, respectively recording timestamps of inquiring the target domain name of the parent domain and the subdomain;
and determining the time difference between the timestamps as the time delay between a candidate authoritative server of the target sub-domain and the local domain name server.
Further, the time stamp includes a first time stamp and a second time stamp, and the time stamps for querying the target domain name by the parent domain and the child domain are respectively recorded in a process of querying a candidate server of the target child domain of the target domain name from an authoritative server of the parent domain of the target domain name in an iterative manner, including:
sending a first resolution request to an authoritative server of a parent domain where the target domain name is located;
recording a first timestamp of the first resolution request received by the authority server of the parent domain;
receiving first response information generated by an authoritative server of the parent domain in response to the first analysis request;
determining a candidate authoritative server of a target sub-domain where the target domain name is located from the first response information;
sending a second resolution request to a candidate authoritative server of the target sub-domain;
recording a second timestamp of the second resolution request received by the candidate authoritative server for the target sub-domain.
Further, the determining a time difference between the timestamps as a time delay between a candidate authoritative server of the target sub-domain and the local domain name server includes:
determining a time difference between the first timestamp and the second timestamp as a time delay between a candidate authoritative server of the target sub-domain and the local domain name server.
Further, the selecting a candidate authoritative server as a target authoritative server of the local domain name server for the target domain name according to the time delay includes:
sorting the candidate authoritative servers according to the time delay;
and selecting the candidate authoritative server with the minimum time delay from the sequencing result as a target authoritative server of the local domain name server for the target domain name.
Further, the smallest candidate authoritative server as the target authoritative server of the local dns for the target dns includes:
selecting the candidate authoritative server with the minimum time delay from the sequencing result as a target authoritative server;
and recording authorization information for analyzing the target domain name by using the target authoritative server in a domain name configuration file of the local domain name server.
Further, the method includes that a plurality of local domain name servers are provided, and the recording of the time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server queries the target domain name from each candidate authoritative server in an iterative manner further includes:
recording time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server inquires the target domain name from each candidate authoritative server in an iterative mode according to the unique identifier of the local domain name server;
the selecting a candidate authoritative server as a target authoritative server of the local domain name server for the target domain name according to the time delay comprises:
and selecting a candidate authoritative server as a target authoritative server of the local domain name server determined by the unique identifier aiming at the target domain name according to the time delay belonging to the same unique identifier.
In a second aspect, the present application further provides an apparatus for selecting an authoritative server, including:
the time recording module is used for recording time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server inquires the target domain name from each candidate authoritative server in an iterative mode;
and the selection module is used for selecting a candidate authoritative server as a target authoritative server of the local domain name server aiming at the target domain name according to the time delay.
In a third aspect, the present application further provides a selection device of an authoritative server, comprising a processor and a memory, said memory being configured to store a computer program, said computer program, when executed by said processor, implementing the method according to any one of the first aspect.
In a fourth aspect, the present application also provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any of the first aspect.
Therefore, the technical scheme provided by the application can detect the time delay between the local domain name server and the candidate authoritative server, is used for providing data basis for the selection of the target authoritative server corresponding to the local domain name server, can improve the selection of the target authoritative server, and does not need manual selection by workers through experience; furthermore, the time delay from the local domain name server to the target authoritative server can be reduced, the domain name resolution time is reduced, the domain name resolution efficiency is improved, the domain name resolution success rate is improved, and the use experience of the client side can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating steps of a method for selecting an authoritative server according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a method for selecting an authoritative server according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an authoritative server selection apparatus in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an authoritative server selecting device in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following detailed description of the embodiments of the present invention will be made with reference to the accompanying drawings, which are not intended to limit the scope of the present invention.
The selection method of the authoritative server can be executed by a selection device of the authoritative server, can be realized in a software and/or hardware mode, and is integrated in a selection device capable of being carried out on the authoritative server. Optionally, the device includes, but is not limited to, a terminal such as a computer, a server, and the like. The device can be a local domain name server, namely a task control end is integrated in the local domain name server, and the task control end can also be integrated in other servers. And the task control end is used for managing the selection of the authoritative servers of the plurality of local domain name servers. And the server of the integrated task control end runs a task control program for assisting the local domain name server to select the authoritative server.
Fig. 1 is a schematic step diagram of a method for selecting an authoritative server according to an embodiment of the present invention. Referring to fig. 1, the method may include the following steps:
s110: and recording the time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server inquires the target domain name from each candidate authoritative server in an iterative mode.
In this embodiment, a Local domain Name server (Local Name server), also called Local domain Name System (Local DNS), is used for domain Name query. The local domain name server may be a public DNS provided by a server Provider (ISP) or other organization. Generally, when a client accesses a certain website, a domain name corresponding to the website needs to be sent to a local domain name server, and an IP address corresponding to the domain name is queried from a request local domain name server, so that the client can access the website through the IP address.
Com "is a DNS server set at a domain name registrar for management (addition, deletion, modification, etc.) of a specific domain name itself. Furthermore, the authoritative DNS only carries out domain name resolution on the domain name owned by the authoritative DNS, and refuses access to the domain name which is not owned by the authoritative DNS. For example, querying an authoritative DNS server of "example.
In short, an authoritative DNS server is a server that actually holds and is responsible for DNS resource records. Further, when the client queries the domain name from the local domain name server, the local domain name server iterates the response returned by the authoritative server until the finally queried IP address is returned to the client, and the request result is cached locally.
In this embodiment, the candidate authoritative server is a DNS server set for the target domain name, and is used to manage the target domain name. Wherein the target domain name is a domain name belonging to the same target sub-domain. Generally, in the domain name system hierarchy, a sub-domain belongs to a domain of a higher level domain. For example, mail.example.com and calendar.example.com are two sub-domains of example.com, and example.com is a sub-domain of top level domain.com.
In this embodiment, the selection of the candidate authoritative server for resolving the target domain name may be optimized by initiating a test task for the target domain name to record a plurality of timestamps of the local domain name server in the process of querying the target domain name from the candidate authoritative server in an iterative manner to determine a time delay between the local domain name server and the candidate authoritative server.
Specifically, a test request of a client for a candidate authoritative server of a target sub-domain may be received; responding to the test request, and determining a target domain name from the test request, wherein the target domain names in different test requests are domain names which belong to the same target sub-domain and comprise different random character strings; respectively recording timestamps of a parent domain and a subdomain for inquiring a target domain name in the process of inquiring a candidate authoritative server of a target subdomain of the target domain name from an authoritative server of the parent domain of the target domain name in an iterative manner; and determining the time difference between the time stamps as the time delay between a candidate authoritative server of the target sub-domain and the local domain name server.
The target domain name is a domain name which belongs to the same target subdomain and comprises different random character strings. If the target sub-domain is "rtttest. Where "a 31 xxf" and "looixy" are different random strings. In different testing tasks, the target domain name is set to comprise different random character strings, so that the condition that the local domain name server does not have a cache for analyzing the target domain name in each testing task and the domain name is required to be inquired from the candidate authoritative server can be ensured.
In an embodiment, for a test task, a first resolution request may be sent to an authoritative server of a parent domain where a target domain name is located; recording a first time stamp of a first analysis request received by an authoritative server of a parent domain; receiving first response information generated by an authoritative server of the parent domain in response to the first analysis request; determining a candidate authoritative server of a target subdomain where the target domain name is located from the first response information; sending a second resolution request to a candidate authoritative server of the target subdomain; and recording a second time stamp of the second resolution request received by the candidate authoritative server of the target sub-domain.
Further, a time difference between the first timestamp and the second timestamp may be determined as a time delay between a candidate authoritative server for the target sub-domain and the local domain name server.
In a specific embodiment, fig. 2 is a working schematic diagram of a method for selecting an authority server in an embodiment of the present invention, and referring to fig. 2, a task control end may send a task request for initiating a test task to a test client. The testing client may send a resolution request for the target domain name to the local domain name server in response to the task request.
Corresponding to process 1 in fig. 2, for one test task, the test client may generate a target domain name including a random string and send a resolution request for the target domain name to the local domain name server. Further, the local domain name server may send the first resolution request to an authoritative server of a parent domain of the target domain name. Specifically, when the local domain name server receives a first resolution request with a target domain name of "a 31xxf.rtttest.example.com", it may query an authoritative DNS1 that manages a parent domain of "example.com". When receiving the first resolution request of "a 31xxf. rtttest. example. com", the rightful DNS1 records the first timestamp in the form of [ SRC IP, domain name, time ], e.g.,
[ Local DNS1, authoritative DNS1, a31xxf.rtttest.example.com, 12/6/2019, 17:16:28123123 ].
Wherein, "12.6.17: 16:28123123 in 2019" queries the Local domain name server Local DNS1 for the first timestamp of the target domain name "a 31xxf.rtttest.example.com" through the authoritative DNS 1.
Meanwhile, the first reply information generated by the authoritative DNS1 in response to the first resolution request, includes, for example:
and NS recording:
a31xxf.rtttest.example.com IN NS ns1.a31xxf.rtttest.example.com。
recording A:
ns1.a31xxf. rtttest. example. com IN AIP (IP address of authoritative DNS 2).
Among them, the authoritative DNS2 is a candidate authoritative server that manages the target domain name "a 31xxf.
1.A record
The a record is also called a host record, and is the most widely used DNS record, and the basic function of the a record is to describe how many IPs correspond to a domain name, which is the correspondence between the domain name and an IP address, and is expressed in the form of "www.example.com192.168.1.1", which is an a record. If the domain name needs to be pointed to an IPv4 address (e.g., 100.100.100.100), the a record is added. The a record has a high-level usage besides domain name IP mapping, and can be used as a solution for low-cost load balancing, for example, www.example.com can create a plurality of a records, and can implement basic traffic balancing corresponding to IP addresses of a plurality of physical servers.
2. NS recording
The NS record and the SOA record are two indispensable records in any DNS zone, the NS record is also called as a name server record and is used for explaining which DNS server in the zone is responsible for resolution, and the SOA record is used for explaining which DNS server in the zone is the main server. Therefore, neither DNS zone can lack both records. The NS record indicates how many servers are responsible for the resolution in this area.
Further, corresponding to process 2 in fig. 2, the Local domain name server Local DNS1 may receive first reply information generated by the authoritative DNS1 of the parent domain in response to the first resolution request.
Corresponding to process 3 in fig. 2, the Local domain name server Local DNS1 may determine, from the first reply information, a candidate authoritative server for the target sub-domain for which the target domain name is located, e.g., the domain name of the candidate authoritative server (authoritative DNS2) determined in the NS record, and the IP address of the candidate authoritative server (authoritative DNS2) determined in the a record. Further, a second resolution request may continue to be sent to the authoritative DNS2 to request resolution of the target domain name "a 31xxf.
Similarly, when receiving the second resolution request of "a 31xxf. rtmtest. example. com", the authoritative DNS2 records a second timestamp in the manner of [ SRC IP, domain name, time ], such as [ Local DNS1 ], authoritative DNS2, a31xxf. rtmtest. example. com ], 12/6/16/28223122/2019. Wherein, "12 months, 6 days 17:16: 28223122 in 2019" is the second timestamp of the Local domain name server Local DNS2 querying the target domain name through authoritative DNS 2.
Two records are available at this time, and can be recorded in the data analysis server, such as:
record 1 [ Local DNS1, authoritative DNS1, a31xxf.rtttest.example.com, 12/6/2019, 17:16:28123123 ]
Record 2 [ Local DNS1, authoritative DNS2, a31xxf.rtttest.example.com, 12/6/2019, 17:16: 28223122 ].
Further, the meaning of the time difference between record 1 and record 2 is the total time of process 2 and process 3 in fig. 2, which we record as T2, resulting in the first record data (DNS2, T2) regarding the latency between the candidate authoritative server authoritative DNS2 and the Local domain name server Local DNS 1.
Similarly, referring to fig. 2, for yet another testing task, corresponding to process 1 in fig. 2, the testing client may generate a target domain name including another random string, e.g., "1 ooixy.rtttest.example.com", and request resolution of the target domain name from the Local domain name server Local DNS 1. When the Local domain name server Local DNS1 receives a first resolution request with a target domain name of "1 ooixy.rtttest.example.com", it may query an authoritative DNS1 that manages the parent domain of "example.com". When receiving the first resolution request of "1 ooixy. rtttest. example. com", the authoritative DNS1 records the first timestamp in the manner of [ SRC IP, domain name, time ], e.g., [ Local DNS1, authoritative DNS1, 1ooixy. rtttest. example. com ], 6 th 12/2019, 17:37: 21100000 ]. Wherein, "12.6.17: 37: 21100000 in 2019" is the first timestamp of the Local domain name server Local DNS1 querying the target domain name "1 ooixy.rtttest.example.com" through the authority DNS 1.
Meanwhile, the first reply information generated by the authoritative DNS1 in response to the first resolution request, includes, for example:
and NS recording:
1ooixy.rtttest.example.com IN NS ns1.1ooixy.rtttest.example.com。
recording A:
ns1.a31xxf. rtttest. example. com IN AIP (IP address of authoritative DNS 3).
Among them, the authoritative DNS3 is a candidate authoritative server that manages the target domain name "1 ooixy. rtttest. example. com" belonging to the target sub-domain "rtttest.
Further, corresponding to process 2 in fig. 2, the Local domain name server Local DNS1 may receive first reply information generated by the authoritative DNS1 of the parent domain in response to the first resolution request.
Corresponding to process 5 in fig. 2, the Local domain name server Local DNS1 may determine, from the first reply information, a candidate authoritative server for the target sub-domain for which the target domain name is located, e.g., the domain name of the candidate authoritative server (authoritative DNS3) determined in the NS record, and the IP address of the candidate authoritative server (authoritative DNS3) determined in the a record. Further, a second resolution request may continue to be sent to the authoritative DNS3 to request resolution of the target domain name "1 ooixy.
Similarly, when receiving the second resolution request of "1 ooixy. rtttest. example. com", the authoritative DNS3 records a second timestamp in the manner of [ SRC IP, domain name, time ], such as [ Local DNS1 ], authoritative DNS3, 1ooixy. rtttest. example. com ], 12/6/2019, 17:37: 21200000 ]. Wherein, "12.6.17: 37: 21200000 in 2019" is the Local domain name server Local DNS2 querying the second timestamp of the target domain name "1 ooixy.rtttest.example.com" through the authority DNS 2.
Two records are available at this time, and can be recorded in the data analysis server, such as:
record 3 [ Local DNS1, authoritative DNS1, 1ooixy. rtttest. example. com, 12/6/2019, 17:37: 21100000 ]
Record 4 [ Local DNS1, authoritative DNS3, 1ooixy. rtttest. example. com, 12/6/2019, 17:37: 21200000 ].
Further, the meaning of the time difference between record 3 and record 4 is the total time of process 2 and process 5 in fig. 2, which we record as T3, resulting in second record data (DNS3, T3) regarding the latency between the candidate authoritative server authoritative DNS3 and the Local domain name server Local DNS 1.
S120: and according to the time delay, selecting a candidate authoritative server as a target authoritative server of the local domain name server aiming at the target domain name.
In an embodiment, the candidate authoritative servers may be ranked according to latency; and selecting the candidate authoritative server with the minimum time delay from the sequencing result as a target authoritative server of the local domain name server for the target domain name.
For example, the latency between the candidate authoritative server authoritative DNS2 and the Local domain name server Local DNS1 is recorded as the first record data (DNS2, T2); the latency between the candidate authoritative server authoritative DNS3 and the Local domain name server Local DNS1 is recorded as the first record data (DNS3, T3). When T2 is less than T3, i.e., the time delay of the authoritative DNS2 is less than that of the authoritative DNS3, the candidate authoritative server authoritative DNS2 may be used as the Local domain server Local DNS1 for the target authoritative server of the target domain name ". rtttest.
Specifically, the candidate authoritative server with the smallest time delay may be selected from the ranking results as the target authoritative server; and recording authorization information for resolving the target domain name by using the target authoritative server in a domain name configuration file of the local domain name server.
Wherein, the domain name configuration file can be used for configuring the resolution record.
In a particular embodiment, when the domain name profile of the Local domain name server Local DNS1 is configured with authorization information, such as NS records, for the target authoritative service to resolve the target domain name. The Local domain name server Local DNS1 will query the target domain name directly from the target authoritative server, bypassing several steps in DNS iterative queries. This shortcut may prevent lookups from root and com name servers and help resolve DNS queries faster.
On the basis of the above embodiment, steps S110-S120 may be subdivided into:
recording the time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server inquires the target domain name from each candidate authoritative server in an iterative mode by using the unique identifier of the local domain name server;
and selecting a candidate authoritative server according to the time delay belonging to the same unique identifier, wherein the candidate authoritative server is used as a target authoritative server of the local domain name server determined by the unique identifier and aiming at the target domain name.
The unique identifier may be "Local DNS 1", "Local DNS 2", or the like.
Fig. 3 is a schematic structural diagram of an authority server selecting device in an embodiment of the present invention. Referring to fig. 3, the present application further provides an apparatus for selecting an authoritative server, including: a time recording module 310 and a selection module 320.
The time recording module 310 is configured to record a time delay between each candidate authoritative server and the local domain name server in a process that the local domain name server queries the target domain name from each candidate authoritative server in an iterative manner.
The selecting module 320 is configured to select a candidate authoritative server as a target authoritative server of the local domain name server for the target domain name according to the time delay.
Therefore, the technical scheme provided by the application can detect the time delay between the local domain name server and the candidate authoritative server, is used for providing data basis for the selection of the target authoritative server corresponding to the local domain name server, can improve the selection of the target authoritative server, and does not need manual selection by workers through experience; furthermore, the time delay from the local domain name server to the target authoritative server can be reduced, the domain name resolution time is reduced, the domain name resolution efficiency is improved, the domain name resolution success rate is improved, and the use experience of the client side can be improved.
On the basis of the above technical solution, the time recording module 310 includes:
and the test request receiving unit is used for receiving the test request of the client aiming at the candidate authoritative server of the target subdomain.
And the test request response unit is used for responding to the test request so as to determine a target domain name from the test request, wherein the target domain name in different test requests belongs to the same target sub-domain and comprises different random character strings.
And the time stamp recording unit is used for respectively recording the time stamps of the parent domain and the time stamps of the subdomain for inquiring the target domain name in the process of inquiring a candidate authoritative server of the target subdomain of the target domain name from the authoritative server of the parent domain of the target domain name in an iterative mode.
And the time delay determining unit is used for determining the time difference between the timestamps as the time delay between a candidate authoritative server of the target sub-domain and the local domain name server.
On the basis of the above technical solution, the timestamp includes a first timestamp and a second timestamp, and the timestamp recording unit includes:
and the first resolution request sending subunit is used for sending the first resolution request to an authoritative server of a parent domain where the target domain name is located.
And the first recording subunit is configured to record a first timestamp of the first resolution request received by the authority server of the parent domain.
And the first response information receiving subunit is used for receiving first response information generated by the authoritative server of the parent domain in response to the first analysis request.
And the candidate authoritative server determining subunit is used for determining a candidate authoritative server of the target sub-domain where the target domain name is located from the first response information.
And the second resolution request sending subunit is used for sending a second resolution request to the candidate authoritative server of the target sub-domain.
And the second recording subunit is configured to record a second timestamp of the second resolution request received by the candidate authoritative server of the target sub-domain.
On the basis of the above technical solution, the delay determining unit includes:
a time difference determining subunit, configured to determine a time difference between the first time stamp and the second time stamp as a time delay between a candidate authoritative server of the target sub-domain and the local domain name server.
On the basis of the above technical solution, the selecting module 320 includes:
and the ranking unit is used for ranking the candidate authoritative servers according to the time delay.
And the selecting unit is used for selecting the candidate authoritative server with the minimum time delay from the sequencing result as a target authoritative server of the local domain name server aiming at the target domain name.
On the basis of the technical scheme, the selecting unit comprises the following steps:
and the target selecting subunit is used for selecting the candidate authoritative server with the minimum time delay from the sequencing result as a target authoritative server.
A configuration subunit, configured to record, in a domain name configuration file of the local domain name server, authorization information for analyzing the target domain name using the target authority server.
On the basis of the above technical solution, when there are a plurality of local domain name servers, the time recording module 310 is specifically configured to: and recording the time delay between each candidate authoritative server and the local domain name server in the process of inquiring the target domain name from each candidate authoritative server by the local domain name server in an iterative mode according to the unique identifier of the local domain name server.
The selecting module 320 is further specifically configured to: and selecting a candidate authoritative server as a target authoritative server of the local domain name server determined by the unique identifier aiming at the target domain name according to the time delay belonging to the same unique identifier.
The product can execute the method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Fig. 4 is a schematic structural diagram of an authoritative server selecting device in an embodiment of the invention. Referring to fig. 4, the present application further provides a selection device of an authority server, where the selection device of the authority server includes a processor and a memory, and the memory is used for storing a computer program, and when the computer program is executed by the processor, the method for selecting the authority server can be implemented.
The present application also provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the method of selecting an authoritative server as described above.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the above operations of the method for selecting the authoritative server, and may also perform the relevant operations in the method for selecting the authoritative server provided by any embodiments of the present invention, and has corresponding functions and advantages.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a robot, a personal computer, a server, or a network device) to execute the method for selecting an authority server according to any embodiment of the present invention.
It should be noted that, in the selection apparatus of the authority server, each unit and each module included in the selection apparatus are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for embodiments of the system and the apparatus, reference may be made to the introduction of embodiments of the method described above in contrast to the explanation.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1.A method for authoritative server selection, comprising:
recording time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server inquires a target domain name from each candidate authoritative server in an iterative mode;
and selecting a candidate authoritative server as a target authoritative server of the local domain name server aiming at the target domain name according to the time delay.
2. The selection method according to claim 1, wherein the recording of the time delay between each candidate authoritative server and the local domain name server in the process of the local domain name server iteratively querying the target domain name from each candidate authoritative server comprises:
receiving a test request of a client aiming at a candidate authoritative server of a target subdomain;
responding to the test request to determine a target domain name from the test request, wherein the target domain name in different test requests is a domain name which belongs to the same target sub-domain and comprises different random character strings;
in the process of inquiring a candidate authoritative server of a target subdomain where the target domain name is located from an authoritative server of a parent domain where the target domain name is located in an iterative manner, respectively recording timestamps of inquiring the target domain name of the parent domain and the subdomain;
and determining the time difference between the timestamps as the time delay between a candidate authoritative server of the target sub-domain and the local domain name server.
3. The selection method according to claim 2, wherein the time stamp includes a first time stamp and a second time stamp, and the recording of the time stamps of the parent domain and the subdomain for querying the target domain name during the iterative process of querying a candidate server of the target subdomain of the target domain name from an authoritative server of the parent domain of the target domain name comprises:
sending a first resolution request to an authoritative server of a parent domain where the target domain name is located;
recording a first timestamp of the first resolution request received by the authority server of the parent domain;
receiving first response information generated by an authoritative server of the parent domain in response to the first analysis request;
determining a candidate authoritative server of a target sub-domain where the target domain name is located from the first response information;
sending a second resolution request to a candidate authoritative server of the target sub-domain;
recording a second timestamp of the second resolution request received by the candidate authoritative server for the target sub-domain.
4. The selection method of claim 3, wherein determining the time difference between the timestamps as a latency between a candidate authoritative server for the target sub-domain and the local domain name server comprises:
determining a time difference between the first timestamp and the second timestamp as a time delay between a candidate authoritative server of the target sub-domain and the local domain name server.
5. The selection method according to claim 1, wherein the selecting a candidate authoritative server as the target authoritative server of the local dns for the target dns according to the time delay comprises:
sorting the candidate authoritative servers according to the time delay;
and selecting the candidate authoritative server with the minimum time delay from the sequencing result as a target authoritative server of the local domain name server for the target domain name.
6. The selecting method according to claim 5, wherein the selecting the candidate authoritative server with the smallest time delay from the sorted results as the target authoritative server of the local domain name server for the target domain name comprises:
selecting the candidate authoritative server with the minimum time delay from the sequencing result as a target authoritative server;
and recording authorization information for analyzing the target domain name by using the target authoritative server in a domain name configuration file of the local domain name server.
7. The selection method according to any one of claims 1 to 6, wherein the number of the local domain name servers is plural, and the recording of the time delay between each candidate authoritative server and the local domain name server in the process of the local domain name server iteratively querying the target domain name from each candidate authoritative server further comprises:
recording time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server inquires the target domain name from each candidate authoritative server in an iterative mode according to the unique identifier of the local domain name server;
the selecting a candidate authoritative server as a target authoritative server of the local domain name server for the target domain name according to the time delay comprises:
and selecting a candidate authoritative server as a target authoritative server of the local domain name server determined by the unique identifier aiming at the target domain name according to the time delay belonging to the same unique identifier.
8. An apparatus for authoritative server selection, comprising:
the time recording module is used for recording time delay between each candidate authoritative server and the local domain name server in the process that the local domain name server inquires the target domain name from each candidate authoritative server in an iterative mode;
and the selection module is used for selecting a candidate authoritative server as a target authoritative server of the local domain name server aiming at the target domain name according to the time delay.
9. Selection device of an authoritative server, characterized in that it comprises a processor and a memory for storing a computer program which, when executed by said processor, carries out the method according to any one of claims 1 to 7.
10. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202010534787.5A 2020-06-12 2020-06-12 Authoritative server selection method, device, equipment and storage medium Active CN111726428B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010534787.5A CN111726428B (en) 2020-06-12 2020-06-12 Authoritative server selection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010534787.5A CN111726428B (en) 2020-06-12 2020-06-12 Authoritative server selection method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111726428A true CN111726428A (en) 2020-09-29
CN111726428B CN111726428B (en) 2023-09-22

Family

ID=72568089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010534787.5A Active CN111726428B (en) 2020-06-12 2020-06-12 Authoritative server selection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111726428B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112671866A (en) * 2020-12-15 2021-04-16 上海牙木通讯技术有限公司 DNS (Domain name Server) shunt analysis method, DNS server and computer readable storage medium
CN112769976A (en) * 2021-01-13 2021-05-07 网宿科技股份有限公司 Domain name resolution method and system
CN113382093A (en) * 2021-05-14 2021-09-10 贵州白山云科技股份有限公司 Domain name resolution method, electronic device and system
CN115473870A (en) * 2022-09-06 2022-12-13 中国电子信息产业集团有限公司第六研究所 Top-level domain name resolution method, system, electronic equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778037A (en) * 2009-01-12 2010-07-14 财团法人工业技术研究院 Dynamic scoring load balance device and method
CN101945041A (en) * 2010-09-02 2011-01-12 中国科学院计算机网络信息中心 Authoritative server load balancing method, equipment and system
US20120179814A1 (en) * 2000-07-19 2012-07-12 Akamai Technologies, Inc. Determination and use of metrics in a domain name service (DNS) system
CN102859942A (en) * 2010-04-28 2013-01-02 微软公司 Using DNS reflection to measure network performance
CN103546590A (en) * 2013-10-18 2014-01-29 北京奇虎科技有限公司 Method and device for choosing DNS (domain name server)
CN104301171A (en) * 2014-09-11 2015-01-21 赛尔网络有限公司 Network performance measuring method and system based on DNS authoritative server
CN104780212A (en) * 2015-04-14 2015-07-15 天脉聚源(北京)教育科技有限公司 Method for selecting server with highest connection speed and terminal
CN106470251A (en) * 2015-08-19 2017-03-01 互联网域名系统北京市工程研究中心有限公司 Domain name analytic method and virtual DNS authority server
CN106888277A (en) * 2017-03-07 2017-06-23 腾讯科技(深圳)有限公司 A kind of domain name inquiry method and device
CN109981805A (en) * 2017-12-28 2019-07-05 中国移动通信集团山东有限公司 A kind of method and device of domain name mapping
CN110784559A (en) * 2019-09-17 2020-02-11 大唐软件技术股份有限公司 DNS analysis delay acquisition method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120179814A1 (en) * 2000-07-19 2012-07-12 Akamai Technologies, Inc. Determination and use of metrics in a domain name service (DNS) system
CN101778037A (en) * 2009-01-12 2010-07-14 财团法人工业技术研究院 Dynamic scoring load balance device and method
CN102859942A (en) * 2010-04-28 2013-01-02 微软公司 Using DNS reflection to measure network performance
CN101945041A (en) * 2010-09-02 2011-01-12 中国科学院计算机网络信息中心 Authoritative server load balancing method, equipment and system
CN103546590A (en) * 2013-10-18 2014-01-29 北京奇虎科技有限公司 Method and device for choosing DNS (domain name server)
CN104301171A (en) * 2014-09-11 2015-01-21 赛尔网络有限公司 Network performance measuring method and system based on DNS authoritative server
CN104780212A (en) * 2015-04-14 2015-07-15 天脉聚源(北京)教育科技有限公司 Method for selecting server with highest connection speed and terminal
CN106470251A (en) * 2015-08-19 2017-03-01 互联网域名系统北京市工程研究中心有限公司 Domain name analytic method and virtual DNS authority server
CN106888277A (en) * 2017-03-07 2017-06-23 腾讯科技(深圳)有限公司 A kind of domain name inquiry method and device
CN109981805A (en) * 2017-12-28 2019-07-05 中国移动通信集团山东有限公司 A kind of method and device of domain name mapping
CN110784559A (en) * 2019-09-17 2020-02-11 大唐软件技术股份有限公司 DNS analysis delay acquisition method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112671866A (en) * 2020-12-15 2021-04-16 上海牙木通讯技术有限公司 DNS (Domain name Server) shunt analysis method, DNS server and computer readable storage medium
CN112671866B (en) * 2020-12-15 2022-11-25 牙木科技股份有限公司 DNS (Domain name Server) shunt analysis method, DNS server and computer readable storage medium
CN112769976A (en) * 2021-01-13 2021-05-07 网宿科技股份有限公司 Domain name resolution method and system
US11770320B2 (en) 2021-01-13 2023-09-26 Wangsu Science and Technology Co., Ltd. Method and system for domain name resolution
CN112769976B (en) * 2021-01-13 2023-10-24 网宿科技股份有限公司 Domain name resolution method and system
CN113382093A (en) * 2021-05-14 2021-09-10 贵州白山云科技股份有限公司 Domain name resolution method, electronic device and system
WO2022237729A1 (en) * 2021-05-14 2022-11-17 贵州白山云科技股份有限公司 Domain name parsing method and system, electronic apparatus, device, and medium
CN115473870A (en) * 2022-09-06 2022-12-13 中国电子信息产业集团有限公司第六研究所 Top-level domain name resolution method, system, electronic equipment and storage medium
CN115473870B (en) * 2022-09-06 2024-05-10 中国电子信息产业集团有限公司第六研究所 Top-level domain name resolution method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111726428B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN111726428A (en) Method, device, equipment and storage medium for selecting authoritative server
US7467230B2 (en) Global names zone
US11347797B2 (en) Asset search and discovery system using graph data structures
JP5788497B2 (en) Operating method, system, and computer program
US9740708B2 (en) Systems and methods for distance and performance based load balancing
US8489724B2 (en) CNAME-based round-trip time measurement in a content delivery network
US9525749B2 (en) DNS server arrangement and method
US7761570B1 (en) Extensible domain name service
CN108848205B (en) CNAME domain name resolution method for distinguishing IPv4 and IPv6
KR20120016084A (en) Domain traffic ranking
CN104378452A (en) Method, device and system for domain name resolution
CN107613039B (en) IP address attribution inquiry method, device, system and storage medium
CN109327559B (en) Domain name resolution method and device based on hybrid cloud platform
US20160080262A1 (en) Domain name collaboration service using domain name dependency server
CN113992626A (en) Method, device and storage medium for realizing DNS
US10944714B1 (en) Multi-factor domain name resolution
Streibelt et al. How ready is dns for an ipv6-only world?
CN112532766B (en) DNS response result caching method, DNS server and computer readable storage medium
US8972604B1 (en) Network address retention and assignment
CN112671866A (en) DNS (Domain name Server) shunt analysis method, DNS server and computer readable storage medium
WO2021086653A1 (en) Name server management of domain name systems using virtual name servers
CN113259492B (en) Service request forwarding method and system
US10298539B2 (en) Passive delegations and records
CN112671943A (en) Method and device for detecting real domain name and storage medium
CN105245626A (en) Method for realizing website addressing by using shortcut domain name in private 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
GR01 Patent grant
GR01 Patent grant