WO2026026976A1 - 域名解析方法、设备、系统、存储介质及程序产品 - Google Patents
域名解析方法、设备、系统、存储介质及程序产品Info
- Publication number
- WO2026026976A1 WO2026026976A1 PCT/CN2025/112388 CN2025112388W WO2026026976A1 WO 2026026976 A1 WO2026026976 A1 WO 2026026976A1 CN 2025112388 W CN2025112388 W CN 2025112388W WO 2026026976 A1 WO2026026976 A1 WO 2026026976A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- domain name
- name server
- server
- query
- centralized
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4552—Lookup mechanisms between a plurality of directories; Synchronisation of directories, e.g. metadirectories
Definitions
- This disclosure relates to the field of cloud computing technology, and in particular to a domain name resolution method, device, system, storage medium, and program product.
- Domain name resolution refers to the process of resolving a domain name into its corresponding IP (Internet Protocol) address by querying the Domain Name System (DNS).
- DNS Domain Name System
- DNS includes multiple levels of name servers, such as root name servers, top-level name servers, authoritative name servers, and local name servers.
- recursive query is the most commonly used domain name resolution method. That is, starting from the local domain name server, if the IP address corresponding to the domain name does not exist locally, the query continues to the superior domain name server (i.e., the authoritative domain name server) until the IP address corresponding to the domain name can be returned.
- the superior domain name server i.e., the authoritative domain name server
- queries to authoritative name servers may fail due to unstable links between the local machine and the authoritative name server or abnormalities in the authoritative name server itself, ultimately affecting the normal operation of the DNS client.
- This disclosure provides a domain name resolution method, device, system, storage medium, and program product to solve the problem of failure to query authoritative domain name servers and improve the success rate of domain name resolution.
- the public domain name resolution system includes a public domain name server.
- the private domain name resolution system includes a centralized domain name server, and a local domain name server and a resolution data collection device deployed in at least one availability zone.
- the local domain name server is interconnected with the centralized domain name server and the public domain name server, and is used to provide recursive domain name query services to application servers within its respective availability zone in the order of local cache, the public domain name server, and the centralized domain name server, and to stop the recursive domain name query service upon obtaining the domain name query result.
- the resolution data collection device is used to collect the domain name query results returned by the public domain name server during the recursive domain name query service and report them to the centralized domain name server.
- the domain name query results include the domain name to be queried and the IP address corresponding to the domain name to be queried.
- the centralized domain name server is used to maintain the domain name query results reported by the resolution data collection device and their correspondence with availability zones. The correspondence is used for the local domain name server to provide recursive domain name query services.
- This disclosure also provides a domain name resolution method, applied to a local domain name server in any availability zone, wherein the local domain name server belongs to a private domain name resolution system.
- the method includes: receiving a first domain name query request from an application server within the availability zone, the first domain name query request including a domain name to be queried; if the IP address corresponding to the domain name to be queried does not exist in the local cache, performing a recursive query to a public domain name server in a public domain name resolution system; if the public domain name server does not return a domain name query result, sending the domain name to be queried and the identifier of the availability zone to a centralized domain name server in the private domain name resolution system, so that the centralized domain name server can perform a recursive query based on the maintained domain name query results and their correspondence with availability zones, the identifier of the availability zone, and the domain name to be queried; the domain name query result includes the domain name to be queried and the IP address corresponding to the domain name to be que
- This disclosure also provides a domain name resolution method, applied to a resolution data collection device in any availability zone.
- the availability zone further includes a local domain name server.
- the resolution data collection device and the local domain name server belong to a private domain name resolution system.
- the method includes: collecting domain name query results returned by the public domain name server during the process of the local domain name server providing recursive domain name query services to application servers in the availability zone in the order of local cache, public domain name servers in the public domain name resolution system, and centralized domain name servers in the private domain name resolution system; stopping the recursive domain name query service upon receiving the domain name query results returned by the public domain name server, wherein the domain name query results include the domain name to be queried and the IP address corresponding to the domain name to be queried; and reporting the domain name query results to the centralized domain name server so that the centralized domain name server can maintain the correspondence between the domain name query results and the availability zone, wherein the correspondence is used for the local domain name server to provide recursive domain name query services.
- This disclosure also provides an electronic device, including: a memory and a processor; the memory is used to store one or more computer instructions; the processor is used to execute the one or more computer instructions to: perform the steps in the domain name resolution method of the claim.
- This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, enables the processor to implement the steps in the domain name resolution method.
- This disclosure also provides a computer program product, including a computer program/instruction, which, when executed by a processor, performs the domain name resolution method.
- a private domain name resolution system is added to the public domain name resolution system.
- the data collection device in this system collects the domain name query results successfully returned by the public domain name server and reports them to the centralized domain name server.
- the centralized domain name server maintains the domain name query results and their correspondence with availability zones, enabling the local domain name server to provide recursive domain name queries to the application server in the order of local cache, public domain name server, and centralized domain name server. In this way, even if the link between the local domain name server and the public domain name server is unstable or the public domain name server malfunctions, the local domain name server can still provide recursive domain name queries to the application server in the availability zone to which the local domain name server belongs, based on the correspondence maintained by the centralized domain name server. This solves the problem of failed queries to authoritative domain name servers and improves the domain name resolution success rate.
- Figure 1 is a schematic diagram of a domain name resolution method provided by an exemplary embodiment of the present disclosure
- Figure 2 is a schematic diagram of the structure of a domain name resolution system provided in an exemplary embodiment of this disclosure
- Figure 3 is a flowchart illustrating a domain name resolution method provided in an exemplary embodiment of this disclosure
- Figure 4 is a flowchart illustrating a domain name resolution method provided in another exemplary embodiment of this disclosure.
- Figures 5a and 5b are schematic diagrams of the structure of a domain name resolution device provided in an exemplary embodiment of the present disclosure
- Figure 6 is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this disclosure.
- the user information including but not limited to user device information, user personal information, etc.
- data including but not limited to data used for analysis, stored data, and displayed data
- the collection, use, and processing of such data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding access points are provided for users to choose to authorize or refuse.
- the various models involved in this disclosure (including but not limited to language models or large models) comply with relevant laws and standards.
- cloud vendors can establish at least one availability zone (AZ) based on application needs or for network systems such as Virtual Private Clouds (VPCs).
- An availability zone refers to a cluster of data centers established by a cloud service provider within a geographical area, possessing independent power, network, cooling, and other infrastructure. Each availability zone can operate as an independent entity. Even if one availability zone fails (e.g., due to power outages, network problems, or natural disasters), other availability zones can continue to provide services, thereby ensuring high availability and fault tolerance.
- Figure 1 only exemplarily shows two availability zones, availability zone 1 and availability zone 2, and does not limit the number of availability zones in a real-world scenario.
- Each availability zone can deploy a local domain name server and an application server.
- the local domain name server can directly query authoritative servers in the public domain name resolution system to provide recursive domain name query services to the corresponding application server.
- the query to the authoritative domain name server may fail due to reasons such as unstable link between the local machine and the authoritative domain name server or abnormality of the authoritative domain name server itself, which will ultimately affect the normal operation of the DNS client.
- the private domain name resolution system may include a centralized domain name server, and local domain name servers and resolution data collection devices deployed in at least one availability zone.
- Figure 2 is a system architecture diagram of the domain name resolution system 1 provided in this disclosure.
- the domain name resolution system 1 may include: a public domain name resolution system 11 and a private domain name resolution system 12.
- the public domain name resolution system 11 may include a public domain name server 111.
- the private domain name resolution system 12 may include a local domain name server 121 deployed in at least one availability zone and a resolution data collection device 122, as well as a centralized domain name service 123.
- Each availability zone may include an application server 124, which may be a physical server or a cloud server, such as a virtual machine, ECS, or various computing nodes.
- the data collection device 122 can be deployed outside the local domain name server 121.
- the data collection device 122 can also be deployed inside the local domain name server 121 within its respective availability zone; this embodiment does not impose any restrictions.
- the data collection device 122 When the data collection device 122 is deployed inside the local domain name server 121 within its respective availability zone, it can serve as a functional module, a working unit, or a working component within the local domain name server 121; this embodiment does not impose any restrictions.
- the public domain name server 111 may include multiple levels of servers, for example, from top to bottom: root name server, top-level name server, and authoritative name server. These three levels of name servers are all name servers in the public domain name resolution system, and all belong to the public domain name server category. Devices from different manufacturers and regions can utilize these multiple levels of servers for domain name resolution.
- the root name server is responsible for resolving top-level domains (such as .com, .org, .net, .edu, etc.) to their corresponding name server IP addresses.
- the top-level name server (Top-Level Domain Name Server) is responsible for managing the DNS records for specific top-level domains (such as .com, .net, .org, .cn, etc.).
- the authoritative name server (Authoritative Name Server) is responsible for providing the final domain name to IP address mapping confirmation information. Based on this, domain name query requests can be directed to the corresponding top-level name server and authoritative name server via the root server until the final domain name query result is found, such as the IP address corresponding to the domain name query request, thereby enabling the user to request web browsing or other network services.
- the recursive domain name query process is also recursive at each level. That is to say, the first domain name query request from the local domain name server will first go to the root domain name server and then go up level by level, through the top-level domain name server, and then through the authoritative domain name server to obtain the domain name query result.
- the private domain name resolution system 12 can only be used to provide domain name resolution services for the equipment of the cloud service provider to which it belongs.
- the local domain name server 121 can be interconnected with the centralized domain name server 123 and the public domain name server 111 respectively. It can provide recursive domain name query services to the application server 124 within its respective availability zone in the order of local cache, public domain name server 111, and centralized domain name server 123, and stop the recursive domain name query service upon obtaining the domain name query result. Stopping the recursive domain name query service means ceasing recursive domain name queries to subsequent servers, as shown in 1-3 of Figure 2. That is, domain name query requests can be processed sequentially based on the local cache, public domain name server 111, and centralized domain name server 123.
- the local domain name server 121 can process the received domain name query request first through the local cache, then through the public domain name server 111, and finally through the centralized domain name server 123, thereby providing recursive domain name query services to the application server 124 within the availability zone to which the local domain name server 121 belongs.
- the public domain name server 111 can return domain name query results to the resolution data collection device 122 during the domain name recursive query service, as shown in 4 of Figure 2.
- the domain name query results may include the domain name to be queried and the IP address corresponding to the domain name to be queried.
- the resolution data collection device 122 can collect the domain name query results returned by the public domain name server 111 during the domain name recursive query service and report them to the centralized domain name server 123, as shown in 5 of Figure 2.
- the centralized domain name server 123 can maintain the domain name query results reported by the data collection device 122 and their correspondence with availability zones, as shown in 6 of Figure 2. For example, if the domain name query result G1 is reported by the data collection device 122 in availability zone 1, then the centralized domain name server can maintain the following correspondence: domain name query result G1 - availability zone 1.
- the mapping relationship maintained by the centralized domain name server 123 provides a basis for the local domain name server 121 to provide recursive domain name query services.
- this mapping relationship can be used by the local domain name server to provide recursive domain name query services.
- the local domain name server 121 can still provide recursive domain name query services for the application server 124 within the availability zone to which the local domain name server 121 belongs, based on the mapping relationship maintained by the centralized domain name server 123.
- a private domain name resolution system is added.
- the local domain name server provides recursive domain name query services to application servers within its availability zone in the order of local cache, public domain name server, and centralized domain name server.
- the resolution data collection device collects the domain name query results returned by the public domain name server and reports them to the centralized domain name server.
- the centralized domain name server maintains the domain name query results and their correspondence with availability zones. In this way, even if the link between the local domain name server and the public domain name server is unstable or the public domain name server malfunctions, the local domain name server can still provide recursive domain name query services to application servers in its availability zone based on the correspondence maintained by the centralized domain name server. This solves the problem of failed queries to authoritative domain name servers and improves the domain name resolution success rate.
- the local domain name server 121 when the local domain name server 121 provides domain name recursive query services to the application server 124 in its respective availability zone in the order of local cache, public domain name server 111 and centralized domain name server 123, it can be implemented based on the following implementation methods.
- the first domain name query request may include the domain name to be queried.
- the first domain name query request may be sent in response to a request sent by a user through their host, or it may be sent according to the set instruction sending rules based on the application on the user's host; this embodiment does not impose any limitations.
- a recursive query is performed to a public domain name server.
- the local domain name server 121 can cache historical domain names to be queried and their corresponding IP addresses received within a preset cache duration. Whenever the cache duration is exceeded, the cached historical domain names to be queried and their corresponding IP addresses can be cleared to prevent insufficient cache space. Based on this, the local domain name server 121 can search for the IP address corresponding to the domain name to be queried in its local cache. If the local cache does not contain the IP address corresponding to the domain name to be queried, a recursive query is performed to a public domain name server.
- a recursive query can be performed to the centralized domain name server 123 based on the domain name to be queried and the identifier of the availability zone to which the local domain name server 121 belongs.
- the local domain name server 121 recursively queries the centralized domain name server 123 based on the domain name to be queried and the identifier of the availability zone to which it belongs, it can send the domain name to be queried and the identifier of the availability zone to which it belongs to the centralized domain name server in the private domain name resolution system.
- the centralized domain name server can then perform a recursive query based on the maintained domain name query results, the correspondence between domain name query results and availability zones, the identifier of the availability zone, and the domain name to be queried, to obtain the IP address corresponding to the domain name to be queried.
- the domain name query result may include the domain name to be queried and the IP address corresponding to the domain name to be queried.
- public domain name server 111 can have multiple authoritative servers.
- Local domain name server 121 will poll (repeatedly query) multiple authoritative servers. If multiple authoritative servers are unreachable, the query is considered to have failed, meaning public domain name server 111 did not return a domain name query result.
- Unreachability here is generally determined by a timeout period, which can be customized to 1-2 seconds, etc., and this embodiment does not impose any restrictions.
- the same domain name may correspond to different IP addresses and apply to different availability zones. Therefore, the same domain name query result (i.e., domain name + IP address) may apply to one or more availability zones.
- the domain name can be used to determine the domain name query result containing that domain name, and the availability zone identifier can be used to determine the domain name query result applicable to the availability zone identified by that identifier.
- domain name resolution results are maintained and managed according to availability zone identifiers.
- availability zones are not considered; only the domain name query results corresponding to the domain name and IP address are stored.
- the local domain name server 121 can specifically be used for: Based on the first domain name query request, check if the IP address corresponding to the domain name to be queried exists in the local cache; if the IP address corresponding to the domain name to be queried does not exist in the local cache, send a second domain name query request to the public domain name server 111.
- the second domain name query request includes the domain name to be queried, so as to perform a recursive query to the public domain name server 111.
- a third-party domain name query request can be sent to the centralized domain name server 123.
- the third-party domain name query request includes the domain name to be queried and the identifier of the availability zone to which the local domain name server 121 belongs, so as to perform a recursive query to the centralized domain name server 123. If the public domain name server 111 returns a domain name query result, the local domain name server 121 can receive the domain name query result.
- it can save the domain name query result to the local cache, and on the other hand, it can return the IP address of the domain name to be queried contained in the domain name query result to the application server 124, so as to provide the application server 124 with a recursive domain name query service, as shown in 7 in Figure 2.
- first,” second, and third domain name query requests are only for distinguishing different domain name query requests and does not limit the implementation method of the domain name query requests.
- the second and third domain name query requests can be implemented directly using the implementation method of the first domain name query request.
- the local domain name server 121 can provide recursive domain name query services to the application server 124 in its availability zone in a relatively accurate manner, following the order of local cache, public domain name server 111, and centralized domain name server 123.
- the data collection device 122 when the data collection device 122 collects the domain name query results returned by the public domain name server 111 during the domain name recursive query service and reports them to the centralized domain name server 123, it can obtain the domain name query results returned by the public domain name server 111 from the local cache of the local domain name server 121 in its respective availability zone. When the accumulated domain name query results reach a set number, it reports the set number of domain name query results to the centralized domain name server 123.
- the set number can be customized and can be configured as 5, 10, or 15, etc., and this embodiment does not impose any limitations.
- the local domain name server 121 within the availability zone of the data collection device 122 can cache the domain name query results returned by the public domain name server 111 during the domain name recursive query service in its local cache space (i.e., in the local cache). Therefore, the data collection device 122 can obtain the domain name query results returned by the public domain name server 111 from the local cache of the local domain name server 121. Furthermore, when the number of domain name query results accumulates to a set number, the set number of domain name query results are reported to the centralized domain name server 123 together. This optimizes the transmission process between the data collection device 122 and the centralized domain name server 123, reducing the signaling transmission pressure on both devices.
- the data resolution collection device 122 may also report each domain name query result it obtains. This embodiment does not impose any restrictions on this.
- the parsing data collection device 122 when the parsing data collection device 122 obtains the domain name query results returned by the public domain name server 111 from the local cache of the local domain name server 121, it can be implemented based on the following implementation methods.
- Implementation Method A Periodically poll the local cache of the local domain name server 121 within its availability zone. If a new domain name query result is found, read the new domain name query result from the local cache.
- the polling frequency can be customized, such as once every half hour, once every hour, etc., and this embodiment does not impose any limitations.
- the data collection device 122 can periodically poll the local domain name server 121 to see if a new domain name query result has been added to its local cache.
- the data collection device 122 can read the new domain name query result; if the local domain name server 121 replies that no new domain name query result has been added to its local cache, then the data collection device 122 does not need to read it.
- the local domain name server 121 within its availability zone sends a notification message.
- This notification message is sent by the local domain name server upon receiving a new domain name query result from the public domain name server.
- the local domain name server 121 reads the new domain name query result from its local cache.
- the local domain name server 121 can proactively send a notification message to the data collection device 122.
- the data collection device 122 can respond to this notification message and read the new domain name query result from the local cache of the local domain name server 121.
- the data collection device 122 can register for notification service with the local domain name server 121 in its availability zone in advance. After the local domain name server 121 verifies the legitimacy of the data collection device 122, it can send a notification message to the data collection device 122 when it receives a new domain name query result returned by the public domain name server 111.
- the data collection device 122 only needs to read the new domain name query results in the public domain name server 111, avoiding the data collection device 122 repeatedly obtaining the domain name query results returned by the public domain name server 111, thus saving storage space and hardware resources.
- the data collection device 122 can provide a data caching function. When collecting the domain name query results returned by the public domain name server 111 during the domain name recursive query service, it can obtain the domain name query results returned by the public domain name server 111 from the local cache of the local domain name server 121 in its availability zone, and cache the domain name query results in the target cache space pre-configured for the data collection device 122.
- the data collection device 122 can also provide a data storage function.
- the public domain name server 111 When collecting the domain name query results returned by the public domain name server 111 during the domain name recursive query service, it can obtain the domain name query results returned by the public domain name server 111 from the local cache of the local domain name server 121 in its availability zone, and store the domain name query results in the target storage space pre-configured for the data collection device 122.
- This embodiment does not impose any limitations.
- the data collection device 122 will report the domain name query results to the centralized domain name server 123 when the number of domain name query results accumulates to a set number, and these query results do not exist on the centralized domain name server 123
- the data collection device 122 in addition to the centralized domain name server 123, the local cache of the local domain name server 121, and the public domain name server 111, can also provide domain name recursive query service, further reducing the risk of query omission.
- the local domain name server 121 may send a fourth domain name query request to the resolution data collection device 122 in its availability zone to recursively query the resolution data collection device 122.
- the fourth domain name query request includes the domain name to be queried.
- the IP address corresponding to the domain name to be queried is found from the data collection device 122, the IP address corresponding to the domain name to be queried is returned to the application server 124.
- the use of "fourth” to define the domain name query request is solely for differentiation from the "first domain name query request,” "second domain name query request,” and "third domain name query request” mentioned earlier; it does not specify the implementation method of the domain name query request.
- the fourth domain name query request can be implemented directly using the same method as the first domain name query request.
- This method further reduces the risk of missing queries and improves the success rate of domain name queries.
- the local domain name server 121 may determine whether a communication connection is maintained between the local domain name server 121 and the public domain name server 111 based on the latest heartbeat message received from the public domain name server 111. In other optional embodiments, before recursively querying the centralized domain name server 123, the local domain name server 121 may also determine whether a communication connection is maintained between the local domain name server 121 and the centralized domain name server 123 based on the latest heartbeat message received from the centralized domain name server 123.
- the heartbeat message can be implemented as a small data packet sent periodically from the public domain name server 111 or the centralized domain name server 123 to the local domain name server 121 to detect whether the communication connection between the two parties is active, such as TCP (Transmission Control Protocol) Keep-Alive (a mechanism for maintaining the active state of the connection).
- TCP Transmission Control Protocol
- Keep-Alive a mechanism for maintaining the active state of the connection.
- the local domain name server 121 can determine the data integrity of the heartbeat message. If no data packets are lost in the heartbeat message, it indicates that the local domain name server 121 maintains a communication connection with the public domain name server 111 or the centralized domain name server 123. If the heartbeat message is lost, it indicates that the local domain name server 121 does not maintain a communication connection with the public domain name server 111 or the centralized domain name server 123.
- the local domain name server 121 can determine whether the time interval between the reception time of the latest received heartbeat message and the current time exceeds the set time interval (i.e., the time interval for sending heartbeat messages).
- the local domain name server 121 is not maintaining a communication connection with the public domain name server 111 or the centralized domain name server 123; if it does not exceed the time interval, it means that the local domain name server 121 is maintaining a communication connection with the public domain name server 111 or the centralized domain name server 123.
- a recursive query can be performed to the public domain name server 111 or the centralized domain name server 123.
- a recursive query can be performed directly to the centralized domain name server 123, thereby improving the domain name query efficiency. If it is determined that the local domain name server 121 and the centralized domain name server 123 do not maintain a communication connection, the query failure result returned by the centralized domain name server 123 can be accepted directly.
- the above methods can be used to further improve domain name query efficiency based on the heartbeat messages sent between public domain name server 111 or centralized domain name server 123 and local domain name server 121.
- One solution is to establish a heartbeat mechanism for public domain name servers 111 with relatively low domain name query volume (i.e., query volume less than the preset query volume threshold), or for public domain name servers 111 (such as .com, .net, .org, .amazon, .google, etc.) deployed in the cloud with relatively high query volume (i.e., query volume greater than the preset query volume threshold).
- relatively low domain name query volume i.e., query volume less than the preset query volume threshold
- public domain name servers 111 such as .com, .net, .org, .amazon, .google, etc.
- Another solution is to select no more than a set number of local domain name servers 121 as local basic domain name servers for the same cloud provider's availability zone.
- a heartbeat mechanism is established between the local basic domain name servers and the public domain name server 111. After the local basic domain name server identifies the connection status of the public domain name server as disconnected based on the latest heartbeat message it receives, it can synchronize with other local domain name servers 121.
- the centralized domain name server 123 when maintaining the domain name query results reported by the resolution data collection device 122 and their correspondence with availability zones, is specifically used for:
- the domain name query results reported by the data collection device 122 are deduplicated, and the deduplicated domain name query results are stored as storage objects.
- the centralized domain name server 123 can identify duplicate domain name query results among the numerous domain name query results reported by the data collection device 122, retain only one of the duplicate domain name query results, and store the deduplicated domain name query results.
- an availability zone list can be maintained for each stored domain name query result.
- the availability zone list can be used to store the identifiers of the availability zones to which the corresponding domain name query result applies.
- a data storage structure For example, the following is an example of a data storage structure: Domain name a1 - IP address b1 - ⁇ Identifier of availability zone 1, identifier of availability zone 3 ⁇ , Domain name a2 - IP address b2 - ⁇ Identifier of availability zone 2, identifier of availability zone 3 ⁇ .
- the centralized domain name server 123 can maintain the domain name query results reported by the resolution data collection device 122 and their correspondence with the availability zones more efficiently based on the deduplication method and the availability zone list.
- the local domain name server 111 may also select the most suitable centralized domain name server from the multiple centralized domain name servers 123 through the following implementation methods to perform recursive queries more efficiently.
- Implementation Method 1 Based on the load status of multiple centralized domain name servers 123, a target centralized domain name server is determined, and a recursive query is performed on the target centralized domain name server.
- the load status may include memory usage or the number of running tasks, etc. Higher memory usage or more running tasks indicate a higher load.
- the local domain name server 111 can determine the first selection weight of each of the multiple centralized domain name servers 123 based on their load status and a preset correspondence between load status and first selection weight, and select the centralized domain name server 123 with the highest first selection weight as the target centralized domain name server.
- a higher load corresponds to a lower first selection weight; in other words, the local domain name server 111 should select a centralized domain name server 123 with a lower load as the target centralized domain name server whenever possible.
- the first selection weight values of each of the multiple centralized domain name servers 123 are 0.4, 0.3, 0.2, and 0.1 respectively. Therefore, the centralized domain name server 123 with a first selection weight value of 0.4 can be selected as the target centralized domain name server.
- Implementation Method 2 Based on the distances from multiple centralized domain name servers 123 to their respective availability zones, determine the target centralized domain name server and perform recursive queries to the target centralized domain name server.
- the local domain name server 111 can determine the second selection weight of each of the multiple centralized domain name servers 123 based on the distances from their respective availability zones and the preset correspondence between distances and second selection weights. The local domain name server 111 will then select the centralized domain name server 123 with the highest second selection weight as the target centralized domain name server. The greater the distance, the smaller the second selection weight. In other words, the local domain name server 111 should select the centralized domain name server 123 that is as close as possible to its own availability zone as the target centralized domain name server.
- the second selection weights of the multiple centralized domain name servers 123 are 0.4, 0.3, 0.2, and 0.1 respectively. Therefore, the centralized domain name server 123 with a second selection weight of 0.4 can be selected as the target centralized domain name server.
- Resource specifications refer to the specific configuration of the centralized domain name server, such as the number of CPU cores, memory size, storage capacity, network bandwidth, etc.
- the local domain name server 111 can determine the third selection weight of each of the multiple centralized domain name servers 123 based on their resource specifications and a preset correspondence between resource specifications and third selection weights, and select the centralized domain name server 123 with the highest third selection weight as the target centralized domain name server.
- the above implementation methods 1-3 can be executed individually or in any combination, and this embodiment does not impose any restrictions. Taking the combined execution of implementation methods 1-3 as an example, the weights of load, distance, and resource specifications can be obtained, and the first selection weight, second selection weight, and third selection weight of each centralized domain name server 123 can be weighted and summed according to their respective weights to obtain the target weight of each centralized domain name server 123. Then, the centralized domain name server 123 with the highest target weight can be selected from multiple centralized domain name servers 123 as the target centralized domain name server.
- the local domain name server 111 can select the most suitable centralized domain name server from multiple centralized domain name servers 123 to perform recursive queries more efficiently.
- the domain name resolution system described in the various embodiments of this disclosure provides a passive domain name resolution method.
- This passive domain name resolution method involves collecting data through the resolution data collection device 122, storing it in the centralized domain name service 123, and then querying through the centralized domain name server 123 when the query on the public domain name server 111 fails.
- this disclosure also provides a domain name resolution method.
- This domain name resolution method is applied to a local domain name server in any availability zone, and the local domain name server belongs to a private domain name resolution system.
- the method may include steps 31 to 33 as shown in Figure 3.
- Step 31 Receive the first domain name query request from the application server in the availability zone.
- the first domain name query request includes the domain name to be queried.
- Step 32 If the IP address corresponding to the domain name to be queried does not exist in the local cache, perform a recursive query to the public domain name server in the public domain name resolution system.
- Step 33 If the public domain name server does not return the domain name query result, send the domain name to be queried and the identifier of the availability zone to the centralized domain name server in the private domain name resolution system.
- the centralized domain name server will then perform a recursive query based on the maintained domain name query results and their correspondence with the availability zone, the identifier of the availability zone, and the domain name to be queried.
- the domain name query result includes the domain name to be queried and the IP address corresponding to the domain name to be queried.
- a recursive query is performed to the public domain name server in the public domain name resolution system, including: querying whether the IP address corresponding to the domain name to be queried exists in the local cache according to the first domain name query request; if the IP address corresponding to the domain name to be queried does not exist in the local cache, sending a second domain name query request to the public domain name server, the second domain name query request including the domain name to be queried, to perform a recursive query to the public domain name server.
- a recursive query is performed on the centralized domain name server in the private domain name resolution system based on the domain name to be queried and the identifier of the availability zone.
- the method further includes: before performing a recursive query to the centralized domain name server, or if the recursive query from the centralized domain name server fails, sending a fourth domain name query request to a resolution data collection device belonging to the availability zone in the private domain name resolution system, the fourth domain name query request including the domain name to be queried, to perform a recursive query to the resolution data collection device; if the IP address corresponding to the domain name to be queried is found from the resolution data collection device, returning the IP address corresponding to the domain name to be queried to the application server; wherein, the resolution data collection device is used to collect the domain name query results returned by the public domain name server and report them to the centralized domain name server.
- the method before performing a recursive query to the public domain name server or the centralized domain name server, the method further includes: determining, based on the latest heartbeat message received from the public domain name server or the centralized domain name server, whether the local domain name server maintains a communication connection with the public domain name server or the centralized domain name server; and if it is determined that the local domain name server maintains a communication connection with the public domain name server or the centralized domain name server, performing a recursive query to the public domain name server or the centralized domain name server.
- a private domain name resolution system is added.
- the local domain name server provides recursive domain name query services to application servers within its availability zone in the order of local cache, public domain name server, and centralized domain name server.
- the resolution data collection device collects the domain name query results returned by the public domain name server and reports them to the centralized domain name server.
- the centralized domain name server maintains the domain name query results and their correspondence with availability zones. In this way, even if the link between the local domain name server and the public domain name server is unstable or the public domain name server malfunctions, the local domain name server can still provide recursive domain name query services to application servers in its availability zone based on the correspondence maintained by the centralized domain name server. This solves the problem of failed queries to authoritative domain name servers and improves the domain name resolution success rate.
- this disclosure also provides a domain name resolution method.
- This domain name resolution method is applied to a data collection device in any availability zone, where the availability zone also includes a local domain name server.
- the data collection device and the local domain name server belong to a private domain name resolution system.
- the method may include steps 41 to 43 as shown in Figure 4.
- Step 41 During the process of the local domain name server providing recursive domain name query services to the application servers in the availability zone in the order of local cache, public domain name server in the public domain name resolution system, and centralized domain name server in the private domain name resolution system, collect the domain name query results returned by the public domain name server.
- Step 42 After collecting the domain name query results returned by the public domain name server, stop the domain name recursive query service.
- the domain name query results include the domain name to be queried and the IP address corresponding to the domain name to be queried.
- Step 43 Report the domain name query results to the centralized domain name server so that the centralized domain name server can maintain the correspondence between the domain name query results and the availability zone.
- the correspondence is used to provide recursive domain name query services for the local domain name server.
- collecting domain name query results returned by public domain name servers includes: obtaining domain name query results returned by public domain name servers from the local cache of local domain name servers; and reporting a set number of domain name query results to a centralized domain name server when the accumulated domain name query results reach a set number.
- the domain name query results returned by the public domain name server can be obtained from the local cache of the local domain name server, including: periodically polling the local cache of the local domain name server, and reading the new domain name query results from the local cache when new domain name query results are found; or receiving a notification message sent by the local domain name server when it receives new domain name query results returned by the public domain name server; and reading the new domain name query results from the local cache of the local domain name server according to the notification message.
- a private domain name resolution system is added.
- the local domain name server provides recursive domain name query services to application servers within its availability zone in the order of local cache, public domain name server, and centralized domain name server.
- the resolution data collection device collects the domain name query results returned by the public domain name server and reports them to the centralized domain name server.
- the centralized domain name server maintains the domain name query results and their correspondence with availability zones. In this way, even if the link between the local domain name server and the public domain name server is unstable or the public domain name server malfunctions, the local domain name server can still provide recursive domain name query services to application servers in its availability zone based on the correspondence maintained by the centralized domain name server. This solves the problem of failed queries to authoritative domain name servers and improves the domain name resolution success rate.
- the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices.
- the execution subject of steps 31 to 33 can be device A; or the execution subject of steps 31 and 32 can be device A, and the execution subject of step 33 can be device B; and so on.
- Figures 5a and 5b are schematic diagrams of the structure of a domain name resolution device provided in another exemplary embodiment of this disclosure.
- the domain name resolution device may include: a receiving module 501, configured to receive a first domain name query request from an application server within the availability zone, the first domain name query request including a domain name to be queried; a first recursive query module 502, configured to perform a recursive query to a public domain name server in a public domain name resolution system when the IP address corresponding to the domain name to be queried does not exist in the local cache; and a second recursive query module 503, configured to send the domain name to be queried and the identifier of the availability zone to a centralized domain name server in a private domain name resolution system when the public domain name server does not return a domain name query result, so that the centralized domain name server can perform a recursive query based on the maintained domain name query results and their correspondence with the availability zone, the identifier of the availability
- the first recursive query module 502 when the first recursive query module 502 performs a recursive query to the public domain name server in the public domain name resolution system when the IP address corresponding to the domain name to be queried does not exist in the local cache, it is specifically used to: query whether the IP address corresponding to the domain name to be queried exists in the local cache according to the first domain name query request; and when the IP address corresponding to the domain name to be queried does not exist in the local cache, send a second domain name query request to the public domain name server, the second domain name query request including the domain name to be queried, so as to perform a recursive query to the public domain name server.
- the first recursive query module 502 performs a recursive query to the centralized domain name server in the private domain name resolution system based on the domain name to be queried and the identifier of the availability zone. Specifically, it is used to: send a third domain name query request to the centralized domain name server when the public domain name server does not return a domain name query result.
- the third domain name query request includes the domain name to be queried and the identifier of the availability zone, so as to perform a recursive query to the centralized domain name server.
- the second recursive query module 503 is further configured to: before performing a recursive query to the centralized domain name server, or in the event that a recursive query from the centralized domain name server fails, send a fourth domain name query request to the resolution data collection device belonging to the availability zone in the private domain name resolution system, the fourth domain name query request including the domain name to be queried, to perform a recursive query to the resolution data collection device; if the IP address corresponding to the domain name to be queried is found from the resolution data collection device, return the IP address corresponding to the domain name to be queried to the application server; wherein, the resolution data collection device is configured to collect the domain name query results returned by the public domain name server and report them to the centralized domain name server.
- the second recursive query module 503 is further configured to: determine whether the local domain name server maintains a communication connection with the public domain name server or the centralized domain name server based on the latest heartbeat message received from the public domain name server or the centralized domain name server; and if it is determined that the local domain name server maintains a communication connection with the public domain name server or the centralized domain name server, perform a recursive query to the public domain name server or the centralized domain name server.
- the domain name resolution device may include: a collection module 504, configured to collect the domain name query results returned by the public domain name server during the process of the local domain name server providing domain name recursive query services to the application server in the availability zone in the order of local cache, public domain name server in the public domain name resolution system, and centralized domain name server in the private domain name resolution system; and to stop the domain name recursive query service upon collecting the domain name query results returned by the public domain name server, wherein the domain name query results include the domain name to be queried and the IP address corresponding to the domain name to be queried; and a reporting module 505, configured to report the domain name query results to the centralized domain name server so that the centralized domain name server can maintain the correspondence between the domain name query results and the availability zone, wherein the correspondence is used for the local domain name server to provide domain name recursive query services.
- a collection module 504 configured to collect the domain name query results returned by the public domain name server during the process of the local domain name server providing domain name recursive query services
- the collection module 504 collects the domain name query results returned by the public domain name server, it is specifically used to: obtain the domain name query results returned by the public domain name server from the local cache of the local domain name server; and when the domain name query results accumulate to a set number, report the set number of domain name query results to the centralized domain name server together.
- the collection module 504 obtains the domain name query result returned by the public domain name server from the local cache of the local domain name server, it is specifically used to: periodically poll the local cache of the local domain name server, and read the new domain name query result from the local cache when a new domain name query result is found; or receive a notification message sent by the local domain name server, which is sent by the local domain name server when it receives the new domain name query result returned by the public domain name server; and read the new domain name query result from the local cache of the local domain name server according to the notification message.
- a private domain name resolution system is added.
- the local domain name server provides recursive domain name query services to application servers within its availability zone in the order of local cache, public domain name server, and centralized domain name server.
- the resolution data collection device collects the domain name query results returned by the public domain name server and reports them to the centralized domain name server.
- the centralized domain name server maintains the domain name query results and their correspondence with availability zones. In this way, even if the link between the local domain name server and the public domain name server is unstable or the public domain name server malfunctions, the local domain name server can still provide recursive domain name query services to application servers in its availability zone based on the correspondence maintained by the centralized domain name server. This solves the problem of failed queries to authoritative domain name servers and improves the domain name resolution success rate.
- the domain name resolution device can be implemented as an electronic device, including: a memory 601, a processor 602, and a communication component 603.
- Memory 601 is used to store computer programs and can be configured to store various other data to support operation on the computing platform. Examples of this data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc.
- the memory 601 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
- SRAM static random access memory
- EEPROM electrically erasable programmable read-only memory
- EPROM erasable programmable read-only memory
- PROM programmable read-only memory
- ROM read-only memory
- magnetic storage flash memory
- flash memory magnetic disk or optical disk.
- processor 602 coupled to memory 601, is configured to execute a computer program in memory 601 for: receiving a first domain name query request from an application server within the availability zone, the first domain name query request including a domain name to be queried; if the IP address corresponding to the domain name to be queried does not exist in the local cache, performing a recursive query to a public domain name server in the public domain name resolution system; if the public domain name server does not return a domain name query result, sending the domain name to be queried and the identifier of the availability zone to a centralized domain name server in the private domain name resolution system, so that the centralized domain name server can perform a recursive query based on the maintained domain name query results and their correspondence with availability zones, the identifier of the availability zone, and the domain name to be queried; the domain name query result includes the domain name to be queried and the IP address corresponding to the domain name to be queried.
- the processor 602 when the processor 602 performs a recursive query to a public domain name server in the public domain name resolution system when the IP address corresponding to the domain name to be queried does not exist in the local cache, it is specifically configured to: query whether the IP address corresponding to the domain name to be queried exists in the local cache according to the first domain name query request; and when the IP address corresponding to the domain name to be queried does not exist in the local cache, send a second domain name query request to the public domain name server, the second domain name query request including the domain name to be queried, to perform a recursive query to the public domain name server.
- the processor 602 when the processor 602 performs a recursive query to the centralized domain name server in the private domain name resolution system based on the domain name to be queried and the identifier of the availability zone, if the public domain name server does not return a domain name query result, it is specifically used to: send a third domain name query request to the centralized domain name server, the third domain name query request including the domain name to be queried and the identifier of the availability zone, to perform a recursive query to the centralized domain name server.
- the processor 602 is further configured to: before performing a recursive query to the centralized domain name server, or if the recursive query from the centralized domain name server fails, send a fourth domain name query request to a resolution data collection device belonging to the availability zone in the private domain name resolution system, the fourth domain name query request including the domain name to be queried, to perform a recursive query to the resolution data collection device; if the IP address corresponding to the domain name to be queried is found from the resolution data collection device, return the IP address corresponding to the domain name to be queried to the application server; wherein, the resolution data collection device is configured to collect the domain name query results returned by the public domain name server and report them to the centralized domain name server.
- the processor 602 before performing a recursive query to the public domain name server or the centralized domain name server, the processor 602 is further configured to: determine, based on the latest heartbeat message received from the public domain name server or the centralized domain name server, whether the local domain name server maintains a communication connection with the public domain name server or the centralized domain name server; and, if it is determined that the local domain name server maintains a communication connection with the public domain name server or the centralized domain name server, perform a recursive query to the public domain name server or the centralized domain name server.
- processor 602 coupled to memory 601, is configured to execute a computer program in memory 601 for: collecting domain name query results returned by the public domain name server during the process of the local domain name server providing recursive domain name query services to application servers within the availability zone in the order of local cache, public domain name servers in the public domain name resolution system, and centralized domain name servers in the private domain name resolution system; stopping the recursive domain name query service upon receiving the domain name query results returned by the public domain name server, wherein the domain name query results include the domain name to be queried and the IP address corresponding to the domain name to be queried; and reporting the domain name query results to the centralized domain name server so that the centralized domain name server can maintain the correspondence between the domain name query results and the availability zone, wherein the correspondence is used for the local domain name server to provide recursive domain name query services.
- the processor 602 collects the domain name query results returned by the public domain name server, it is specifically used to: obtain the domain name query results returned by the public domain name server from the local cache of the local domain name server; and when the domain name query results accumulate to a set number, report the set number of domain name query results to the centralized domain name server together.
- the processor 602 retrieves the domain name query result returned by the public domain name server from the local cache of the local domain name server, it is specifically configured to: periodically poll the local cache of the local domain name server, and read the new domain name query result from the local cache when a new domain name query result is found; or receive a notification message sent by the local domain name server, the notification message being sent by the local domain name server upon receiving the new domain name query result returned by the public domain name server; and read the new domain name query result from the local cache of the local domain name server according to the notification message.
- the electronic device also includes other components such as a power supply component 604.
- Figure 6 only schematically shows some of the components and does not imply that the computing platform includes only the components shown in Figure 6.
- this disclosure also provides a computer-readable storage medium storing a computer program, which, when executed, can perform the steps that can be executed by an electronic device in the above method embodiments.
- this disclosure also provides a computer program product, including a computer program/instruction, which, when executed by a processor, performs the domain name resolution method.
- a private domain name resolution system is added.
- the local domain name server provides recursive domain name query services to application servers within its availability zone in the order of local cache, public domain name server, and centralized domain name server.
- the resolution data collection device collects the domain name query results returned by the public domain name server and reports them to the centralized domain name server.
- the centralized domain name server maintains the domain name query results and their correspondence with availability zones. In this way, even if the link between the local domain name server and the public domain name server is unstable or the public domain name server malfunctions, the local domain name server can still provide recursive domain name query services to application servers in its availability zone based on the correspondence maintained by the centralized domain name server. This solves the problem of failed queries to authoritative domain name servers and improves the domain name resolution success rate.
- the aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
- SRAM Static Random-Access Memory
- EEPROM Electrically Erasable Programmable Read-Only Memory
- EPROM Erasable Programmable Read-Only Memory
- PROM Programmable Read-Only Memory
- ROM Read-Only Memory
- magnetic storage flash memory
- flash memory magnetic disk, or optical disk.
- the aforementioned communication components are configured to facilitate wired or wireless communication between the device containing the communication components and other devices.
- the device containing the communication components can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G/LTE, 5G, or combinations thereof.
- the communication components receive broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.
- the communication components also include a Near Field Communication (NFC) module to facilitate short-range communication.
- the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology, and other technologies.
- RFID Radio Frequency Identification
- IrDA Infrared Data Association
- UWB Ultra Wide Band
- Bluetooth Bluetooth
- the aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
- this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code.
- CD-ROM compact disc read-only memory
- optical storage etc.
- These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and/or one or more block diagrams.
- These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and/or one or more block diagrams.
- a computing device includes one or more processors (Central Processing Unit, CPU), input/output interfaces, network interfaces, and memory.
- processors Central Processing Unit, CPU
- input/output interfaces input/output interfaces
- network interfaces network interfaces
- memory volatile and non-volatile memory
- Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
- RAM random access memory
- ROM read-only memory
- flash RAM flash random access memory
- Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
- PRAM phase-change random access memory
- SRAM static random access memory
- DRAM dynamic random access memory
- RAM random access memory
- ROM read-only memory
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本公开实施例提供一种域名解析方法、设备、系统、存储介质及程序产品。在本方案中,在公有域名解析系统基础上增设私有域名解析系统,解析数据收集装置可收集公共域名服务器返回的域名查询结果并上报中心化域名服务器,中心化域名服务器可维护域名查询结果及其与可用区的对应关系,使本地域名服务器可按照本地缓存、公共域名服务器以及中心化域名服务器的顺序为应用服务器提供域名递归查询。
Description
相关申请的交叉引用
本公开要求于2024年08月02日提交的、申请号为202411063470.2的中国专利申请的优先权,该申请的全文以引用的方式并入本文中。
本公开涉及云计算技术领域,尤其涉及一种域名解析方法、设备、系统、存储介质及程序产品。
域名解析是指通过向域名系统(Domain Name System,DNS)查询,将域名解析成对应IP(Internet Protocol,网际互连协议)地址的过程。目前,DNS包括多级域名服务器,例如根域名服务器、顶级域名服务器、权威域名服务器以及本地域名服务器。
其中,递归查询是最常用的域名解析方式,即自本地域名服务器开始,若本地不存在域名对应的IP地址,继续向上级域名服务器(即权威域名服务器)进行递归查询,直至能够返回域名对应的IP地址为止。
在实际应用中,可能因为本地到权威域名服务器之间的链路不稳定或者权威域名服务器本身存在异常等原因,导致查询权威域名服务器失败的情况,最终影响DNS客户端的正常运行。
本公开的多个方面提供一种域名解析方法、设备、系统、存储介质及程序产品,用以解决查询权威域名服务器失败的问题,提高域名解析的成功率。
本公开实施例提供一种域名解析系统,包括:公共域名解析系统和私有域名解析系统;所述公共域名解析系统包括:公共域名服务器;所述私有域名解析系统包括:中心化域名服务器,以及部署于至少一个可用区中的本地域名服务器和解析数据收集装置;其中,所述本地域名服务器与所述中心化域名服务器和所述公共域名服务器分别互联,用于按照本地缓存、所述公共域名服务器以及所述中心化域名服务器的顺序依次为其所属可用区内的应用服务器提供域名递归查询服务,并在得到域名查询结果的情况下停止所述域名递归查询服务;所述解析数据收集装置,用于收集所述公共域名服务器在所述域名递归查询服务过程中返回的域名查询结果,并上报至所述中心化域名服务器,所述域名查询结果包括待查询域名及所述待查询域名对应的IP地址;所述中心化域名服务器,用于维护所述解析数据收集装置上报的所述域名查询结果及其与可用区之间的对应关系,所述对应关系用于供所述本地域名服务器提供域名递归查询服务。
本公开实施例还提供一种域名解析方法,应用于任一可用区中的本地域名服务器,所述本地域名服务器属于私有域名解析系统,所述方法包括:接收所述可用区内应用服务器的第一域名查询请求,所述第一域名查询请求包括待查询域名;在本地缓存不存在所述待查询域名对应IP地址的情况下,向公共域名解析系统中的公共域名服务器进行递归查询;在所述公共域名服务器未返回域名查询结果的情况下,将所述待查询域名以及所述可用区的标识发送至所述私有域名解析系统中的中心化域名服务器,以由所述中心化域名服务器根据维护的域名查询结果及其与可用区之间的对应关系、所述可用区的标识以及所述待查询域名进行递归查询;所述域名查询结果包括待查询域名及所述待查询域名对应的IP地址。
本公开实施例还提供一种域名解析方法,应用于任一可用区中的解析数据收集装置,所述可用区还包括本地域名服务器,所述解析数据收集装置和所述本地域名服务器属于私有域名解析系统,所述方法包括:在所述本地域名服务器按照本地缓存、公共域名解析系统中的公共域名服务器以及所述私有域名解析系统中的中心化域名服务器的顺序依次为所述可用区内的应用服务器提供域名递归查询服务的过程中,收集所述公共域名服务器返回的域名查询结果;在收集到所述公共域名服务器返回的域名查询结果,停止所述域名递归查询服务,所述域名查询结果包括待查询域名及所述待查询域名对应的IP地址;将所述域名查询结果上报所述中心化域名服务器,以供所述中心化域名服务器维护所述域名查询结果与可用区之间的对应关系,所述对应关系用于供所述本地域名服务器提供域名递归查询服务。
本公开实施例还提供一种电子设备,包括:存储器和处理器;所述存储器用于存储一条或多条计算机指令;所述处理器用于执行所述一条或多条计算机指令以用于:执行权利要求所述域名解析方法中的步骤。
本公开实施例还提供一种存储有计算机程序的计算机可读存储介质,当计算机程序被处理器执行时,致使所述处理器能够实现所述域名解析方法中的步骤。
本公开实施例还提供一种计算机程序产品,包括计算机程序/指令,当所述计算机程序/指令被处理器执行时,执行所述域名解析方法。
在本公开实施例中,在公有域名解析系统的基础上,增设了私有域名解析系统,该系统中的解析数据收集装置可收集公共域名服务器成功返回的域名查询结果并上报中心化域名服务器,中心化域名服务器可维护域名查询结果及其与可用区的对应关系,使得本地域名服务器可按照本地缓存、公共域名服务器以及中心化域名服务器的顺序为应用服务器提供域名递归查询。通过这种方式,即使本地域名服务器与公共域名服务器的链路不稳定或公共域名服务器异常,本地域名服务器也可根据中心化域名服务器维护的对应关系,为本地域名服务器所属可用区的应用服务器提供域名递归查询,从而解决了查询权威域名服务器失败问题,提高域名解析成功率。
此处所说明的附图用来提供对本公开的进一步理解,构成本公开的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:
图1为本公开一示例性实施例提供的一种域名解析的方法示意图;
图2为本公开一示例性实施例提供的域名解析系统的结构示意图;
图3为本公开一示例性实施例提供的一种域名解析方法的流程示意图;
图4为本公开另一示例性实施例提供的一种域名解析方法的流程示意图;
图5a-图5b为本公开一示例性实施例提供的域名解析装置的结构示意图;
图6为本公开一示例性实施例提供的电子设备的结构示意图。
为使本公开的目的、技术方案和优点更加清楚,下面将结合本公开具体实施例及相应的附图对本公开技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
需要说明的是,本公开所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,并且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准,并提供有相应的操作入口,供用户选择授权或者拒绝。另外,本公开涉及的各种模型(包括但不限于语言模型或大模型)是符合相关法律和标准规定的。
在本公开实施例中,如图1所示,在云计算领域中,云厂商可以根据应用需求或针对一些虚拟私有云(Virtual Private Cloud,VPC)等网络系统,建立至少一个可用区(Availability Zone,AZ),可用区指的是云计算服务商在一个地理区域内建立的、具有独立的电力、网络、冷却和其他基础设施的数据中心集群,每个可用区都可作为独立的实体运作,即使在一个可用区发生故障(例如电力中断、网络问题或自然灾害),其他可用区也能继续提供服务,从而确保了高可用性和容错能力。图1中仅示例性地示出了可用区1和可用区2共两个可用区,并未对实际场景中的可用区数量进行限制。其中,每个可用区中可部署有本地域名服务器和应用服务器,本地域名服务器可对外直接查询公共域名解析系统中的权威服务器,以为对应的应用服务器提供域名递归查询服务。
但是,基于递归查询的方式,在域名解析的过程中可能会因为本地到权威域名服务器之间的链路不稳定或者权威域名服务器本身存在异常等原因,导致查询权威域名服务器失败的情况,最终影响DNS客户端的正常运行。
进一步地,如图2所示,本公开为了解决可用区中应用服务器面临的域名解析问题,在在公有域名解析系统的基础上,增设了私有域名解析系统,私有域名解析系统可包括:中心化域名服务器,以及部署于至少一个可用区中的本地域名服务器和解析数据收集装置。以下将结合图2所示的,详细说明本公开各实施例提供的技术方案。
图2是本公开提供的域名解析系统1的系统架构图,如图2所示,域名解析系统1可包括:公共域名解析系统11和私有域名解析系统12。
公共域名解析系统11可包括:公共域名服务器111。私有域名解析系统12可包括:部署于至少一个可用区中的本地域名服务器121和解析数据收集装置122,以及,中心化域名服务123。其中,每个可用区中可包括应用服务器124,应用服务器124可以是物理的服务器,也可以是云服务器,例如虚拟机、ECS、各种计算节点等。
需要说明的是,可用区的数量可为一个或多个,图2中示出的两个可用区,仅为示例性说明,并不对可用区的数量进行限制。
其中,如图2所示,解析数据收集装置122可部署在本地域名服务器121外部,除此之外,解析数据收集装置122还可部署在其所属可用区内的本地域名服务器121内部,本实施例不做限制。当解析数据收集装置122部署在其所属可用区内的本地域名服务器121内部时,可作为本地域名服务器121内部的一个功能模块、一个工作单元或者工作组件,本实施例不做限制。
在本实施例中,如图2所示,公共域名服务器111可包括多级服务器,例如,级别自上而下依次是根域名服务器、顶级域名服务器和权威域名服务器。这三种级别的域名服务器都是公共域名解析系统中的域名服务器,都属于公共域名服务器,各个厂商的设备、各个地域的设备可利用多级服务器进行域名解析。其中,根域名服务器负责解析顶级域名(如.com、.org、.net、.edu等)到它们对应的域名服务器的IP地址。其中,顶级域名服务器(Top-Level Domain Name Server)负责管理特定顶级域名(如.com、.net、.org、.cn等)的DNS记录。权威域名服务器(Authoritative Name Server)负责提供最终的域名到IP地址映射确认信息。基于此,域名查询请求可借助根服务器来指引到相应的顶级域名服务器、权威域名服务器,直到找到最终的域名查询结果,比如域名查询请求对应的IP地址,从而实现用户请求的网页浏览或其他网络服务的响应。其中,在公共域名解析系统内部,域名递归查询的过程也是逐级向上递归的,也就是说,本地域名服务器的第一域名查询请求会先到根域名服务器并逐级向上,经过顶级域名服务器,再经过权威域名服务器而得到域名查询结果。
相对公共域名服务器111而言,私有域名解析系统12仅可用于为所属云服务厂商的设备提供域名解析服务。
在本实施例中,本地域名服务器121可与中心化域名服务器123和公共域名服务器111分别互联,可按照本地缓存、公共域名服务器111以及中心化域名服务器123的顺序依次为其所属可用区内的应用服务器124提供域名递归查询服务,并在得到域名查询结果的情况下停止域名递归查询服务。其中,停止所述域名递归查询服务指的是不再向后续服务器进行域名递归查询。如图2中①-③所示。也就是说,域名查询请求可依次基于本地缓存、公共域名服务器111以及中心化域名服务器123进行处理,比如,本地域名服务器121可将接收到的域名查询请求,先经由本地缓存进行第一步处理,再经由公共域名服务器111进行第二步处理,再经由中心化域名服务器123进行第三步处理,从而为该本地域名服务器121所属可用区内的应用服务器124提供域名递归查询服务。
在本实施例中,公共域名服务器111可在域名递归查询服务过程中向解析数据收集装置122返回域名查询结果,如图2中的④所示。域名查询结果可包括待查询域名及待查询域名对应的IP地址。解析数据收集装置122可收集公共域名服务器111在域名递归查询服务过程中返回的域名查询结果,并上报至中心化域名服务器123,如图2中的⑤所示。
对应地,中心化域名服务器123可维护解析数据收集装置122上报的域名查询结果及其与可用区之间的对应关系,如图2中的⑥所示。比如,域名查询结果G1是由可用区1中的数据收集装置122上报的,那么中心化域名服务器可维护有以下对应关系:域名查询结果G1-可用区1。
在本实施例中,中心化域名服务器123维护的对应关系可为本地域名服务器121提供域名递归查询服务提供基础,换句话说,该对应关系可供本地域名服务器提供域名递归查询服务。即使本地域名服务器121与公共域名服务器123之间的链路不稳定或者公共域名服务器本身存在异常,本地域名服务器121也可根据中心化域名服务器123维护的对应关系,为本地域名服务器121所属可用区内的应用服务器124提供域名递归查询服务。
在本实施例中,增设了私有域名解析系统,其中的本地域名服务器可按照本地缓存、公共域名服务器以及中心化域名服务器的顺序为所属可用区内的应用服务器提供域名递归查询服务;解析数据收集装置可收集公共域名服务器返回的域名查询结果并上报中心化域名服务器;中心化域名服务器可维护域名查询结果及其与可用区之间的对应关系。通过这种方式,即使本地域名服务器与公共域名服务器之间的链路不稳定或公共域名服务器异常,本地域名服务器也可根据中心化域名服务器维护的对应关系,为本地域名服务器所属可用区的应用服务器提供域名递归查询服务,从而解决了查询权威域名服务器失败问题,提高域名解析成功率。
在一些可选的实施例中,本地域名服务器121在按照本地缓存、公共域名服务器111以及中心化域名服务器123的顺序依次为其所属可用区内的应用服务器124提供域名递归查询服务时,具体可基于以下实施方式实现。
首先,可接收其所属可用区内应用服务器124的第一域名查询请求,第一域名查询请求可包括待查询域名。其中,第一域名查询请求可响应用户通过其持有的主机发出的请求发送指令而发出,也可根据用户持有的主机上的应用程序按照设定的指令发送规则而发送,本实施例不做限制。
其次,在本地缓存不存在待查询域名对应IP地址的情况下,向公共域名服务器进行递归查询。需要说明的是,本地域名服务器121在历史时刻,可根据预设的缓存时长,将缓存时长内接收到的历史待查询域名及其对应IP地址进行缓存,每当超出该缓存时长,可将该缓存时长内缓存的历史待查询域名及其对应IP地址进行清理,以防止缓存空间不足。基于此,本地域名服务器121可在本地缓存中搜索待查询域名对应IP地址,若本地缓存不存在待查询域名对应IP地址,则可向公共域名服务器进行递归查询。
之后,在公共域名服务器111未返回域名查询结果的情况下,可根据待查询域名以及本地域名服务器121所属可用区的标识,向中心化域名服务器123进行递归查询。其中,本地域名服务器121在根据待查询域名以及本地域名服务器121所属可用区的标识,向中心化域名服务器123进行递归查询时,可将待查询域名以及本地域名服务器121所属可用区的标识发送至私有域名解析系统中的中心化域名服务器,中心化域名服务器可根据维护的域名查询结果及域名查询结果与可用区之间的对应关系、可用区的标识以及待查询域名进行递归查询,得到待查询域名对应的IP地址。其中,域名查询结果可包括待查询域名及待查询域名对应的IP地址。
其中,公共域名服务器111中的权威服务器可有多个,本地域名服务器121会轮询(轮番询问)多个权威服务器,如果多个权威服务器都不可达就认为查询权威服务器失败,即公共域名服务器111未返回域名查询结果。此处的不可达一般可通过超时时间进行判断,超时时间可自定义配置,可配置为1-2秒等,本实施例不做限制。其中,同一域名可能对应不同的IP地址,适用于不同的可用区,所以同一个域名查询结果(即域名+IP地址)可能适用于一个或多个可用区,通过域名可以确定包含该域名的域名查询结果,通过可用区标识可以确定适用于该可用区标识所标识的可用区的域名查询结果。在中心化域名服务器中是按照可用区的标识对域名解析结果进行维护管理的,但是在公有域名解析系统中,是不关注可用区的,只会存储域名与IP地址对应的域名查询结果。
进一步地,本地域名服务器121在执行以上实施方式时,具体可用于:
根据第一域名查询请求,查询本地缓存中是否存在待查询域名对应的IP地址;在
本地缓存中不存在待查询域名对应IP地址的情况下,向公共域名服务器111发送第二域名查询请求,第二域名查询请求包括待查询域名,以向公共域名服务器111进行递归查询。
根据第一域名查询请求,查询本地缓存中是否存在待查询域名对应的IP地址;在
本地缓存中不存在待查询域名对应IP地址的情况下,向公共域名服务器111发送第二域名查询请求,第二域名查询请求包括待查询域名,以向公共域名服务器111进行递归查询。
在公共域名服务器111未返回域名查询结果的情况下,可向中心化域名服务器123发送第三域名查询请求,第三域名查询请求包括待查询域名和本地域名服务器121所属可用区的标识,以向中心化域名服务器123进行递归查询。在公共域名服务器111返回域名查询结果的情况下,本地域名服务器121可接收域名查询结果,一方面可将域名查询结果保存至本地缓存中,一方面可将域名查询结果中包含的待查询域名的IP地址返回给应用服务器124,以为应用服务器124提供域名递归查询服务,如图2中的⑦所示。
需要说明的是,以上使用“第一”、“第二”和“第三”对域名查询请求进行限定,仅用于对不同的域名查询请求进行区分,并不对域名查询请求的实现方式进行限定。可选地,第二域名查询请求和第三域名查询请求可直接采用第一域名查询请求的实现方式来实现。
通过这种方式,本地域名服务器121可按照本地缓存、公共域名服务器111以及中心化域名服务器123的顺序,较为准确地为其所属可用区内的应用服务器124提供域名递归查询服务。
在一些可选的实施例中,解析数据收集装置122在收集公共域名服务器111在域名递归查询服务过程中返回的域名查询结果并上报至中心化域名服务器123时,可从其所属可用区内的本地域名服务器121的本地缓存中,获取公共域名服务器111返回的域名查询结果,并在域名查询结果累积到设定数量的情况下,将设定数量个域名查询结果一并上报中心化域名服务器123。其中,设定数量支持自定义配置,可配置为5、10或15等等,本实施例不做限制。
也就是说,解析数据收集装置122所属可用区内的本地域名服务器121,可将公共域名服务器111在域名递归查询服务过程中返回的域名查询结果缓存至本地的缓存空间中(即本地缓存中),进而,解析数据收集装置122可从本地域名服务器121的本地缓存中,获取公共域名服务器111返回的域名查询结果。并且,在域名查询结果累积到设定数量的情况下将设定数量个域名查询结果一并上报中心化域名服务器123,对解析数据收集装置122与中心化域名服务器123之间的传输过程进行了优化,降低了解析数据收集装置122和中心化域名服务器123各自的信令传输压力。通过这种积累到一定数量进行上报的方式,可以减少解析数据收集装置122与中心化域名服务器123之间的交互次数,减少IO(Input/Output,输入/输出)操作。但是,并不限于此,为了便于中心化域名服务器123能够更加及时地保存公共域名服务器111返回的域名查询结果,解析数据收集装置122也可以每获取一个域名查询结果就上报一次,本实施例对此不做限制。
承接前述实施例,解析数据收集装置122在“从本地域名服务器121的本地缓存中,获取公共域名服务器111返回的域名查询结果”时,具体可基于以下实施方式实现。
实施方式A、定期轮询其所属可用区内的本地域名服务器121的本地缓存,在发现有新的域名查询结果的情况下,从本地缓存中读取新的域名查询结果。其中,轮询的频率支持自定义配置,可配置为每半小时询问一次、每一小时询问一次等等,本实施例不做限制。其中,解析数据收集装置122可定期询问本地域名服务器121其本地缓存中是否添加有新的域名查询结果,若本地域名服务器121回复其本地缓存中添加有新的域名查询结果,那么解析数据收集装置122可读取该新的域名查询结果;若本地域名服务器121回复其本地缓存中未添加有新的域名查询结果,则解析数据收集装置122可不进行读取。
实施方式B、接收其所属可用区内的本地域名服务器121发送的通知消息,通知消息由本地域名服务器在收到公共域名服务器返回的新的域名查询结果的情况下发送;根据通知消息从本地域名服务器121的本地缓存中读取新的域名查询结果。换言之,本地域名服务器121在收到公共域名服务器111返回的新的域名查询结果,可主动向解析数据收集装置122发送通知消息。解析数据收集装置122可响应该通知消息,从本地域名服务器121的本地缓存中读取新的域名查询结果。
其中,解析数据收集装置122可预先向其所属可用区内的本地域名服务器121进行通知服务注册,本地域名服务器121对解析数据收集装置122通过合法性校验后,本地域名服务器121即可在收到公共域名服务器111返回的新的域名查询结果的情况下向解析数据收集装置122发送通知消息。
通过以上实施方式A和实施方式B,解析数据收集装置122仅需要对公共域名服务器111中新的域名查询结果进行读取,避免了解析数据收集装置122重复获取公共域名服务器111返回的域名查询结果,节省了存储空间和硬件资源。
需要说明的是,解析数据收集装置122可提供数据缓存功能,收集公共域名服务器111在域名递归查询服务过程中返回的域名查询结果时,可从其所属可用区内的本地域名服务器121的本地缓存中,获取公共域名服务器111返回的域名查询结果,并将域名查询结果缓存至预先为解析数据收集装置122配置的目标缓存空间中;解析数据收集装置122也可提供数据存储功能,收集公共域名服务器111在域名递归查询服务过程中返回的域名查询结果时,可从其所属可用区内的本地域名服务器121的本地缓存中,获取公共域名服务器111返回的域名查询结果,并将域名查询结果存储至预先为解析数据收集装置122配置的目标存储空间中,本实施例不做限制。
考虑到解析数据收集装置122会在域名查询结果累积到设定数量的情况下一并上报中心化域名服务器123,这部分查询结果是中心化域名服务器123上不存在的,因此,在一些可选的实施例中,除了中心化域名服务器123、本地域名服务器121自身的本地缓存以及公共域名服务器111,解析数据收集装置122也可提供域名递归查询服务,进一步降低了查询遗漏的风险。
具体地,本地域名服务器121在向中心化域名服务器123进行递归查询之前,或者,在从中心化域名服务器123查询失败的情况下,还可向其所属可用区内的解析数据收集装置122发送第四域名查询请求以向解析数据收集装置122进行递归查询,第四域名查询请求包括待查询域名。
在从解析数据收集装置122查询到待查询域名对应的IP地址的情况下,将待查询域名对应的IP地址返回给应用服务器124。
其中,使用“第四”对域名查询请求进行限定,仅为了与前文中的“第一域名查询请求”、“第二域名查询请求”以及“第三域名查询请求”进行区分,并未对域名查询请求的实现方式进行限定。可选地,第四域名查询请求可直接采用第一域名查询请求的实现方式来实现。
通过这种方式,进一步降低了查询遗漏的风险,提高域名查询的成功率。
在一些可选的实施例中,本地域名服务器121在向本地域名服务器111进行递归查询之前,还可根据最新收到的来自公共域名服务器111的心跳消息,判断本地域名服务器与公共域名服务器111之间是否保持通信连接。在另一些可选的实施例中,本地域名服务器121在向中心化域名服务器123进行递归查询之前,还可根据最新收到的来自中心化域名服务器123的心跳消息,判断本地域名服务器与中心化域名服务器123之间是否保持通信连接。
其中,心跳消息可实现为公共域名服务器111或中心化域名服务器123定期向本地域名服务器121发送的小数据包,用于检测双方之间的通信连接是否活跃,比如TCP(Transmission Control Protocol,传输控制协议)的Keep-Alive(一种用于维持连接活跃状态的机制)。
可选地,本地域名服务器121接收到来自公共域名服务器111或中心化域名服务器123的心跳消息之后,可判断心跳消息的数据完整性,若心跳消息未出现数据包丢失的情况,则可说明本地域名服务器121与公共域名服务器111或中心化域名服务器123之间保持通信连接;若心跳消息出现丢失的情况,则可说明本地域名服务器121与公共域名服务器111或中心化域名服务器123之间未保持通信连接。
可选地,由于心跳消息是定期发送的,如果超过一定时间间隔一直没有收到心跳消息,可认为本地域名服务器121与公共域名服务器111或中心化域名服务器123之间断连,即未保持通信连接,基于此,本地域名服务器121可判断最新接收到的心跳消息的接收时间到当前时间的时间间隔是否超过了设定时间间隔(即心跳消息发送的时间间隔),如果超过了,则说明本地域名服务器121与公共域名服务器111或中心化域名服务器123之间未保持通信连接;如果未超过则说明本地域名服务器121与公共域名服务器111或中心化域名服务器123之间保持通信连接。
在确定本地域名服务器121与公共域名服务器111或中心化域名服务器123之间保持通信连接的情况下,可向公共域名服务器111或中心化域名服务器123进行递归查询。
在确定本地域名服务器121与公共域名服务器111之间未保持通信连接的情况下,可直接向中心化域名服务器123进行递归查询,从而提高域名查询效率。在确定本地域名服务器121未与中心化域名服务器123之间未保持通信连接的情况下,可直接接受中心化域名服务器123返回的查询失败结果。
通过以上方式,可基于公共域名服务器111或中心化域名服务器123与本地域名服务器121之间发送的心跳消息,进一步提高域名查询效率。
在一些可选的实施例中,对于公共域名服务器111,由于其要服务的可用区数量众多,与其互联的本地域名服务器121也众多,如果与所有本地域名服务器121都采用心跳机制,公共域名服务器111的负担会较重。为此,本实施例提出以下优化解决方案:
一种解决方案是:针对域名查询量不是很大(即查询量小于预设的查询量阈值)的公共域名服务器111可以建立心跳机制,或者是针对一些查询量较大(即查询量大于预设的查询量阈值)但是部署在云端的公共域名服务器111(比如com,net,org,amazon,google等)可以建立心跳机制。
另一种解决方案是:针对同一云厂商的可用区,选择不超过设定数量的本地域名服务器121作为本地基础域名服务器,在本地基础域名服务器与公共域名服务器111建立心跳机制,本地基础域名服务器基于最新收到的心跳消息识别出公共域名服务器的连接状态为断连后,可以同步给其它本地域名服务器121。
在一些可选的实施例中,中心化域名服务器123在维护解析数据收集装置122上报的域名查询结果及其与可用区之间的对应关系时,具体用于:
对解析数据收集装置122上报的域名查询结果进行去重,以去重后的各个域名查询
结果为存储对象进行存储。换言之,中心化域名服务器123可在解析数据收集装置122上报的众多域名查询结果中,确定重复域名查询结果,并只保留重复域名查询结果中的任一个域名查询结果,并将去重后的各个域名查询结果进行数据存储。之后,可为存储的各个域名查询结果分别维护可用区列表,可用区列表可用于存储对应域名查询结果所适用的可用区的标识。举例说明,以下提供一种数据存储结构的示例:域名a1-IP地址b1-{可用区1的标识,可用区3的标识},域名a2-IP地址b2-{可用区2的标识,可用区3的标识}。
对解析数据收集装置122上报的域名查询结果进行去重,以去重后的各个域名查询
结果为存储对象进行存储。换言之,中心化域名服务器123可在解析数据收集装置122上报的众多域名查询结果中,确定重复域名查询结果,并只保留重复域名查询结果中的任一个域名查询结果,并将去重后的各个域名查询结果进行数据存储。之后,可为存储的各个域名查询结果分别维护可用区列表,可用区列表可用于存储对应域名查询结果所适用的可用区的标识。举例说明,以下提供一种数据存储结构的示例:域名a1-IP地址b1-{可用区1的标识,可用区3的标识},域名a2-IP地址b2-{可用区2的标识,可用区3的标识}。
通过这种方式,中心化域名服务器123可基于去重方式以及可用区列表,较为高效地维护解析数据收集装置122上报的域名查询结果及其与可用区之间的对应关系。
在一些可选的实施例中,中心化域名服务器123的数量可为多个,且分布在不同位置。本地域名服务器111还可通过以下实施方式从多个中心化域名服务器123选择一个最为适配的中心化域名服务器,以较为高效地进行递归查询。
实施方式1、根据多个中心化域名服务器123的负载情况,确定目标中心化域名服务器,并向目标中心化域名服务器进行递归查询。其中,负载情况可包括:内存占用或运行任务数等等,内存占用越高或运行任务数越多,则负载情况越高。本地域名服务器111可根据多个中心化域名服务器123的负载情况,以及预设的负载情况与第一选择权值的对应关系,确定多个中心化域名服务器123各自的第一选择权值,并将第一选择权值最高的中心化域名服务器123作为目标中心化域名服务器。负载情况越高则第一选择权值越小,换句话说,本地域名服务器111应尽可能地选择一个负载情况较低的中心化域名服务器123作为目标中心化域名服务器。
比如,多个中心化域名服务器123的内存占用依次为10%、20%、30%、40%,那么多个中心化域名服务器123各自的第一选择权值分别为0.4、0.3、0.2、0.1,进而,可选择第一选择权值为0.4的中心化域名服务器123作为目标中心化域名服务器。
实施方式2、根据多个中心化域名服务器123到其所属可用区的距离,确定目标中心化域名服务器,并向目标中心化域名服务器进行递归查询。
其中,本地域名服务器111可根据多个中心化域名服务器123到其所属可用区的距离,以及预设的距离与第二选择权值的对应关系,确定多个中心化域名服务器123各自的第二选择权值,并将第二选择权值最高的中心化域名服务器123作为目标中心化域名服务器。距离越远则第二选择权值越小,换句话说,本地域名服务器111应尽可能地选择到其所属可用区的距离较近的中心化域名服务器123作为目标中心化域名服务器。比如,多个中心化域名服务器123到其所属可用区的距离依次为100km、200km、300km、400km,那么多个中心化域名服务器123各自的第二选择权值分别为0.4、0.3、0.2、0.1,进而,可选择第二选择权值为0.4的中心化域名服务器123作为目标中心化域名服务器。
实施方式3、根据多个中心化域名服务器123的资源规格,确定目标中心化域名服务器,并向目标中心化域名服务器进行递归查询。资源规格指中心化域名服务器的具体配置,如CPU核心数、内存大小、存储容量、网络带宽等。
其中,本地域名服务器111可根据多个中心化域名服务器123的资源规格,以及预设的的资源规格与第三选择权值的对应关系,确定多个中心化域名服务器123各自的第三选择权值,并将第三选择权值最高的中心化域名服务器123作为目标中心化域名服务器。资源规格越高则第三选择权值越大,换句话说,本地域名服务器111应尽可能地选择资源规格较高的中心化域名服务器123作为目标中心化域名服务器。
以上实施方式1-3可单独执行也可任意组合执行,本实施例不做限制。以实施方式1-3组合执行为例,可获取负载情况、距离和资源规格各自所占的权重,并根据各自所占的权重对每个中心化域名服务器123的第一选择权值、第二选择权值和第三选择权值进行加权求和,得到每个中心化域名服务器123的目标权值,之后,可从多个中心化域名服务器123中选择目标权值最高的中心化域名服务器123作为目标中心化域名服务器。
通过这种方式,本地域名服务器111可从多个中心化域名服务器123选择一个最为适配的中心化域名服务器,以较为高效地进行递归查询。
需要强调的是,本公开各个实施例记载的域名解析系统,提供了一种被动式域名解析的方式。其中,通过解析数据收集装置122进行收集,中心化域名服务123进行保存,进而在公共域名服务器111查询失败时,通过中心化域名服务器123进行查询的方式,即为被动式域名解析方式。
除了前述实施例中的域名解析系统,本公开还提供一种域名解析方法。该域名解析方法应用于任一可用区中的本地域名服务器,本地域名服务器属于私有域名解析系统。
该方法可包括如图3所示的步骤31至步骤33。
步骤31、接收可用区内应用服务器的第一域名查询请求,第一域名查询请求包括待查询域名。
步骤32、在本地缓存不存在待查询域名对应IP地址的情况下,向公共域名解析系统中的公共域名服务器进行递归查询。
步骤33、在公共域名服务器未返回域名查询结果的情况下,将待查询域名以及可用区的标识发送至私有域名解析系统中的中心化域名服务器,以由中心化域名服务器根据维护的域名查询结果及其与可用区之间的对应关系、可用区的标识以及待查询域名进行递归查询;域名查询结果包括待查询域名及待查询域名对应的IP地址。
可选地,在本地缓存不存在所述待查询域名对应IP地址的情况下,向公共域名解析系统中的公共域名服务器进行递归查询,包括:根据所述第一域名查询请求,查询本地缓存中是否存在所述待查询域名对应的IP地址;在本地缓存中不存在所述待查询域名对应IP地址的情况下,向所述公共域名服务器发送第二域名查询请求,所述第二域名查询请求包括所述待查询域名,以向所述公共域名服务器进行递归查询。
可选地,在所述公共域名服务器未返回域名查询结果的情况下,根据所述待查询域名以及所述可用区的标识,向所述私有域名解析系统中的中心化域名服务器进行递归查询,包括:在所述公共域名服务器未返回域名查询结果的情况下,向所述中心化域名服务器发送第三域名查询请求,所述第三域名查询请求包括所述待查询域名和所述可用区的标识,以向所述中心化域名服务器进行递归查询。
可选地,还包括:在向所述中心化域名服务器进行递归查询之前,或者在从所述中心化域名服务器递归查询失败的情况下,向所述私有域名解析系统中隶属于所述可用区的解析数据收集装置发送第四域名查询请求,所述第四域名查询请求包括所述待查询域名,以向所述解析数据收集装置进行递归查询;在从所述解析数据收集装置查询到所述待查询域名对应的IP地址的情况下,将所述待查询域名对应的IP地址返回给所述应用服务器;其中,所述解析数据收集装置用于收集所述公共域名服务器返回的域名查询结果并上报至所述中心化域名服务器。
可选地,在向所述公共域名服务器或所述中心化域名服务器进行递归查询之前,还包括:根据最新收到的来自所述公共域名服务器或所述中心化域名服务器的心跳消息,判断所述本地域名服务器与所述公共域名服务器或所述中心化域名服务器之间是否保持通信连接;在确定所述本地域名服务器与所述公共域名服务器或所述中心化域名服务器之间保持通信连接的情况下,向所述公共域名服务器或所述中心化域名服务器进行递归查询。
关于本实施例方法中各步骤的详细实施方式以及有益效果已经在前述实施例中进行了详细描述,此处将不做详细阐述说明。
在本实施例中,增设了私有域名解析系统,其中的本地域名服务器可按照本地缓存、公共域名服务器以及中心化域名服务器的顺序为所属可用区内的应用服务器提供域名递归查询服务;解析数据收集装置可收集公共域名服务器返回的域名查询结果并上报中心化域名服务器;中心化域名服务器可维护域名查询结果及其与可用区之间的对应关系。通过这种方式,即使本地域名服务器与公共域名服务器之间的链路不稳定或公共域名服务器异常,本地域名服务器也可根据中心化域名服务器维护的对应关系,为本地域名服务器所属可用区的应用服务器提供域名递归查询服务,从而解决了查询权威域名服务器失败问题,提高域名解析成功率。
除了前述实施例中的域名解析系统,本公开还提供一种域名解析方法。该域名解析方法应用于任一可用区中的解析数据收集装置,可用区还包括本地域名服务器,解析数据收集装置和本地域名服务器属于私有域名解析系统。
该方法可包括如图4所示的步骤41至步骤43。
步骤41、在本地域名服务器按照本地缓存、公共域名解析系统中的公共域名服务器以及私有域名解析系统中的中心化域名服务器的顺序依次为可用区内的应用服务器提供域名递归查询服务的过程中,收集公共域名服务器返回的域名查询结果。
步骤42、在收集到公共域名服务器返回的域名查询结果,停止域名递归查询服务,域名查询结果包括待查询域名及待查询域名对应的IP地址。
步骤43、将域名查询结果上报中心化域名服务器,以供中心化域名服务器维护域名查询结果与可用区之间的对应关系,对应关系用于供本地域名服务器提供域名递归查询服务。
可选地,收集公共域名服务器返回的域名查询结果,包括:从本地域名服务器的本地缓存中,获取公共域名服务器返回的域名查询结果;以及在域名查询结果累积到设定数量的情况下,将设定数量个域名查询结果一并上报中心化域名服务器。
可选地,从本地域名服务器的本地缓存中,获取公共域名服务器返回的域名查询结果,包括:定期轮询本地域名服务器的本地缓存,在发现有新的域名查询结果的情况下,从本地缓存中读取新的域名查询结果;或者接收本地域名服务器发送的通知消息,通知消息由本地域名服务器在收到公共域名服务器返回的新的域名查询结果的情况下发送;根据通知消息从本地域名服务器的本地缓存中读取新的域名查询结果。
关于本实施例方法中各步骤的详细实施方式以及有益效果已经在前述实施例中进行了详细描述,此处将不做详细阐述说明。
在本实施例中,增设了私有域名解析系统,其中的本地域名服务器可按照本地缓存、公共域名服务器以及中心化域名服务器的顺序为所属可用区内的应用服务器提供域名递归查询服务;解析数据收集装置可收集公共域名服务器返回的域名查询结果并上报中心化域名服务器;中心化域名服务器可维护域名查询结果及其与可用区之间的对应关系。通过这种方式,即使本地域名服务器与公共域名服务器之间的链路不稳定或公共域名服务器异常,本地域名服务器也可根据中心化域名服务器维护的对应关系,为本地域名服务器所属可用区的应用服务器提供域名递归查询服务,从而解决了查询权威域名服务器失败问题,提高域名解析成功率。
需要说明的是,上述实施例所提供方法的各步骤的执行主体均可以是同一设备,或者,该方法也由不同设备作为执行主体。比如,步骤31至步骤33的执行主体可以为设备A;又比如,步骤31和32的执行主体可以为设备A,步骤33的执行主体可以为设备B;等等。
另外,在上述实施例及附图中的描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本文中出现的顺序来执行或并行执行,操作的序号如31、32等,仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。需要说明的是,本文中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第二”是不同的类型。
图5a和图5b为本公开又一示例性实施例提供的域名解析装置的结构示意图。在一些实施例中,如图5a所示,域名解析装置可包括:接收模块501,用于接收所述可用区内应用服务器的第一域名查询请求,所述第一域名查询请求包括待查询域名;第一递归查询模块502,用于在本地缓存不存在所述待查询域名对应IP地址的情况下,向公共域名解析系统中的公共域名服务器进行递归查询;第二递归查询模块503,用于在所述公共域名服务器未返回域名查询结果的情况下,将所述待查询域名以及所述可用区的标识发送至所述私有域名解析系统中的中心化域名服务器,以由所述中心化域名服务器根据维护的域名查询结果及其与可用区之间的对应关系、所述可用区的标识以及所述待查询域名进行递归查询;所述域名查询结果包括待查询域名及待查询域名对应的IP地址。
可选地,第一递归查询模块502在本地缓存不存在所述待查询域名对应IP地址的情况下,向公共域名解析系统中的公共域名服务器进行递归查询时,具体用于:根据所述第一域名查询请求,查询本地缓存中是否存在所述待查询域名对应的IP地址;在本地缓存中不存在所述待查询域名对应IP地址的情况下,向所述公共域名服务器发送第二域名查询请求,所述第二域名查询请求包括所述待查询域名,以向所述公共域名服务器进行递归查询。
可选地,第一递归查询模块502在所述公共域名服务器未返回域名查询结果的情况下,根据所述待查询域名以及所述可用区的标识,向所述私有域名解析系统中的中心化域名服务器进行递归查询时,具体用于:在所述公共域名服务器未返回域名查询结果的情况下,向所述中心化域名服务器发送第三域名查询请求,所述第三域名查询请求包括所述待查询域名和所述可用区的标识,以向所述中心化域名服务器进行递归查询。
可选地,第二递归查询模块503还用于:在向所述中心化域名服务器进行递归查询之前,或者在从所述中心化域名服务器递归查询失败的情况下,向所述私有域名解析系统中隶属于所述可用区的解析数据收集装置发送第四域名查询请求,所述第四域名查询请求包括所述待查询域名,以向所述解析数据收集装置进行递归查询;在从所述解析数据收集装置查询到所述待查询域名对应的IP地址的情况下,将所述待查询域名对应的IP地址返回给所述应用服务器;其中,所述解析数据收集装置用于收集所述公共域名服务器返回的域名查询结果并上报至所述中心化域名服务器。
可选地,第二递归查询模块503在向所述公共域名服务器或所述中心化域名服务器进行递归查询之前,还用于:根据最新收到的来自所述公共域名服务器或所述中心化域名服务器的心跳消息,判断所述本地域名服务器与所述公共域名服务器或所述中心化域名服务器之间是否保持通信连接;在确定所述本地域名服务器与所述公共域名服务器或所述中心化域名服务器之间保持通信连接的情况下,向所述公共域名服务器或所述中心化域名服务器进行递归查询。
在一些实施例中,如图5b所示,域名解析装置可包括:收集模块504,用于在所述本地域名服务器按照本地缓存、公共域名解析系统中的公共域名服务器以及所述私有域名解析系统中的中心化域名服务器的顺序依次为所述可用区内的应用服务器提供域名递归查询服务的过程中,收集所述公共域名服务器返回的域名查询结果;在收集到所述公共域名服务器返回的域名查询结果,停止所述域名递归查询服务,所述域名查询结果包括待查询域名及所述待查询域名对应的IP地址;上报模块505,用于将所述域名查询结果上报所述中心化域名服务器,以供所述中心化域名服务器维护所述域名查询结果与可用区之间的对应关系,所述对应关系用于供所述本地域名服务器提供域名递归查询服务。
可选地,收集模块504收集所述公共域名服务器返回的域名查询结果时,具体用于:从所述本地域名服务器的本地缓存中,获取所述公共域名服务器返回的域名查询结果;以及在所述域名查询结果累积到设定数量的情况下,将所述设定数量个域名查询结果一并上报所述中心化域名服务器。
可选地,收集模块504从所述本地域名服务器的本地缓存中,获取所述公共域名服务器返回的域名查询结果时,具体用于:定期轮询所述本地域名服务器的本地缓存,在发现有新的域名查询结果的情况下,从所述本地缓存中读取所述新的域名查询结果;或者接收所述本地域名服务器发送的通知消息,所述通知消息由所述本地域名服务器在收到所述公共域名服务器返回的新的域名查询结果的情况下发送;根据所述通知消息从所述本地域名服务器的本地缓存中读取所述新的域名查询结果。
在本实施例中,增设了私有域名解析系统,其中的本地域名服务器可按照本地缓存、公共域名服务器以及中心化域名服务器的顺序为所属可用区内的应用服务器提供域名递归查询服务;解析数据收集装置可收集公共域名服务器返回的域名查询结果并上报中心化域名服务器;中心化域名服务器可维护域名查询结果及其与可用区之间的对应关系。通过这种方式,即使本地域名服务器与公共域名服务器之间的链路不稳定或公共域名服务器异常,本地域名服务器也可根据中心化域名服务器维护的对应关系,为本地域名服务器所属可用区的应用服务器提供域名递归查询服务,从而解决了查询权威域名服务器失败问题,提高域名解析成功率。
以上描述了域名解析装置的内部功能和结构,如图6所示,实际中,该域名解析装置可实现为电子设备,包括:存储器601、处理器602以及通信组件603。
存储器601,用于存储计算机程序,并可被配置为存储其它各种数据以支持在计算平台上的操作。这些数据的示例包括用于在计算平台上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。
存储器601可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
在一些实施例中,处理器602,与存储器601耦合,用于执行存储器601中的计算机程序,以用于:接收所述可用区内应用服务器的第一域名查询请求,所述第一域名查询请求包括待查询域名;在本地缓存不存在所述待查询域名对应IP地址的情况下,向公共域名解析系统中的公共域名服务器进行递归查询;在所述公共域名服务器未返回域名查询结果的情况下,将所述待查询域名以及所述可用区的标识发送至所述私有域名解析系统中的中心化域名服务器,以由所述中心化域名服务器根据维护的域名查询结果及其与可用区之间的对应关系、所述可用区的标识以及所述待查询域名进行递归查询;所述域名查询结果包括待查询域名及待查询域名对应的IP地址。
可选地,处理器602在本地缓存不存在所述待查询域名对应IP地址的情况下,向公共域名解析系统中的公共域名服务器进行递归查询时,具体用于:根据所述第一域名查询请求,查询本地缓存中是否存在所述待查询域名对应的IP地址;在本地缓存中不存在所述待查询域名对应IP地址的情况下,向所述公共域名服务器发送第二域名查询请求,所述第二域名查询请求包括所述待查询域名,以向所述公共域名服务器进行递归查询。
可选地,处理器602在所述公共域名服务器未返回域名查询结果的情况下,根据所述待查询域名以及所述可用区的标识,向所述私有域名解析系统中的中心化域名服务器进行递归查询时,具体用于:在所述公共域名服务器未返回域名查询结果的情况下,向所述中心化域名服务器发送第三域名查询请求,所述第三域名查询请求包括所述待查询域名和所述可用区的标识,以向所述中心化域名服务器进行递归查询。
可选地,处理器602还用于:在向所述中心化域名服务器进行递归查询之前,或者在从所述中心化域名服务器递归查询失败的情况下,向所述私有域名解析系统中隶属于所述可用区的解析数据收集装置发送第四域名查询请求,所述第四域名查询请求包括所述待查询域名,以向所述解析数据收集装置进行递归查询;在从所述解析数据收集装置查询到所述待查询域名对应的IP地址的情况下,将所述待查询域名对应的IP地址返回给所述应用服务器;其中,所述解析数据收集装置用于收集所述公共域名服务器返回的域名查询结果并上报至所述中心化域名服务器。
可选地,处理器602在向所述公共域名服务器或所述中心化域名服务器进行递归查询之前,还用于:根据最新收到的来自所述公共域名服务器或所述中心化域名服务器的心跳消息,判断所述本地域名服务器与所述公共域名服务器或所述中心化域名服务器之间是否保持通信连接;在确定所述本地域名服务器与所述公共域名服务器或所述中心化域名服务器之间保持通信连接的情况下,向所述公共域名服务器或所述中心化域名服务器进行递归查询。
在另一些实施例中,处理器602,与存储器601耦合,用于执行存储器601中的计算机程序,以用于:在所述本地域名服务器按照本地缓存、公共域名解析系统中的公共域名服务器以及所述私有域名解析系统中的中心化域名服务器的顺序依次为所述可用区内的应用服务器提供域名递归查询服务的过程中,收集所述公共域名服务器返回的域名查询结果;在收集到所述公共域名服务器返回的域名查询结果,停止所述域名递归查询服务,所述域名查询结果包括待查询域名及所述待查询域名对应的IP地址;将所述域名查询结果上报所述中心化域名服务器,以供所述中心化域名服务器维护所述域名查询结果与可用区之间的对应关系,所述对应关系用于供所述本地域名服务器提供域名递归查询服务。
可选地,处理器602收集所述公共域名服务器返回的域名查询结果时,具体用于:从所述本地域名服务器的本地缓存中,获取所述公共域名服务器返回的域名查询结果;以及在所述域名查询结果累积到设定数量的情况下,将所述设定数量个域名查询结果一并上报所述中心化域名服务器。
可选地,处理器602从所述本地域名服务器的本地缓存中,获取所述公共域名服务器返回的域名查询结果时,具体用于:定期轮询所述本地域名服务器的本地缓存,在发现有新的域名查询结果的情况下,从所述本地缓存中读取所述新的域名查询结果;或者接收所述本地域名服务器发送的通知消息,所述通知消息由所述本地域名服务器在收到所述公共域名服务器返回的新的域名查询结果的情况下发送;根据所述通知消息从所述本地域名服务器的本地缓存中读取所述新的域名查询结果。
进一步,如图6所示,该电子设备还包括:电源组件604等其它组件。图6中仅示意性给出部分组件,并不意味着计算平台只包括图6所示组件。
相应地,本公开实施例还提供一种存储有计算机程序的计算机可读存储介质,计算机程序被执行时能够实现上述方法实施例中可由电子设备执行的各步骤。
相应地,本公开实施例还提供一种计算机程序产品,包括计算机程序/指令,当所述计算机程序/指令被处理器执行时,执行所述域名解析方法。
在本实施例中,增设了私有域名解析系统,其中的本地域名服务器可按照本地缓存、公共域名服务器以及中心化域名服务器的顺序为所属可用区内的应用服务器提供域名递归查询服务;解析数据收集装置可收集公共域名服务器返回的域名查询结果并上报中心化域名服务器;中心化域名服务器可维护域名查询结果及其与可用区之间的对应关系。通过这种方式,即使本地域名服务器与公共域名服务器之间的链路不稳定或公共域名服务器异常,本地域名服务器也可根据中心化域名服务器维护的对应关系,为本地域名服务器所属可用区的应用服务器提供域名递归查询服务,从而解决了查询权威域名服务器失败问题,提高域名解析成功率。
上述存储器可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random-Access Memory,SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read Only Memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM),可编程只读存储器(Programmable Read-Only Memory,PROM),只读存储器(Read-Only Memory,ROM),磁存储器,快闪存储器,磁盘或光盘。
上述通信组件被配置为便于通信组件所在设备和其他设备之间有线或无线方式的通信。通信组件所在设备可以接入基于通信标准的无线网络,如WiFi,2G、3G、4G/LTE、5G等移动通信网络,或它们的组合。在一个示例性实施例中,通信组件经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,通信组件还包括近场通信(Near Field Communication,NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(Radio Frequency Identification,RFID)技术,红外数据协会(Infrared Data Association,IrDA)技术,超宽带(Ultra Wide Band,UWB)技术,蓝牙(BlueTooth,BT)技术和其他技术来实现。
上述电源组件,为电源组件所在设备的各种组件提供电力。电源组件可以包括电源管理系统,一个或多个电源,及其他与为电源组件所在设备生成、管理和分配电力相关联的组件。
本领域内的技术人员应明白,本公开的实施例可提供为方法、系统、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可读存储介质(包括但不限于磁盘存储器、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、光学存储器等)上实施的计算机程序产品的形式。
本公开是参照根据本公开实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(Central Processing Unit,CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(Random Access Memory,RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(Phase-change Random Access Memory,PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(Dynamic Random Access Memory,DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(Digital Video Disc,DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。
以上仅为本公开的实施例而已,并不用于限制本公开。对于本领域技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本公开的权利要求范围之内。
Claims (12)
- 一种域名解析系统,其中,包括:公共域名解析系统和私有域名解析系统;所述公共域名解析系统包括:公共域名服务器;所述私有域名解析系统包括:中心化域名服务器,以及部署于至少一个可用区中的本地域名服务器和解析数据收集装置;其中,所述本地域名服务器与所述中心化域名服务器和所述公共域名服务器分别互联,用于按照本地缓存、所述公共域名服务器以及所述中心化域名服务器的顺序依次为其所属可用区内的应用服务器提供域名递归查询服务,并在得到域名查询结果的情况下停止所述域名递归查询服务;所述解析数据收集装置,用于收集所述公共域名服务器在所述域名递归查询服务过程中返回的域名查询结果,并上报至所述中心化域名服务器,所述域名查询结果包括待查询域名及所述待查询域名对应的IP地址;所述中心化域名服务器,用于维护所述解析数据收集装置上报的所述域名查询结果及其与可用区之间的对应关系,所述对应关系用于供所述本地域名服务器提供域名递归查询服务。
- 一种域名解析方法,其中,应用于任一可用区中的本地域名服务器,所述本地域名服务器属于私有域名解析系统,所述方法包括:接收所述可用区内应用服务器的第一域名查询请求,所述第一域名查询请求包括待查询域名;在本地缓存不存在所述待查询域名对应IP地址的情况下,向公共域名解析系统中的公共域名服务器进行递归查询;在所述公共域名服务器未返回域名查询结果的情况下,将所述待查询域名以及所述可用区的标识发送至所述私有域名解析系统中的中心化域名服务器,以由所述中心化域名服务器根据维护的域名查询结果及其与可用区之间的对应关系、所述可用区的标识以及所述待查询域名进行递归查询;所述域名查询结果包括待查询域名及所述待查询域名对应的IP地址。
- 根据权利要求2所述的方法,其中,在本地缓存不存在所述待查询域名对应IP地址的情况下,向公共域名解析系统中的公共域名服务器进行递归查询,包括:根据所述第一域名查询请求,查询本地缓存中是否存在所述待查询域名对应的IP地址;在本地缓存中不存在所述待查询域名对应IP地址的情况下,向所述公共域名服务器发送第二域名查询请求,所述第二域名查询请求包括所述待查询域名,以向所述公共域名服务器进行递归查询。
- 根据权利要求2所述的方法,其中,在所述公共域名服务器未返回域名查询结果的情况下,根据所述待查询域名以及所述可用区的标识,向所述私有域名解析系统中的中心化域名服务器进行递归查询,包括:在所述公共域名服务器未返回域名查询结果的情况下,向所述中心化域名服务器发送第三域名查询请求,所述第三域名查询请求包括所述待查询域名和所述可用区的标识,以向所述中心化域名服务器进行递归查询。
- 根据权利要求2所述的方法,其中,还包括:在向所述中心化域名服务器进行递归查询之前,或者在从所述中心化域名服务器递归查询失败的情况下,向所述私有域名解析系统中隶属于所述可用区的解析数据收集装置发送第四域名查询请求,所述第四域名查询请求包括所述待查询域名,以向所述解析数据收集装置进行递归查询;在从所述解析数据收集装置查询到所述待查询域名对应的IP地址的情况下,将所述待查询域名对应的IP地址返回给所述应用服务器;其中,所述解析数据收集装置用于收集所述公共域名服务器返回的域名查询结果并上报至所述中心化域名服务器。
- 根据权利要求2-5任一项所述的方法,其中,在向所述公共域名服务器或所述中心化域名服务器进行递归查询之前,还包括:根据最新收到的来自所述公共域名服务器或所述中心化域名服务器的心跳消息,判断所述本地域名服务器与所述公共域名服务器或所述中心化域名服务器之间是否保持通信连接;在确定所述本地域名服务器与所述公共域名服务器或所述中心化域名服务器之间保持通信连接的情况下,向所述公共域名服务器或所述中心化域名服务器进行递归查询。
- 一种域名解析方法,其中,应用于任一可用区中的解析数据收集装置,所述可用区还包括本地域名服务器,所述解析数据收集装置和所述本地域名服务器属于私有域名解析系统,所述方法包括:在所述本地域名服务器按照本地缓存、公共域名解析系统中的公共域名服务器以及所述私有域名解析系统中的中心化域名服务器的顺序依次为所述可用区内的应用服务器提供域名递归查询服务的过程中,收集所述公共域名服务器返回的域名查询结果;在收集到所述公共域名服务器返回的域名查询结果,停止所述域名递归查询服务,所述域名查询结果包括待查询域名及所述待查询域名对应的IP地址;将所述域名查询结果上报所述中心化域名服务器,以供所述中心化域名服务器维护所述域名查询结果与可用区之间的对应关系,所述对应关系用于供所述本地域名服务器提供域名递归查询服务。
- 根据权利要求7所述的方法,其中,收集所述公共域名服务器返回的域名查询结果,包括:从所述本地域名服务器的本地缓存中,获取所述公共域名服务器返回的域名查询结果;以及在所述域名查询结果累积到设定数量的情况下,将所述设定数量个域名查询结果一并上报所述中心化域名服务器。
- 根据权利要求8所述的方法,其中,从所述本地域名服务器的本地缓存中,获取所述公共域名服务器返回的域名查询结果,包括:定期轮询所述本地域名服务器的本地缓存,在发现有新的域名查询结果的情况下,从所述本地缓存中读取所述新的域名查询结果;或者接收所述本地域名服务器发送的通知消息,所述通知消息由所述本地域名服务器在收到所述公共域名服务器返回的新的域名查询结果的情况下发送;根据所述通知消息从所述本地域名服务器的本地缓存中读取所述新的域名查询结果。
- 一种电子设备,其中,包括:存储器和处理器;所述存储器用于存储一条或多条计算机指令;所述处理器用于执行所述一条或多条计算机指令以用于:执行权利要求2-9任一项所述的方法中的步骤。
- 一种存储有计算机程序的计算机可读存储介质,其中,当计算机程序被处理器执行时,致使所述处理器能够实现权利要求2-9任一项所述的方法中的步骤。
- 一种计算机程序产品,其中,包括计算机程序/指令,当所述计算机程序/指令被处理器执行时,执行权利要求2-9任一项所述方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411063470.2 | 2024-08-02 | ||
| CN202411063470.2A CN121462548A (zh) | 2024-08-02 | 2024-08-02 | 域名解析方法、设备、系统、存储介质及程序产品 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2026026976A1 true WO2026026976A1 (zh) | 2026-02-05 |
Family
ID=98572690
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2025/112388 Pending WO2026026976A1 (zh) | 2024-08-02 | 2025-08-04 | 域名解析方法、设备、系统、存储介质及程序产品 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN121462548A (zh) |
| WO (1) | WO2026026976A1 (zh) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106453685A (zh) * | 2016-11-15 | 2017-02-22 | 中国移动通信集团江苏有限公司 | 由公众dns服务器代为解析的方法、系统和服务器 |
| US20200120024A1 (en) * | 2018-10-12 | 2020-04-16 | Hewlett Packard Enterprise Development Lp | Domain name system (dns) optimization for wide area networks |
| CN113596185A (zh) * | 2021-06-23 | 2021-11-02 | 阿里巴巴新加坡控股有限公司 | 基于可用区的域名解析方法、装置、设备和机器可读介质 |
| CN116112466A (zh) * | 2022-10-25 | 2023-05-12 | 阿里巴巴(中国)有限公司 | 域名解析方法及装置 |
-
2024
- 2024-08-02 CN CN202411063470.2A patent/CN121462548A/zh active Pending
-
2025
- 2025-08-04 WO PCT/CN2025/112388 patent/WO2026026976A1/zh active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106453685A (zh) * | 2016-11-15 | 2017-02-22 | 中国移动通信集团江苏有限公司 | 由公众dns服务器代为解析的方法、系统和服务器 |
| US20200120024A1 (en) * | 2018-10-12 | 2020-04-16 | Hewlett Packard Enterprise Development Lp | Domain name system (dns) optimization for wide area networks |
| CN113596185A (zh) * | 2021-06-23 | 2021-11-02 | 阿里巴巴新加坡控股有限公司 | 基于可用区的域名解析方法、装置、设备和机器可读介质 |
| CN116112466A (zh) * | 2022-10-25 | 2023-05-12 | 阿里巴巴(中国)有限公司 | 域名解析方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN121462548A (zh) | 2026-02-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101072966B1 (ko) | 파일 데이터 분배 방법, 디바이스, 및 시스템 | |
| US8510448B2 (en) | Service provider registration by a content broker | |
| JP5150769B2 (ja) | 要求ルーティングおよびクライアントロケーション情報を利用したルーティング情報の更新 | |
| CN108322506A (zh) | 一种物联网设备接入网络的方法、装置和系统 | |
| CN112153160A (zh) | 访问请求的处理方法、装置及电子设备 | |
| CN112732756B (zh) | 数据查询方法、装置、设备及存储介质 | |
| CN113301079B (zh) | 一种数据的获取方法、系统、计算设备及存储介质 | |
| WO2021093763A1 (zh) | 一种数据缓存方法和装置 | |
| CN108696551A (zh) | 系统进程间请求寻址的方法和装置 | |
| US10715608B2 (en) | Automatic server cluster discovery | |
| CN108848170A (zh) | 一种基于nagios监控的雾集群管理系统与方法 | |
| CN108650070A (zh) | 一种信息中心网络相量测量单元通信的系统与方法 | |
| US10812390B2 (en) | Intelligent load shedding of traffic based on current load state of target capacity | |
| CN106210052A (zh) | 一种广域电力服务管理方法 | |
| CN113542373B (zh) | 用于paas平台的路由服务发现装置及方法 | |
| CN108881506A (zh) | 一种基于多可用分区az的域名解析方法及装置 | |
| CN113824750B (zh) | 一种传输数据的方法和数据传输系统 | |
| CN115225608A (zh) | 一种dns域名解析的负载均衡方法、装置、设备及介质 | |
| CN113364892B (zh) | 跨多集群服务的域名解析方法、相关方法、装置和系统 | |
| CN121462548A (zh) | 域名解析方法、设备、系统、存储介质及程序产品 | |
| CN117950591A (zh) | 网关的存储管理方法及装置、电子设备、存储介质 | |
| CN114531333B (zh) | 一种管理运维数据的方法、云平台和ac | |
| US12634722B2 (en) | Resiliency against NRF failure in a 5G network | |
| CN116303712B (zh) | 适用于电网调控系统实时数据存储及访问的系统和方法 | |
| US20250234217A1 (en) | Resiliency against nrf failure in a 5g network |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25847427 Country of ref document: EP Kind code of ref document: A1 |