DNS preheating method, system and device, program product and storage medium
By using a special domain name in the DNS preheating system to determine the target recursive DNS server based on the log records of the authoritative DNS server, the problems of resource waste and excessive server load in distributed DNS preheating are solved, and more efficient DNS preheating is achieved.
Patent Information
- Application Number
- CN202411630468.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2026-05-15
AI Technical Summary
In distributed DNS preheating scenarios, existing technologies suffer from resource waste and excessive load on recursive DNS servers, resulting in invalid DNS requests from preheating machines and increased server burden.
By sending DNS requests for specific domain names to recursive DNS servers and determining the target recursive DNS server based on the log records of authoritative DNS servers, requests for the domain names to be warmed up are only sent to servers that can provide services, thus reducing invalid requests.
It effectively reduces invalid DNS requests, lowers the pressure on recursive DNS servers, avoids resource waste, and improves the efficiency of DNS warm-up.
Smart Images

Figure CN122053559A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of Internet technology, and in particular to DNS preheating methods, systems, devices, program products and storage media. Background Technology
[0002] DNS (Domain Name System) resolution is a service on the Internet used to map domain names to IP (Internet Protocol) addresses. It allows users to access Internet resources using easy-to-remember domain names instead of directly using hard-to-remember IP addresses. DNS preheating is a technique to optimize DNS resolution performance. It involves sending DNS requests for a desired domain name to a recursive DNS server in advance. If the recursive DNS server does not have a resolution result for that domain name, it will trigger a request to the authoritative DNS server for that domain name, thus caching the resolution result in that recursive DNS server. However, in distributed preheating scenarios with multiple preheating machines, minimizing unnecessary resource waste becomes a pressing technical problem. Summary of the Invention
[0003] To overcome the problems existing in related technologies, embodiments of this specification provide DNS preheating methods, systems, devices, program products, and storage media.
[0004] According to a first aspect of the embodiments of this specification, a DNS preheating method is provided, the method being applied to a preheating machine, comprising:
[0005] A DNS request for a specific domain name is initiated to at least one recursive DNS server; wherein the specific domain name is a subdomain of a preset top-level domain, and the top-level domain corresponds to a preset authoritative DNS server; the at least one recursive DNS server is used to initiate a DNS request for the specific domain name to the authoritative DNS server after successfully receiving the DNS request for the specific domain name.
[0006] A target recursive DNS server capable of providing domain name preheating services for the preheating machine is determined; wherein, the target recursive DNS server is determined based on whether the authoritative DNS server's log records the recursive DNS server's DNS requests for specific domain names;
[0007] Obtain the domain name to be preheated, and initiate a DNS request for the domain name to be preheated to the target recursive DNS server.
[0008] According to a second aspect of the embodiments of this specification, a DNS preheating method is provided, the method being applied at a decision-making end, the method comprising:
[0009] After a preheating machine in the preheating machine cluster sends a DNS request for a special domain name to a recursive DNS server, it obtains the logs of the authoritative DNS server; wherein, the special domain name is a subdomain of a preset top-level domain, and the top-level domain name corresponds to the authoritative DNS server; the recursive DNS server is used to initiate a DNS request for the special domain name to the authoritative DNS server after successfully receiving the DNS request for the special domain name.
[0010] Based on whether the log records the DNS requests of the recursive DNS server for the specific domain name, a target recursive DNS server that can provide domain name preheating services for the preheating machine is determined, so that the preheating machine initiates a DNS request for the domain name to be preheated to the corresponding target recursive DNS server.
[0011] According to a third aspect of the embodiments of this specification, a DNS preheating system is provided, the preheating system including a preheating machine cluster, the preheating machine cluster including preheating machines, the preheating machines being used to perform the steps of the method described in the first aspect; the preheating system further includes a decision terminal, the decision terminal running on any preheating machine in the preheating machine cluster, or running on other machines in the preheating system other than the preheating machine cluster, the decision terminal being used to perform the steps of the method described in the second aspect.
[0012] According to a fourth aspect of the embodiments of this specification, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method embodiments described in the first or second aspect above.
[0013] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method embodiments described in the first or second aspect above.
[0014] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method embodiments described in the first or second aspect above.
[0015] The technical solutions provided in the embodiments of this specification may include the following beneficial effects:
[0016] In this embodiment, top-level domains and their corresponding authoritative DNS servers are pre-defined, and special domains are designed as subdomains of these top-level domains. Thus, when the warm-up machine initiates a DNS request for the special domain to the recursive DNS server, if the warm-up machine is within the service range of the recursive DNS server, the recursive DNS server can accept the DNS request. Therefore, the recursive DNS server can then initiate a DNS request for the special domain to the authoritative DNS server, and the authoritative DNS server's log will record this DNS request information. If the warm-up machine is not within the service range of the recursive DNS server, the recursive DNS server will not provide services to the warm-up machine and will not initiate a DNS request for the special domain. Therefore, through log recording, it can be determined whether the recursive DNS server can provide domain name services to the warm-up machine. Thus, the warm-up machine can initiate DNS requests for the domain name to be warmed up to the identified target recursive DNS server that can provide services. Therefore, the warm-up machine will not issue invalid DNS requests, will not waste resources, and can reduce the pressure on the recursive DNS server.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a DNS warm-up method according to an exemplary embodiment of this specification.
[0019] Figure 2A This is a flowchart illustrating a DNS warm-up according to an exemplary embodiment.
[0020] Figure 2B This is a schematic diagram of a DNS preheating system according to an exemplary embodiment of this specification.
[0021] Figure 2C This is a preheating diagram of another DNS preheating system illustrated in this specification according to an exemplary embodiment.
[0022] Figure 3 This is another DNS warm-up flowchart illustrated in this specification according to an exemplary embodiment.
[0023] Figure 4 This is a hardware structure diagram of a computer device containing a DNS preheating device according to an exemplary embodiment of this specification.
[0024] Figure 5 This is a block diagram illustrating a DNS preheating device according to an exemplary embodiment of this specification.
[0025] Figure 6 This is a block diagram illustrating a DNS preheating device according to an exemplary embodiment of this specification. Detailed Implementation
[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.
[0027] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0028] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0029] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points shall be provided for users to choose to authorize or refuse.
[0030] DNS, or Domain Name System, is a crucial service on the internet. Its main function is to translate easily remembered domain names (such as "www.example.com") into IP addresses used by computers (such as "1**.0.2.1"). IP addresses are fundamental for communication between internet devices, but remembering and managing these numerical addresses is very inconvenient for users. Therefore, DNS, as a distributed database that maps domain names to IP addresses, makes it easier for people to access the internet.
[0031] In the DNS system, there are two main types of DNS servers: authoritative DNS servers and recursive DNS servers. They play different roles in the domain name resolution process.
[0032] 1. Authoritative DNS Server
[0033] Authoritative DNS servers are servers that store specific domain name information and are responsible for providing the final resolution results for a given domain name. They are typically managed by the domain owner or their hosting provider.
[0034] Authoritative DNS servers typically store the following types of DNS records: A records (mapping a domain name to an IPv4 address), AAAA records (mapping to an IPv6 address), CNAME records (aliases), MX records (mail server addresses), etc.
[0035] Authoritative DNS servers provide authoritative answers; for example, they return the accurate DNS record when the requested domain name is within their jurisdiction. Domain owners can update records on authoritative DNS servers, affecting the domain name's resolution outcome.
[0036] As an example, the owner of a domain name (such as "www.example.com") can configure one or more authoritative DNS servers to manage the domain's DNS records. When a device queries "www.example.com", these authoritative DNS servers will provide the corresponding IP address. Note that the domain name here is merely an example and not a real domain name.
[0037] 2. Recursive DNS Server
[0038] A recursive DNS server, also known as a local DNS server, is typically managed by an internet service provider (ISP) or network administrator. It is responsible for resolving DNS requests initiated by various terminal devices within the network and caching the resolution results in its own storage. If the domain name is not cached in its storage, it requests the resolution result from the authoritative DNS server for that domain.
[0039] Specifically, a recursive DNS server receives DNS query requests from user devices and is responsible for resolving those requests. It can cache queried DNS records for a period of time, for example, based on the Time to Live (TTL), which is the cached duration of a DNS record in seconds. When the TTL reaches 0, the record is deleted from the cache. Cached DNS records can speed up the response time for future identical requests. Without a cache, the recursive DNS server will query the root servers, top-level name servers, and authoritative DNS servers sequentially until it obtains the required IP address.
[0040] As an example, suppose a user device visits "www.example.com". The device sends a request to the configured recursive DNS server. If the recursive DNS server has previously resolved "www.example.com" and the record is still valid (TTL has not expired), the recursive DNS server directly returns the cached IP address. Otherwise, it can start from the root servers, querying level by level, eventually obtaining the IP address provided by the authoritative DNS server, and cache it for future use.
[0041] In some scenarios, some service providers can use DNS preheating technology to provide users with better network services.
[0042] For example, in scenarios like cloud computing, service providers offer CDN (Content Delivery Network) and DNS products. The use of CDN and DNS products inevitably involves DNS resolution. DNS resolution time is a crucial metric for evaluating the performance of CDN and DNS products. Effective DNS preheating allows recursive DNS servers to cache DNS records, thus ensuring faster DNS resolution, reducing resolution time, and minimizing the probability of resolution failures.
[0043] In simple terms, DNS preheating involves sending a DNS request for a domain name that needs to be preheated to a recursive DNS server via a machine with DNS preheating software deployed on it. If the recursive DNS server does not have a resolution result for the domain name, it will trigger the recursive DNS server to send a request to the authoritative DNS server of the domain name, thereby caching the resolution result in the recursive DNS server.
[0044] The number of recursive DNS servers on the internet is enormous, and most of them only serve users in specific regions (through IP whitelists). Therefore, a single preheating server cannot successfully preheat all recursive DNS servers on the entire network. Thus, the preheating machines are distributed.
[0045] However, in a distributed scenario, numerous challenges arise. The entire DNS preheating system comprises three components: a list of recursive DNS server clusters, domain names requiring preheating, and a distributed preheating machine cluster. For example... Figure 1 The diagram shown is a schematic of a DNS preheating method provided in this embodiment.
[0046] The preheating decision machine contains a set of domain names that need to be preheated, as well as a set of recursive DNS IP addresses. The preheating decision machine distributes the domain names that need to be preheated and the collected recursive DNS IP addresses to preheating machines 1 through N, respectively.
[0047] Figure 1 Taking N preheating machines as an example, these N machines can be distributed in different geographical locations. Each preheating machine will send a DNS request for the domain name that needs to be preheated to the IP address of each recursive DNS server, until all the domain names that need to be preheated have been requested. For example, preheating machine 1 will send a DNS request for each domain name to recursive DNS server 1, then to recursive DNS server 2, and so on, until it sends a DNS request for each domain name to recursive DNS server N. The other preheating machines perform the same process. This preheating cycle ends, and the next preheating cycle repeats this action.
[0048] Research has found that owners of recursive DNS servers, such as network operators, often configure them to serve only specific IP ranges for security or management reasons. The exact IP ranges served are known only to the recursive DNS server owner and are unknown to cloud providers. Therefore, for Figure 1 In the proposed scheme, among all the preheating requests issued by the preheating machines in the entire system, most preheating requests may actually be rejected by the recursive DNS server because the preheating machines are not within the service scope of the recursive DNS server. Only some preheating requests can be accepted by the recursive DNS server, triggering the recursive DNS server to request the authoritative DNS server corresponding to the domain name, and finally caching the resolution result.
[0049] Therefore, it can be seen that the above scheme crudely forces all preheating machines to send DNS requests to the IPs of all recursive DNS servers. Since most requests will be rejected, this is actually an ineffective preheating process, wasting resources. Furthermore, it unreasonably increases the burden on the recursive DNS servers, potentially leading to high load and the possibility that the preheating machines will be blacklisted by the recursive DNS servers, thus affecting the effectiveness of the preheating system.
[0050] Based on this, the embodiments of this specification provide a DNS preheating method. In this embodiment, in the first stage, it is first verified which preheating machines can successfully initiate valid preheating requests to which recursive DNS servers; in the second stage, based on the verification results, each preheating machine can send preheating requests to recursive DNS servers that can provide domain name preheating services.
[0051] In the first phase, verifying which preheating machines can successfully initiate valid preheating requests to which recursive DNS servers can be achieved by determining whether the IP address of the preheating machine is within the service range of the recursive DNS server after the preheating machine sends a DNS request, based on the response of the recursive DNS server. However, research has found that the response of a recursive DNS server to a DNS request is determined by the owner of the recursive DNS server. Different recursive DNS servers respond differently, and the response methods vary. For example, some recursive DNS servers may explicitly reply with a rejection if they refuse, while others may not return a response at all. In addition, there may be situations where the recursive DNS server can resolve normally, but the response cannot be received by the preheating machine due to network or other reasons. Therefore, it is impossible to accurately determine whether the IP address of the preheating machine is within the service range of the recursive DNS server based on the response of the recursive DNS server to the DNS request; that is, it is impossible to accurately determine whether a particular recursive DNS server was successfully preheated by a particular preheating machine.
[0052] In this embodiment, a special domain name approach is used. By designing special domain names and corresponding authoritative DNS servers, the system determines whether the IP address of the preheating machine falls within the service range of the recursive DNS server by checking whether a DNS request for the special domain name can reach the authoritative DNS server. In other words, it determines whether the recursive DNS server can provide domain name preheating services to the preheating machine. Therefore, after determining which recursive DNS servers can serve which preheating machines, targeted preheating of the domain names to be preheated can be performed, significantly reducing invalid DNS requests and the load on the recursive DNS servers.
[0053] like Figure 2A The diagram shown is a flowchart illustrating a DNS preheating method according to an exemplary embodiment of this specification. The method is applied to a preheating machine and may include:
[0054] In step 202, a DNS request for the specific domain name is initiated to at least one recursive DNS server.
[0055] The special domain name is a subdomain of a preset top-level domain name, and the top-level domain name corresponds to a preset authoritative DNS server; the at least one recursive DNS server is used to initiate a DNS request for the special domain name to the authoritative DNS server after successfully receiving a DNS request for the special domain name.
[0056] In step 204, a target recursive DNS server capable of providing domain name preheating services for the preheating machine is determined; wherein, the target recursive DNS server is determined based on whether the authoritative DNS server's log records the recursive DNS server's DNS requests for specific domain names.
[0057] In step 206, the domain name to be preheated is obtained, and a DNS request for the domain name to be preheated is initiated to the target recursive DNS server.
[0058] like Figure 2B The diagram shown is a schematic representation of a DNS preheating system according to an exemplary embodiment of this specification. Figure 2B It includes N preheating machines, where N is an integer greater than or equal to 1. Figure 2B The IP addresses of each preheating machine shown are for illustrative purposes only and are not actual IP addresses. Figure 2B It also includes N recursive DNS servers. It should be noted that the number of warm-up machines and recursive DNS servers is the same in this embodiment for the sake of example. In fact, the number of warm-up machines and the number of recursive DNS servers can be arbitrary, and this embodiment does not limit this.
[0059] As an example, the IP addresses of the N preheating machines can be different, which is optional, and the N preheating machines can be distributed in different geographical locations.
[0060] As an example, the DNS preheating system in this embodiment may also include a decision-making terminal, which may run on any preheating machine in the preheating machine cluster, or on other machines in the preheating system other than the preheating machine cluster.
[0061] In this embodiment, the service provider can hold a top-level domain name and pre-configure the authoritative DNS server corresponding to that top-level domain name. In practical applications, the top-level domain name can be flexibly configured according to actual needs, and this embodiment does not impose any limitations on it.
[0062] Taking "example.com" as an example, ".com" can be called a top-level domain. A top-level domain (also called a first-level domain) consists of a valid string plus a domain suffix. Therefore, a domain name like "example.com" is a top-level domain and a first-level domain. "Example" is the domain body, and ".com" is the domain suffix. Domains obtained by adding a prefix to a top-level domain are its subdomains, which can be divided into third-level subdomains and multi-level subdomains, etc.
[0063] In this embodiment, the special domain name can be a subdomain of a preset top-level domain. Therefore, when the recursive DNS server in this embodiment resolves a special domain name, such as "*.example.com", it can request resolution from the authoritative DNS server in this embodiment. Thus, the logs of the authoritative DNS server can be analyzed to see which DNS requests successfully passed from the recursive DNS server to the authoritative DNS server, successfully completing the warm-up process. The preset top-level domain name in this embodiment can be a domain name not publicly available on the internet; that is, the special domain name can be a domain name that has not been accessed on the public internet. Therefore, the recursive DNS server will not cache the resolution results of the special domain name; the recursive DNS server will ultimately initiate a DNS request for the special domain name to the recursive DNS server in this embodiment.
[0064] As an example, Figure 2B Taking an authoritative DNS server cluster as an example, the number of authoritative DNS servers can be one or more; this embodiment does not limit the number of authoritative DNS servers. The authoritative DNS servers have a logging function, which can be implemented using existing logging technologies; this embodiment does not limit the specific logging method used. For example, when a recursive DNS server initiates a DNS request for a domain name to an authoritative DNS server, the authoritative DNS server can record information about this request, such as the request time, information about the recursive DNS server, domain name information, or DNS request information, etc.
[0065] In this way, it is possible to determine from the logs of the authoritative DNS server whether the logs of the authoritative DNS server record DNS requests for a specific domain name by the recursive DNS server, and thus determine whether the recursive DNS server can provide domain name warm-up services for the warm-up machine.
[0066] For example, suppose warm-up machine 1 sends a DNS request for a specific domain name to recursive DNS server 1. If recursive DNS server 1 can provide services for the IP segment where warm-up machine 1 resides, then recursive DNS server 1 will not reject the DNS request. In this case, since recursive DNS server 1 does not cache the DNS resolution result for that specific domain name, it will eventually initiate a DNS request for the specific domain name to the authoritative DNS server. Therefore, the authoritative DNS server's log will record information about this DNS request for the specific domain name.
[0067] If recursive DNS server 1 does not provide services for the IP segment where preheating machine 1 is located, then recursive DNS server 1 will reject the DNS request. As a result, recursive DNS server 1 will not trigger a DNS request for the special domain name, and will not initiate a DNS request for the special domain name to the authoritative DNS server. Therefore, there will be no record in the logs of the authoritative DNS server.
[0068] Therefore, what is recorded in the logs are the DNS requests for specific domain names initiated by the recursive DNS servers that can provide services to the preheating machines. Thus, by checking the logs of authoritative DNS servers, it can be determined which recursive DNS servers can provide domain name preheating services to which preheating machines.
[0069] Considering that in a distributed scenario, there can be many preheating machines and many recursive DNS servers that need to be preheated, in order to more quickly analyze the logs of authoritative DNS servers to identify the recursive DNS servers that can provide services to each preheating machine, in this embodiment, the special domain name can carry the identifier of the preheating machine and the identifier of the recursive DNS server.
[0070] As an example, a unique identifier can be set for each preheating machine in the preheating machine cluster. In this embodiment, the identifier of the preheating machine can be configured according to actual needs, as long as it can distinguish each preheating machine. It can be a number or a specific identifier, etc.
[0071] As an example, a unique identifier can be set for each recursive DNS server. The identifier of the recursive DNS server in this embodiment can also be configured according to actual needs, as long as it can distinguish each recursive DNS server.
[0072] Based on this, as an example, the decision-maker can determine the preheating relationship based on the identifier of the preheating machine and the identifier of the recursive DNS server carried in each special domain name recorded in the log; wherein, the preheating relationship includes: the identifier of each recursive DNS server and the identifier of the preheating machine that the recursive DNS server can provide domain name preheating services; the preheating relationship is sent to each preheating machine, so that the preheating machine can determine the target recursive DNS server that can provide domain name preheating services corresponding to it from the preheating relationship based on its own identifier.
[0073] Thus, in this embodiment, by embedding the identifier of the preheating machine and the identifier of the recursive DNS server into the special domain name, the correspondence between the two can be identified, as well as the preheating machine and the recursive DNS server that initiated the DSN request for the special domain name. Since the authoritative DNS server's log records information about this DNS request for the special domain name, which includes the special domain name, the recursive DNS server that can provide preheating services to the preheating machine can be determined based on the preheating machine's identifier and the recursive DNS server's identifier carried in the special domain name.
[0074] As an example, in the special domain name, the identifier of the preheating machine and the identifier of the recursive DNS server can be a prefix of the top-level domain name; thus, the identifier of the preheating machine and the identifier of the recursive DNS server can be embedded in the special domain name.
[0075] For example, the identifier for preheating machine 1 is aaa1, the identifier for preheating machine 2 is aaa2, and the identifier for recursive DNS server 1 is bbb1.
[0076] Special domain names can be constructed: aaa1-bbb1.example.com, aaa2-bbb1.example.com;
[0077] Preheating machine 1 sends a DNS request to recursive DNS server 1 for the special domain name "aaa1-bbb1.example.com";
[0078] The preheating machine 2 sends a DNS request to the recursive DNS server 1 for the special domain name "aaa2-bbb1.example.com".
[0079] Assuming that recursive DNS server 1 can provide services to preheating machine 1, the authoritative DNS server will record the information "DNS request for aaa1-bbb1.example.com" in the log. If "aaa1-bbb1.example.com" is obtained from the log, it can be determined that preheating machine 1 corresponding to "aaa1" was able to successfully initiate a DNS request to recursive DNS server 1 corresponding to "bbb1", that is, recursive DNS server 1 can provide services to preheating machine 1.
[0080] If recursive DNS server 1 cannot provide services to warm-up machine 2, then the authoritative DNS server will not receive the information of "DNS request for aaa2-bbb1.example.com". Therefore, the record "aaa2-bbb1.example.com" cannot be obtained in the log. Thus, it can be determined that warm-up machine 2, corresponding to "aaa2", failed to successfully initiate a DNS request to recursive DNS server 1, corresponding to "bbb1". In other words, recursive DNS server 1 can provide services to warm-up machine 2.
[0081] In some examples, initiating a DNS request for a specific domain name to at least one recursive DNS server includes:
[0082] After obtaining the identifier of each recursive DNS server sent by the decision-making end, constructing a special domain name corresponding to each of the recursive DNS servers, and then initiating a DNS request for the special domain name to each of the recursive DNS servers; or,
[0083] The decision-making end obtains the special domain name sent by the decision-making end and initiates a DNS request for the special domain name to each recursive DNS server; wherein, the decision-making end is used to construct a special domain name corresponding to each recursive DNS server for each of the preheating machines and send the special domain name constructed for each of the preheating machines to each of the preheating machines.
[0084] As can be seen, the special domain name in this embodiment can be constructed by each preheating machine itself, or it can be constructed by the decision-making end for each preheating machine and then distributed to each preheating machine. Thus, this embodiment provides a flexible implementation method for constructing special domain names.
[0085] Considering that the warm-up machine is configured with an IP address, and that the warm-up machine also needs to obtain the IP address of the recursive DNS server in order to initiate a DNS request for a specific domain name to the recursive DNS server based on the recursive DNS server's IP address, in this embodiment, the identifier of the recursive DNS server in the special domain name can be the IP address of the recursive DNS server; that is, the special domain name can carry the IP address of the recursive DNS server. Thus, the step of the warm-up machine initiating a DNS request for the domain name to be warmed up to the target recursive DNS server can include: initiating a DNS request for the domain name to be warmed up to the target recursive DNS server based on the IP address of the target recursive DNS server. It can be seen that this embodiment uses the IP address of the recursive DNS server as the unique identifier of the recursive DNS server, allowing the warm-up machine to record the information of the recursive DNS server with the least amount of data.
[0086] Optionally, the identifier for the preheating machine in the special domain name can also be the IP address of the preheating machine.
[0087] As an example, a special domain name is constructed for each warm-up machine and each recursive DNS server; the format of the special domain name is: IP address of the warm-up machine - to - IP address of the recursive DNS server.example.com.
[0088] For example, the special domain name initiated by warm-up machine 1 (IP address 1.1.1.1) to recursive DNS server 1 (IP address 2.2.2.2) could be: 1-1-1-1-to-2-2-2-2.example.com.
[0089] The special domain name initiated by the warm-up machine 1 (IP address 1.1.2.1) to the recursive DNS server 1 (IP address 2.2.2.2) can be: 1-1-2-1-to-2-2-2-2.example.com.
[0090] It is understood that the "-to-" in the above special domain name format is only an example. In actual applications, it can be flexibly configured as needed, as long as the special domain name carries the identifier of the warm-up machine and the identifier of the recursive DNS server.
[0091] Each warm-up machine sends a DNS request for the special warm-up domain name in the above format to each recursive DNS server. Since these special domain names are not used on the public network, the recursive DNS server will only process these requests if the IP range of the warm-up machine is whitelisted.
[0092] As an example, if the IP range 1.1.1.1 of preheating machine 1 is in the whitelist of recursive DNS server 1 (2.2.2.2), and recursive DNS server (2.2.2.2) accepts the request from preheating machine 1 for the domain name 1-1-1-1-to-2-2-2-2.example.com, recursion will be triggered (because this special domain name will not be requested by others on the public internet). Therefore, the authoritative DNS server for example.com will see the request 1-1-1-1-to-2-2-2-2.example.com in its logs. Based on the record of this DNS request in the logs, it can be determined that a preheating mapping relationship can be established between preheating machine 1 and recursive DNS server 1.
[0093] Following this pattern, once all the warm-up machines have made one round of requests for the specific domain name to all the recursive DNS servers, the logs can be analyzed to collect records of the true and valid warm-up relationships. These warm-up relationships record the warm-up machines that each recursive DNS server can serve.
[0094] Optionally, the process of determining the target recursive DNS server capable of providing domain name preheating services by recording DNS requests for specific domain names in the logs of the authoritative DNS server can be executed by the decision-making end. The decision-making end can run on any preheating machine or on an additional machine. When the decision-making end runs on a preheating machine, it can determine the preheating relationship—the relationship between each preheating machine and its corresponding target recursive DNS server—and then send the preheating relationship to each of the other preheating machines. When the decision-making end runs on other machines, it can send the preheating relationship to each preheating machine. Therefore, step 204 can refer to the process of a preheating machine running a decision-making end determining the preheating relationship; or it can refer to the process of a preheating machine not running a decision-making end obtaining the preheating relationship from the decision-making end.
[0095] As an example, in practical applications, there may be situations where some recursive DNS servers can provide domain name preheating services for multiple preheating machines. Optionally, in this embodiment, a corresponding preheating machine can be determined for each recursive DNS server based on whether each recursive DNS server can provide services for each preheating machine.
[0096] Optionally, there's a possibility that a recursive DNS server can only provide service to zero preheating machines, meaning all machines in the preheating cluster are refused service by that server. More preheating machines can be added as needed, each with a different IP address than the previous ones. The above process is then repeated on these new machines to determine if the recursive DNS server can provide service to them. Ultimately, each recursive DNS server can identify a corresponding preheating machine.
[0097] Optionally, the warm-up machines corresponding to different recursive DNS servers can be the same or different; this embodiment does not limit this. For example, there can be multiple different recursive DNS servers corresponding to the same warm-up machine.
[0098] After completing the first stage of processing described above, the target recursive DNS server corresponding to each preheating machine can be obtained. The target recursive DNS server refers to the recursive DNS server that can provide domain name preheating services for the preheating machine.
[0099] like Figure 2C The diagram shown is a schematic representation of another DNS preheating method according to an exemplary embodiment of this specification. After the aforementioned processing, the decision machine can obtain the preheating relationship and send the preheating relationship and a list of domain names to be preheated (including one or more domain names to be preheated) to each preheating machine. As an example, Figure 2C The preheating relationship shown in the figure may include:
[0100] Preheating machine 1 corresponds to recursive DNS server 2, preheating machine 2 corresponds to recursive DNS server 3, preheating machine 3 corresponds to recursive DNS server 1, ..., preheating machine N corresponds to recursive DNS server N.
[0101] After receiving the preheating relationship and the list of domain names to be preheated, each preheating machine can determine its corresponding target recursive DNS server from the preheating relationship, and then send a DNS request to the target recursive DNS server for each domain name to be preheated.
[0102] For example, warm-up machine 1 sends a DNS request to the corresponding recursive DNS server 2 for each domain name to be warmed up; warm-up machine 2 sends a DNS request to the corresponding recursive DNS server 3 for each domain name to be warmed up; warm-up machine 3 sends a DNS request to the corresponding recursive DNS server 1 for each domain name to be warmed up; ...; warm-up machine N sends a DNS request to the corresponding recursive DNS server N for each domain name to be warmed up.
[0103] In this way, all N recursive DNS servers can successfully receive the DNS requests for each domain name to be preheated initiated by the corresponding preheating machine, thereby realizing the preheating of these domain names on each recursive DNS server.
[0104] Optionally, the method described in this embodiment can be executed periodically. For example, considering TTL, each warm-up machine can cyclically execute the step of initiating DNS requests for the domain name to be warmed to the target recursive DNS server according to a preset period, so that the target recursive DNS server can cache the IP address of the domain name to be warmed as much as possible. Optionally, considering that the service range of the recursive DNS server may also change, the aforementioned first-stage processing procedure of this embodiment can also be executed again according to a set period. For example, the warm-up machine can again execute the step of initiating DNS requests for the specific domain name to at least one recursive DNS server, and the decision-making end can again determine the warm-up machine served by each recursive DNS server based on the log, thereby ensuring that the warm-up relationship is timely and accurate.
[0105] like Figure 3 The diagram shown is a flowchart illustrating another DNS preheating method according to an exemplary embodiment of this specification. The method is applied to a decision-making end and may include:
[0106] In step 302, after the preheating machine in the preheating machine cluster sends a DNS request for a special domain name to the recursive DNS server, it obtains the logs of the authoritative DNS server; wherein, the special domain name is a subdomain of a preset top-level domain name, and the top-level domain name corresponds to the authoritative DNS server; the recursive DNS server is used to initiate a DNS request for the special domain name to the authoritative DNS server after successfully receiving the DNS request for the special domain name.
[0107] In step 304, based on whether the log records the DNS request of the recursive DNS server for the special domain name, a target recursive DNS server that can provide domain name preheating service for the preheating machine is determined, so that the preheating machine initiates a DNS request for the domain name to be preheated to the corresponding target recursive DNS server.
[0108] In some examples, the special domain name carries the identifier of the warm-up machine and the identifier of the recursive DNS server.
[0109] In some examples, the method further includes:
[0110] A special domain name corresponding to each of the recursive DNS servers is constructed for each of the preheating machines;
[0111] A special domain name constructed for each of the preheating machines will be sent to each of the preheating machines.
[0112] In some examples, there are multiple preheating machines and multiple recursive DNS servers; the method further includes:
[0113] Based on the identifiers of the preheating machines and recursive DNS servers carried in each special domain name recorded in the log, the preheating relationship is determined; wherein, the preheating relationship includes: the identifier of each recursive DNS server and the identifier of the preheating machine that the recursive DNS server can provide domain name preheating services.
[0114] The preheating relationship is sent to each preheating machine so that the preheating machine can determine the target recursive DNS server that can provide domain name preheating service from the preheating relationship based on its own identifier.
[0115] In some examples, the special domain name includes: a domain name that has not been accessed on the public network; or, in the special domain name, the identifier of the warm-up machine and the identifier of the recursive DNS server are prefixes of the top-level domain name.
[0116] This specification also provides a DNS preheating system, such as... Figure 2B As shown, the preheating system includes a preheating machine cluster, which includes preheating machines, and the preheating machines are used to perform the steps of any of the aforementioned DNS preheating method embodiments;
[0117] The preheating system also includes a decision-making terminal, which runs on any preheating machine in the preheating machine cluster, or on other machines in the preheating system besides the preheating machine cluster. The decision-making terminal is used to execute the steps of any of the aforementioned DNS preheating method embodiments.
[0118] Corresponding to the embodiments of the aforementioned DNS preheating method, this specification also provides embodiments of a DNS preheating device and the computer equipment on which it is applied.
[0119] The DNS warm-up device embodiments described in this specification can be applied to computer devices, such as servers or terminal devices. The device embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by its processor reading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 4 The diagram shown is a hardware structure diagram of the computer equipment where the DNS preheating device of this manual is located, except for... Figure 4 In addition to the processor 410, network interface 420, memory 430, and non-volatile memory 440 shown, the computer device in which the DNS warm-up device is located in the embodiment may also include other hardware depending on the actual function of the computer device, which will not be described in detail here.
[0120] like Figure 5 As shown, Figure 5 This is a block diagram illustrating a DNS preheating apparatus according to an exemplary embodiment of this specification, the apparatus comprising:
[0121] Initiation module 51 is used to: initiate a DNS request for a special domain name to at least one recursive DNS server; wherein the special domain name is a subdomain of a preset top-level domain name, and the top-level domain name corresponds to a preset authoritative DNS server; the at least one recursive DNS server is used to initiate a DNS request for the special domain name to the authoritative DNS server after successfully receiving the DNS request for the special domain name.
[0122] The determining module 52 is used to: determine a target recursive DNS server that can provide domain name preheating services for the preheating machine; wherein the target recursive DNS server is determined based on whether the authoritative DNS server's log records the recursive DNS server's DNS request for a specific domain name;
[0123] The preheating module 53 is used to: obtain the domain name to be preheated, and initiate a DNS request for the domain name to be preheated to the target recursive DNS server.
[0124] In some examples, the special domain name carries the identifier of the warm-up machine and the identifier of the recursive DNS server.
[0125] In some examples, the initiating module 51 is also used for:
[0126] After obtaining the identifier of each recursive DNS server sent by the decision-making end, constructing a special domain name corresponding to each of the recursive DNS servers, and then initiating a DNS request for the special domain name to each of the recursive DNS servers; or,
[0127] The decision-making end obtains the special domain name sent by the decision-making end and initiates a DNS request for the special domain name to each recursive DNS server; wherein, the decision-making end is used to construct a special domain name corresponding to each recursive DNS server for each of the preheating machines and send the special domain name constructed for each of the preheating machines to each of the preheating machines.
[0128] In some examples, there are multiple preheating machines and multiple recursive DNS servers; the determining module 52 is used for:
[0129] Obtain the preheating relationship determined by the decision-making end based on the log; wherein, the preheating relationship includes: the identifier of each recursive DNS server and the identifier of the preheating machine that the recursive DNS server can provide domain name preheating services;
[0130] Based on the identifier of this preheating machine, determine the target recursive DNS server that can provide domain name preheating services corresponding to this preheating machine from the preheating relationship.
[0131] In some examples, the identifier of the recursive DNS server includes an IP address;
[0132] The initiation module 51 is further configured to:
[0133] Based on the IP address of the target recursive DNS server, a DNS request for the domain name to be preheated is initiated to the target recursive DNS server.
[0134] In some examples, the special domain name includes: a domain name that has not been accessed on the public network; or, in the special domain name, the identifier of the warm-up machine and the identifier of the recursive DNS server are prefixes of the top-level domain name.
[0135] like Figure 6 As shown, Figure 6 This is a block diagram illustrating a DNS preheating apparatus according to an exemplary embodiment of this specification, the apparatus comprising:
[0136] The acquisition module 61 is used to: acquire the logs of the authoritative DNS server after the preheating machine in the preheating machine cluster sends a DNS request for a special domain name to the recursive DNS server; wherein, the special domain name is a subdomain of a preset top-level domain name, and the top-level domain name corresponds to the authoritative DNS server; the recursive DNS server is used to initiate a DNS request for the special domain name to the authoritative DNS server after successfully receiving the DNS request for the special domain name.
[0137] The determining module 62 is used to: determine a target recursive DNS server that can provide domain name preheating services for the preheating machine based on whether the log records the recursive DNS server's DNS request for a specific domain name, so that the preheating machine initiates a DNS request for the domain name to be preheated to the corresponding target recursive DNS server.
[0138] In some examples, the special domain name carries the identifier of the warm-up machine and the identifier of the recursive DNS server.
[0139] In some examples, the apparatus further includes a construction module for: constructing a special domain name corresponding to each of the preheating machines for each of the recursive DNS servers; and sending the special domain name constructed for each of the preheating machines to each of the preheating machines.
[0140] In some examples, there are multiple warm-up machines and multiple recursive DNS servers; the determining module 62 is used to: determine the warm-up relationship based on the identifier of the warm-up machine and the identifier of the recursive DNS server carried in each special domain name recorded in the log; wherein, the warm-up relationship includes: the identifier of each recursive DNS server and the identifier of the warm-up machine that the recursive DNS server can provide domain name warm-up services.
[0141] The preheating relationship is sent to each preheating machine so that the preheating machine can determine the target recursive DNS server that can provide domain name preheating service from the preheating relationship based on its own identifier.
[0142] In some examples, the special domain name includes: a domain name that has not been accessed on the public network; or, in the special domain name, the identifier of the warm-up machine and the identifier of the recursive DNS server are prefixes of the top-level domain name.
[0143] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0144] Accordingly, embodiments of this specification also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the aforementioned DNS warm-up method embodiments.
[0145] Accordingly, embodiments of this specification also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the DNS warm-up method embodiment.
[0146] Accordingly, embodiments of this specification also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the DNS warm-up method embodiments.
[0147] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0148] The above embodiments can be applied to one or more computer devices. The computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. The hardware of the computer device includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0149] The computer device can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc.
[0150] The computer equipment may also include network equipment and / or user equipment. The network equipment includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.
[0151] The network in which the computer device is located includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, and virtual private network (VPN).
[0152] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0153] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this application.
[0154] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.
[0155] The terms "specific example" or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with the embodiments or examples, which are included in at least one embodiment or example of this specification. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0156] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this specification are indicated by the following claims.
[0157] It should be understood that this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is limited only by the appended claims.
[0158] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
Claims
1. A DNS preheating method, the method being applied to a preheating machine, comprising: A DNS request for a specific domain name is initiated to at least one recursive DNS server; wherein the specific domain name is a subdomain of a preset top-level domain, and the top-level domain corresponds to a preset authoritative DNS server; the at least one recursive DNS server is used to initiate a DNS request for the specific domain name to the authoritative DNS server after successfully receiving the DNS request for the specific domain name. A target recursive DNS server capable of providing domain name preheating services for the preheating machine is determined; wherein, the target recursive DNS server is determined based on whether the authoritative DNS server's log records the recursive DNS server's DNS requests for specific domain names; Obtain the domain name to be preheated, and initiate a DNS request for the domain name to be preheated to the target recursive DNS server.
2. The method according to claim 1, wherein the special domain name carries the identifier of the preheating machine and the identifier of the recursive DNS server.
3. The method according to claim 2, wherein initiating a DNS request for a specific domain name to at least one recursive DNS server comprises: After obtaining the identifier of each recursive DNS server sent by the decision-making end, constructing a special domain name corresponding to each of the recursive DNS servers, and then initiating a DNS request for the special domain name to each of the recursive DNS servers respectively; or, The decision-making end obtains the special domain name sent by the decision-making end and initiates a DNS request for the special domain name to each recursive DNS server; wherein, the decision-making end is used to construct a special domain name corresponding to each recursive DNS server for each of the preheating machines and send the special domain name constructed for each of the preheating machines to each of the preheating machines.
4. The method according to claim 1, wherein there are multiple preheating machines and multiple recursive DNS servers; determining the target recursive DNS server capable of providing domain name preheating services for the preheating machines includes: Obtain the preheating relationship determined by the decision-making end based on the log; wherein, the preheating relationship includes: the identifier of each recursive DNS server and the identifier of the preheating machine that the recursive DNS server can provide domain name preheating services; Based on the identifier of this preheating machine, determine the target recursive DNS server that can provide domain name preheating services corresponding to this preheating machine from the preheating relationship.
5. The method according to claim 4, wherein the identifier of the recursive DNS server includes an IP address; The step of initiating a DNS request for the domain name to be preheated to the target recursive DNS server includes: Based on the IP address of the target recursive DNS server, a DNS request for the domain name to be preheated is initiated to the target recursive DNS server.
6. The method according to claim 1, wherein the special domain name comprises: Domains that have not been accessed on the public internet; Alternatively, in the special domain name, the identifier of the preheating machine and the identifier of the recursive DNS server are prefixes of the top-level domain name.
7. A DNS preheating method, the method being applied at the decision-making end, the method comprising: After a preheating machine in the preheating machine cluster sends a DNS request for a special domain name to a recursive DNS server, it obtains the logs of the authoritative DNS server; wherein, the special domain name is a subdomain of a preset top-level domain, and the top-level domain name corresponds to the authoritative DNS server; the recursive DNS server is used to initiate a DNS request for the special domain name to the authoritative DNS server after successfully receiving the DNS request for the special domain name. Based on whether the log records the DNS requests of the recursive DNS server for the specific domain name, a target recursive DNS server that can provide domain name preheating services for the preheating machine is determined, so that the preheating machine initiates a DNS request for the domain name to be preheated to the corresponding target recursive DNS server.
8. The method according to claim 7, wherein the special domain name carries the identifier of the preheating machine and the identifier of the recursive DNS server.
9. The method according to claim 7 or 8, further comprising: A special domain name corresponding to each of the recursive DNS servers is constructed for each of the preheating machines; A special domain name constructed for each of the preheating machines will be sent to each of the preheating machines.
10. The method according to claim 8, wherein there are multiple preheating machines and multiple recursive DNS servers; the method further comprises: Based on the identifiers of the preheating machines and recursive DNS servers carried in each special domain name recorded in the log, the preheating relationship is determined; wherein, the preheating relationship includes: the identifier of each recursive DNS server and the identifier of the preheating machine that the recursive DNS server can provide domain name preheating services. The preheating relationship is sent to each preheating machine so that the preheating machine can determine the target recursive DNS server that can provide domain name preheating service from the preheating relationship based on its own identifier.
11. The method according to claim 7, wherein the special domain name comprises: Domains that have not been accessed on the public internet; Alternatively, in the special domain name, the identifier of the preheating machine and the identifier of the recursive DNS server are prefixes of the top-level domain name.
12. A DNS preheating system, the preheating system comprising a preheating machine cluster, the preheating machine cluster comprising preheating machines, the preheating machines being configured to perform the steps of the method according to any one of claims 1 to 6; The preheating system further includes a decision-making terminal, which operates on any preheating machine in the preheating machine cluster, or on other machines in the preheating system besides the preheating machine cluster. The decision-making terminal is used to execute the steps of the method according to any one of claims 7 to 11.
13. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
14. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.
15. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.