Domain name query method and device, computer device and storage medium

By introducing a redirection information record during the DNS domain name query process, and dynamically selecting servers based on server load, the problem of authoritative server load imbalance is solved, thereby achieving load balancing and improved query efficiency.

CN116668403BActive Publication Date: 2026-03-17SHENZHEN WANGJI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-11
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In existing technologies, the DNS domain name query process suffers from unbalanced server load due to the imbalance of authoritative server load, which affects query efficiency and performance.

Method used

By negotiating and setting up guidance information records between the client and the server, the appropriate server is dynamically selected for domain name queries based on the server's load, including load level, sorting, and signature information records, to ensure load balancing.

Benefits of technology

It achieves balanced load distribution in the server cluster, improves the efficiency and performance of domain name queries, and avoids server overload and query delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116668403B_ABST
    Figure CN116668403B_ABST
Patent Text Reader

Abstract

The application relates to a domain name query method and device, computer equipment and a storage medium. The method is used for domain name query through a server in a server cluster, and comprises the following steps: obtaining a domain name query request sent by a client; determining whether the domain name query request has a guide information record item; in response to the domain name query request having the guide information record item, responding to the domain name query request to obtain a response result, wherein the response result comprises the guide information record item and a guide information record value corresponding to the guide information record item; and sending the response result to the client, so that the client obtains a final response result of the domain name query according to the response result. The method can improve the load balancing of the servers in the cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a domain name query method, apparatus, computer equipment, and storage medium. Background Technology

[0002] DNS (Domain Name System) is managed on a zone basis. Except for the root zone, the authoritative server of each zone can be accessed by the client in the recursive process after registering the authorization information in the parent zone.

[0003] Since each region may have multiple authoritative servers, after obtaining authorization information, the client first attempts to access the corresponding authoritative server based on the server address recorded in the record set. Then, it sorts the authoritative servers according to their response latency, ultimately determining the authoritative server with the fastest response. This selection process can lead to an imbalance in the load across multiple authoritative servers. Summary of the Invention

[0004] Therefore, it is necessary to provide a domain name query method, apparatus, computer equipment, and storage medium that can improve the load balancing of servers in a cluster, addressing the aforementioned technical problems.

[0005] On the one hand, a domain name lookup method is provided for performing domain name lookups through servers in a server cluster, which includes:

[0006] Obtain the domain name query request sent by the client;

[0007] Determine whether the domain name query request has a redirection information record item;

[0008] In response to the domain name query request having the guidance information record item, the domain name query request is responded to, and a response result is obtained. The response result includes the guidance information record item and the guidance information record value corresponding to the guidance information record item.

[0009] The response result is sent to the client, so that the client can obtain the final response result of the domain name query based on the response result.

[0010] In some embodiments, the step of responding to the domain name query request and obtaining a response result includes:

[0011] The target guidance information record value is determined based on the current server load.

[0012] The target guidance information record value is used to set the guidance information record value corresponding to the guidance information record item in order to generate the response result.

[0013] In some embodiments, the guidance information record item includes a load level record item, and the step of determining the target guidance information record value based on the current server load includes:

[0014] Determine whether the current server load is lower than the first preset load threshold;

[0015] In response to a load level falling below the first preset load threshold, the target load level of the current server is obtained;

[0016] The step of setting the guidance information record value corresponding to the guidance information record item through the target guidance information record value includes:

[0017] The record value corresponding to the load level record item is set by the target load level value.

[0018] In some embodiments, the guidance information record item further includes a sorting record item for sorting servers in the server cluster, a guidance path information record item, and a signature information record item. After the step of determining whether the load of the current server is lower than a first preset load threshold, the method further includes:

[0019] In response to a load not falling below the first preset load threshold, the target load level, routing path information, target signature information, and target sorting table are obtained.

[0020] The step of setting the guidance information record value corresponding to the guidance information record item through the target guidance information record value includes:

[0021] The record values ​​of the load level record items are set using the target load level, the record values ​​of the guidance path information record items are set using the target guidance path information, the record values ​​of the signature information record items are set using the target signature information, and the record values ​​of the sorting record items are set using the target sorting table.

[0022] In some embodiments, the guidance information record value includes initial signature information corresponding to the signature information record item, and after the step of determining whether the current server load is lower than a first preset load threshold, the method further includes:

[0023] In response to the load being not lower than the first preset load threshold, determine whether the load of the current server is not lower than the second preset load threshold, wherein the second preset load threshold is greater than the first preset load threshold;

[0024] In response to a load not falling below the second preset load threshold, the initial signature information is verified;

[0025] In response to the initial signature information being verified, domain name response data is obtained to generate the response result.

[0026] In some embodiments, the guidance information record value further includes a guidance path information record value corresponding to the guidance path information record item, and the step of obtaining domain name response data to generate the response result in response to the initial signature information being verified includes:

[0027] In response to the initial signature information being verified, it is determined whether the navigation path information record value matches the preset navigation path information record value;

[0028] In response to a match between the navigation path information record value and the preset navigation path information record value, the domain name response data is obtained to generate the response result.

[0029] In some embodiments, the step of obtaining the domain name response data to generate the response result in response to a match between the redirection path information record value and the preset redirection path information record value includes:

[0030] In response to the matching of the guidance path information record value with the preset guidance path information record value, it is determined whether the guidance path information record value is within the validity period;

[0031] In response to the fact that the navigation path information record value is within the validity period, the domain name response data is obtained to generate the response result.

[0032] On the other hand, a domain name query device is provided for performing domain name queries through servers in a server cluster, the device comprising:

[0033] The request acquisition module is used to acquire the domain name query request sent by the client;

[0034] The record item determination module is used to determine whether the domain name query request has a guiding information record item;

[0035] The response module is used to respond to the domain name query request having the guidance information record item, respond to the domain name query request, and obtain a response result, the response result including the guidance information record item and the guidance information record value corresponding to the guidance information record item;

[0036] The sending module is used to send the response result to the client, so that the client can obtain the final response result of the domain name query based on the response result.

[0037] In some embodiments, the response module includes:

[0038] The record value determination submodule is used to determine the target guidance information record value based on the current server load.

[0039] The response result generation submodule is used to set the guidance information record value corresponding to the guidance information record item through the target guidance information record value in order to generate the response result.

[0040] In some embodiments, the record value determination submodule is used for:

[0041] Determine whether the current server load is lower than the first preset load threshold;

[0042] In response to a load level falling below the first preset load threshold, the target load level of the current server is obtained;

[0043] The response result generation submodule is used for:

[0044] The record value corresponding to the load level record item is set by the target load level value.

[0045] In some embodiments, the guidance information record item further includes a sorting record item for sorting servers in the server cluster, a guidance path information record item, and a signature information record item, and the record value determination submodule is used for:

[0046] In response to a load not falling below the first preset load threshold, the target load level, routing path information, target signature information, and target sorting table are obtained.

[0047] The response result generation submodule is also used for:

[0048] The record values ​​of the load level record items are set using the target load level, the record values ​​of the guidance path information record items are set using the target guidance path information, the record values ​​of the signature information record items are set using the target signature information, and the record values ​​of the sorting record items are set using the target sorting table.

[0049] In some embodiments, the guidance information record value includes initial signature information corresponding to the signature information record item, and the domain name query device further includes:

[0050] A load determination module is used to determine whether the load of the current server is not lower than a second preset load threshold in response to the condition that the load is not lower than the first preset load threshold, wherein the second preset load threshold is greater than the first preset load threshold.

[0051] A signature verification module is used to verify the initial signature information in response to a load not lower than the second preset load threshold.

[0052] The response data acquisition module is used to acquire domain name response data to generate the response result in response to the initial signature information being verified.

[0053] In some embodiments, the guidance information recording value further includes a guidance path information recording value corresponding to the guidance path information recording item, and the response data acquisition module includes:

[0054] The matching determination submodule is used to determine whether the guiding path information record value matches the preset guiding path information record value in response to the initial signature information passing verification.

[0055] The response data acquisition submodule is used to acquire the domain name response data to generate the response result in response to the matching of the navigation path information record value with the preset navigation path information record value.

[0056] In some embodiments, the response data acquisition submodule is used for:

[0057] In response to the matching of the guidance path information record value with the preset guidance path information record value, it is determined whether the guidance path information record value is within the validity period;

[0058] In response to the fact that the navigation path information record value is within the validity period, the domain name response data is obtained to generate the response result.

[0059] In another aspect, 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 perform the following steps:

[0060] Obtain the domain name query request sent by the client;

[0061] Determine whether the domain name query request has a redirection information record item;

[0062] In response to the domain name query request having the guidance information record item, the domain name query request is responded to, and a response result is obtained. The response result includes the guidance information record item and the guidance information record value corresponding to the guidance information record item.

[0063] The response result is sent to the client, so that the client can obtain the final response result of the domain name query based on the response result.

[0064] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0065] Obtain the domain name query request sent by the client;

[0066] Determine whether the domain name query request has a redirection information record item;

[0067] In response to the domain name query request having the guidance information record item, the domain name query request is responded to, and a response result is obtained. The response result includes the guidance information record item and the guidance information record value corresponding to the guidance information record item.

[0068] The response result is sent to the client, so that the client can obtain the final response result of the domain name query based on the response result.

[0069] The aforementioned domain name query method, apparatus, computer equipment, and storage medium, by setting up guiding information record items between the client and the server to negotiate domain name queries, facilitate the selection of servers with suitable loads in the server cluster, thereby making the load of servers in the cluster more balanced. Attached Figure Description

[0070] Figure 1 This is an application environment diagram of the domain name query method provided in the embodiments of the present invention;

[0071] Figure 2 This is a flowchart illustrating the domain name query method provided in an embodiment of the present invention;

[0072] Figure 3 This is a structural block diagram of the domain name query device provided in an embodiment of the present invention;

[0073] Figure 4 An internal structural diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0075] The domain name lookup method provided in this application can be applied to, for example... Figure 1In the application environment shown, client 1 communicates with server 2 via a network. First, client 1 sends a domain name query request to server 2. Upon receiving the request, server 2 determines whether the request contains a redirection information record. If a redirection information record is present, server 2 responds to the domain name query request, obtaining a response result. This response result includes the redirection information record and its corresponding redirection information record value. Then, server 2 sends the response result back to client 1. Finally, client 2 obtains the final response result for the domain name query based on the response result. Client 1 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 2 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0076] In one embodiment, such as Figure 2 As shown, a domain name query method is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:

[0077] Step S101: Obtain the domain name query request sent by the client.

[0078] Domain name query requests can carry routing information records. These records are used to negotiate between the client and server, allowing the client to choose which node in the server cluster to guide, thus enabling dynamic load balancing. During this process, the server sends routing information aligned with load balancing to the client, and the client, wanting its query requests to be processed more smoothly, tends to follow the guidance from the origin server. Each routing information record has a corresponding value, which can be empty. In one embodiment, Extended DNS (EDNS) can be used to support the implementation of routing information records. Specifically, the routing information record is an .opt pseudo-resource record that can transmit the data required for negotiation between the server and client.

[0079] A guidance information record entry may include multiple fields, each defining a record entry. In some embodiments, the guidance information record entry includes a load level record entry, where the guidance information record value includes the load level. This load level record entry indicates the server's load level, which can be: low load, medium load, high load, abnormal load, or client load, etc. The load level is determined based on the server's load value information. In some embodiments, the load value information includes the server's processing capacity for domain name query requests, the average processing capacity consumed over a preset time period, the total amount of necessary resources, and / or the availability of necessary resources, etc. Specifically, a load value can be obtained by incorporating weights into the above load information, and then the load level can be determined based on the relationship between the load value and a load threshold. For example, when the load value is greater than a first preset load value, it is set to high load. When the load value is not greater than the first preset load value and not less than a second preset load value, it is set to medium load. When the load value is less than the second preset load value, it is set to low load. It should be noted that the second preset load value is less than the first preset load value. The above load levels will be synchronized to the DNS resolution process, facilitating the server to subsequently encapsulate the specific load level into the load level record entry.

[0080] In some embodiments, the guidance information record may further include a sorting record for sorting servers in the server cluster, a guidance path information record, and / or a signature information record. Correspondingly, the guidance information record value includes: a sorting table, guidance path information, and / or signature information.

[0081] The redirection path information record includes the source server, client, preferred server address, and valid expiration timestamp. The preferred server address is a designated server address assigned by the server to the new server to which the client is redirected. This means that subsequent domain name queries will preferentially be performed on this preferred server. This preferred server address is dynamically set for the client based on the load values ​​of each server, and is inversely proportional to the overall load value.

[0082] The signature information record is used to sign the aforementioned navigation path information to verify the reliability of the data source.

[0083] This sorting table can be a list of server addresses in a server cluster. The sorting of this address list can be configured based on the load of each server, for example, arranging the server addresses from lowest to highest load. That is, servers at the beginning of the list have lower loads, and servers at the end have higher loads. In some embodiments, the load information of each server in the server cluster is periodically used to sort the servers. An algorithm can be used to derive the sorting result based on the load value and synchronize it to the DNS resolution process. When a client cannot preferentially select a preferred server for a domain name query, it can select a server from this sorting table for the query.

[0084] Step S102: Determine whether the domain name query request has a redirection information record.

[0085] Determine whether the domain name query request has the aforementioned redirection information record. If the domain name query request has the redirection information record, proceed to step S103. If the domain name query request does not have the redirection information record, proceed to responding to the domain name query request based on the current server load. If the current server load is not greater than a preset load threshold, obtain domain name response data to respond. If the current server load is greater than the preset threshold, obtain domain name rejection response data (REFUSED) and send it to the terminal, facilitating subsequent domain name queries to other servers by the terminal.

[0086] Step S103: In response to the domain name query request having a navigation information record item, respond to the domain name query request and obtain a response result. The response result includes a navigation information record, which is encapsulated in the navigation information record item.

[0087] In some embodiments, the step of responding to a domain name query request and obtaining a response result includes:

[0088] The target guidance information record value is determined based on the current server load.

[0089] The target guidance information record value is used to set the guidance information record value corresponding to the guidance information record item in order to generate the response result.

[0090] The target orientation information record value is the negotiation data returned by the current server to the client. This value can be determined by comparing the current server load with a load threshold.

[0091] First, determine if the current server load is below a first preset load threshold. If it is below the first preset load threshold, obtain the target load level of the current server and set the record value corresponding to the load level record item using the target load level value. If it is not below the first preset load threshold, obtain the target load level, routing path information, target signature information, and target sorting table. Then, set the record value of the load level record item using the target load level, set the record value of the routing path information record item using the target routing path information, set the record value of the signature information record item using the target signature information, and set the record value of the sorting record item using the target sorting table.

[0092] Assuming the target load level of the current server is below a first preset load threshold, it can be considered a low load. If it is not lower than the first preset load threshold, it can be considered a medium or high load. When the target load level of the current server is low, simply encapsulate the low load in the load level record. It should be noted that when the client receives this load level record, after parsing it and obtaining "low load," it will ignore this load level record. When the target load level of the current server is medium or high, the load level record, routing path information record, signature information record, and sorting record are encapsulated.

[0093] Furthermore, the guidance information record value includes the initial signature information corresponding to the signature information record item. After determining whether the current server load is lower than the first preset load threshold, it also includes:

[0094] In response to a load not lower than a first preset load threshold, determine whether the load of the current server is not lower than a second preset load threshold, wherein the second preset load threshold is greater than the first preset load threshold.

[0095] In response to a load threshold not lower than the second preset threshold, the initial signature information is verified.

[0096] Upon successful verification of the initial signature information, the domain name response data is retrieved to generate the response result.

[0097] Furthermore, the guidance information record value also includes the guidance path information record value corresponding to the guidance path information record item. In response to the initial signature information passing verification, the step of obtaining domain name response data to generate a response result includes:

[0098] In response to the initial signature information being verified, it is determined whether the navigation path information record value matches the preset navigation path information record value.

[0099] In response to a match between the redirection path information record value and the preset redirection path information record value, domain name response data is obtained to generate a response result.

[0100] Furthermore, in response to a match between the redirection path information record value and a preset redirection path information record value, the step of obtaining domain name response data to generate a response result includes:

[0101] In response to a match between the recorded value of the guidance path information and the preset recorded value of the guidance path information, it is determined whether the recorded value of the guidance path information is within the validity period.

[0102] If the redirection path information record value is within its validity period, retrieve the domain name response data to generate a response result.

[0103] When the current server load is not lower than the first preset load threshold and lower than the second preset load threshold, the current server load can be considered medium load. At this time, the server can obtain domain name response data to respond to domain name query requests. When the current server load is not lower than the second preset load threshold, the current server load can be considered high load. At this time, due to the excessively high load, there is a risk of a large backlog of requests that cannot be processed in a timely manner. Therefore, the current server needs to determine whether to prioritize processing this domain name query request. Specifically, this can be determined by verifying the matching and validity of the initial signature information and the redirection path information record values.

[0104] Specifically, the validity of the signature information can be verified using the source server's public key. Servers in the cluster possess each other's public keys. Verification can be performed on client information and the destination server; if the client information matches a preset client and the destination server is the current server, the verification is considered successful.

[0105] In some embodiments, if either the initial signature information or the verification of the matching and validity of the routing path information record value fails, the current server will ignore the domain name query request and treat it as a general request.

[0106] Step S104: Send the response result to the client so that the client can obtain the final response result of the domain name query based on the response result.

[0107] Specifically, the client checks the validity period of the redirection information record value. If the validity period has expired, the client will clear the record value and use preset logic to select the target server for domain name lookup. If the validity period has not expired, the final response result will be obtained based on the redirection information record value.

[0108] In some implementations, when the client and server system times differ significantly, causing the client to believe the server is still valid even though it has expired, the server will still fill in "abnormal load level" in the load level record, without updating other fields. When the client receives the "abnormal load level" message, it will attempt to synchronize with the standard time and continue the domain name lookup.

[0109] In the above domain name query method, the domain name query is negotiated by setting a guidance information record item between the client and the server. This is beneficial for selecting a server with a suitable load in the server cluster, so that the load of the servers in the cluster is more balanced.

[0110] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0111] In one embodiment, such as Figure 3 As shown, a domain name query device 20 is provided for performing domain name queries through servers in a server cluster. The device 20 includes: a request acquisition module 201, a record item determination module 202, a response module 203, and a sending module 204. Wherein:

[0112] The request acquisition module 201 is used to acquire the domain name query request sent by the client; the record item determination module 202 is used to determine whether the domain name query request has a guiding information record item; the response module 203 is used to respond to the domain name query request in response to the presence of the guiding information record item, and to obtain a response result, wherein the response result includes the guiding information record item and the guiding information record value corresponding to the guiding information record item; the sending module 204 is used to send the response result to the client, so that the client can obtain the final response result of the domain name query based on the response result.

[0113] In some embodiments, the response module 203 includes: a record value determination submodule and a response result generation submodule. Wherein:

[0114] The record value determination submodule is used to determine the target guidance information record value based on the current server load; the response result generation submodule is used to set the guidance information record value corresponding to the guidance information record item through the target guidance information record value to generate the response result.

[0115] In some embodiments, the record value determination submodule is configured to: determine whether the current server load is lower than a first preset load threshold; and in response to the load being lower than the first preset load threshold, obtain the target load level of the current server;

[0116] The response result generation submodule is used to set the record value corresponding to the load level record item based on the target load level value.

[0117] In some embodiments, the guidance information record item further includes a sorting record item for sorting servers in the server cluster, a guidance path information record item, and a signature information record item. The record value determination submodule is used to: in response to a load level not lower than the first preset load threshold, obtain the target load level, guidance path information, target signature information, and target sorting table.

[0118] The response result generation submodule is further configured to: set the record value of the load level record item according to the target load level, set the record value of the guidance path information record item according to the target guidance path information, set the record value of the signature information record item according to the target signature information, and set the record value of the sorting record item according to the target sorting table.

[0119] In some embodiments, the guidance information record value includes initial signature information corresponding to the signature information record item, and the domain name query device 20 further includes: a load determination module, a signature verification module, and a response data acquisition module. Wherein:

[0120] The load determination module is used to determine whether the load of the current server is not lower than a second preset load threshold in response to the load being not lower than the first preset load threshold, wherein the second preset load threshold is greater than the first preset load threshold; the signature verification module is used to verify the initial signature information in response to the load being not lower than the second preset load threshold; and the response data acquisition module is used to acquire domain name response data to generate the response result in response to the initial signature information being verified.

[0121] In some embodiments, the guidance information recording value further includes a guidance path information recording value corresponding to the guidance path information recording item, and the response data acquisition module includes: a matching determination submodule and a response data acquisition submodule. Wherein:

[0122] The matching determination submodule is used to determine whether the redirection path information record value matches the preset redirection path information record value in response to the initial signature information passing verification; the response data acquisition submodule is used to acquire the domain name response data to generate the response result in response to the redirection path information record value matching the preset redirection path information record value.

[0123] In some embodiments, the response data acquisition submodule is configured to: determine whether the navigation path information record value is within the validity period in response to the navigation path information record value matching the preset navigation path information record value; and acquire the domain name response data to generate the response result in response to the navigation path information record value being within the validity period.

[0124] For specific limitations regarding the domain name lookup device, please refer to the limitations on the domain name lookup method above, which will not be repeated here. Each module in the aforementioned domain name lookup device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0125] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a domain name lookup method.

[0126] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0127] In one embodiment, 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 perform the following steps:

[0128] Obtain the domain name query request sent by the client;

[0129] Determine whether the domain name query request has a redirection information record item;

[0130] In response to the domain name query request having the guidance information record item, the domain name query request is responded to, and a response result is obtained. The response result includes the guidance information record item and the guidance information record value corresponding to the guidance information record item.

[0131] The response result is sent to the client, so that the client can obtain the final response result of the domain name query based on the response result.

[0132] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0133] The target guidance information record value is determined based on the current server load.

[0134] The target guidance information record value is used to set the guidance information record value corresponding to the guidance information record item in order to generate the response result.

[0135] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0136] Determine whether the current server load is lower than the first preset load threshold;

[0137] In response to a load level falling below the first preset load threshold, the target load level of the current server is obtained;

[0138] The record value corresponding to the load level record item is set by the target load level value.

[0139] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0140] In response to a load not falling below the first preset load threshold, the target load level, routing path information, target signature information, and target sorting table are obtained.

[0141] The record values ​​of the load level record items are set using the target load level, the record values ​​of the guidance path information record items are set using the target guidance path information, the record values ​​of the signature information record items are set using the target signature information, and the record values ​​of the sorting record items are set using the target sorting table.

[0142] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0143] In response to the load being not lower than the first preset load threshold, determine whether the load of the current server is not lower than the second preset load threshold, wherein the second preset load threshold is greater than the first preset load threshold;

[0144] In response to a load not falling below the second preset load threshold, the initial signature information is verified;

[0145] In response to the initial signature information being verified, domain name response data is obtained to generate the response result.

[0146] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0147] In response to the load being not lower than the first preset load threshold, determine whether the load of the current server is not lower than the second preset load threshold, wherein the second preset load threshold is greater than the first preset load threshold;

[0148] In response to a load not falling below the second preset load threshold, the initial signature information is verified;

[0149] In response to the initial signature information being verified, domain name response data is obtained to generate the response result.

[0150] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0151] In response to the initial signature information being verified, it is determined whether the navigation path information record value matches the preset navigation path information record value;

[0152] In response to a match between the navigation path information record value and the preset navigation path information record value, the domain name response data is obtained to generate the response result.

[0153] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0154] In response to the matching of the guidance path information record value with the preset guidance path information record value, it is determined whether the guidance path information record value is within the validity period;

[0155] In response to the fact that the navigation path information record value is within the validity period, the domain name response data is obtained to generate the response result.

[0156] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0157] Obtain the domain name query request sent by the client;

[0158] Determine whether the domain name query request has a redirection information record item;

[0159] In response to the domain name query request having the guidance information record item, the domain name query request is responded to, and a response result is obtained. The response result includes the guidance information record item and the guidance information record value corresponding to the guidance information record item.

[0160] The response result is sent to the client, so that the client can obtain the final response result of the domain name query based on the response result.

[0161] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0162] The target guidance information record value is determined based on the current server load.

[0163] The target guidance information record value is used to set the guidance information record value corresponding to the guidance information record item in order to generate the response result.

[0164] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0165] Determine whether the current server load is lower than the first preset load threshold;

[0166] In response to a load level falling below the first preset load threshold, the target load level of the current server is obtained;

[0167] The record value corresponding to the load level record item is set by the target load level value.

[0168] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0169] In response to a load not falling below the first preset load threshold, the target load level, routing path information, target signature information, and target sorting table are obtained.

[0170] The record values ​​of the load level record items are set using the target load level, the record values ​​of the guidance path information record items are set using the target guidance path information, the record values ​​of the signature information record items are set using the target signature information, and the record values ​​of the sorting record items are set using the target sorting table.

[0171] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0172] In response to the load being not lower than the first preset load threshold, determine whether the load of the current server is not lower than the second preset load threshold, wherein the second preset load threshold is greater than the first preset load threshold;

[0173] In response to a load not falling below the second preset load threshold, the initial signature information is verified;

[0174] In response to the initial signature information being verified, domain name response data is obtained to generate the response result.

[0175] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0176] In response to the initial signature information being verified, it is determined whether the navigation path information record value matches the preset navigation path information record value;

[0177] In response to a match between the navigation path information record value and the preset navigation path information record value, the domain name response data is obtained to generate the response result.

[0178] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0179] In response to the matching of the guidance path information record value with the preset guidance path information record value, it is determined whether the guidance path information record value is within the validity period;

[0180] In response to the fact that the navigation path information record value is within the validity period, the domain name response data is obtained to generate the response result.

[0181] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0182] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0183] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A domain name query method for domain name query by a server in a server cluster, characterized in that, The application comprises the following steps: The server side sends the client with the guide information in line with the balanced tendency, so as to guide the client to realize the dynamic adjustment of the server cluster to the load; Obtaining the domain name query request sent by the client, wherein when the client follows the guide of the server, the domain name query request carries the guide information record item, which is used to deliver the data required for the domain name query between the server and the client, and the guide information record item comprises multiple fields, each field defines a record item, the record item comprises a load level record item, a sorting record item for sorting the servers in the server cluster, a guide path information record item and a signature information record item; Determining whether the domain name query request has the guide information record item; In response to the domain name query request having the guide information record item, the domain name query request is responded to obtain a response result, the response result comprises the guide information record item and the guide information record value corresponding to the guide information record item, wherein the record value of the load level record item is set by the target load level, the record value of the guide path information record item is set by the target guide path information, the record value of the signature information record item is set by the target signature information, and the record value of the sorting record item is set by the target sorting table; The response result is sent to the client, so that the client obtains the final response result of the domain name query according to the response result; In response to the domain name query request not having the guide information record item, the domain name query request is responded according to the load condition of the current server.

2. The domain name query method of claim 1, wherein, The step of responding to the domain name query request to obtain a response result comprises the following steps: Determining the target guide information record value according to the load condition of the current server; Setting the guide information record value corresponding to the guide information record item by the target guide information record value to generate the response result.

3. The domain name query method of claim 2, wherein, The step of determining the target guide information record value according to the load condition of the current server comprises the following steps: Determining whether the load of the current server is lower than a first preset load threshold; In response to being lower than the first preset load threshold, obtaining the target load level of the current server; The step of setting the guide information record value corresponding to the guide information record item by the target guide information record value comprises the following steps: Setting the record value corresponding to the load level record item by the target load level value.

4. The domain name query method of claim 3, wherein, After the step of determining whether the load of the current server is lower than the first preset load threshold, the method further comprises the following steps: In response to not being lower than the first preset load threshold, obtaining the target load level, the guide path information, the target signature information and the target sorting table; The step of setting the guide information record value corresponding to the guide information record item by the target guide information record value comprises the following steps: The record value of the load level record item is set by the target load level, the record value of the guide path information record item is set by the target guide path information, the record value of the signature information record item is set by the target signature information, and the record value of the sorting record item is set by the target sorting table.

5. The domain name query method of claim 3, wherein, The guide information record value includes initial signature information corresponding to the signature information record item, and after the step of determining whether the load of the current server is lower than a first preset load threshold, the method further comprises: In response to not being lower than the first preset load threshold, determining whether the load of the current server is not lower than a second preset load threshold, wherein the second preset load threshold is greater than the first preset load threshold; In response to not being lower than the second preset load threshold, verifying the initial signature information; In response to the initial signature information passing the verification, obtaining domain name response data to generate the response result.

6. The domain name query method of claim 5, wherein, The guide information record value further includes guide path information record value corresponding to the guide path information record item, and the step of obtaining domain name response data to generate the response result in response to the initial signature information passing the verification comprises: In response to the initial signature information passing the verification, determining whether the guide path information record value matches preset guide path information record value; In response to the guide path information record value matching the preset guide path information record value, obtaining the domain name response data to generate the response result.

7. The domain name query method of claim 6, wherein, The step of obtaining the domain name response data to generate the response result in response to the guide path information record value matching the preset guide path information record value comprises: In response to the guide path information record value matching the preset guide path information record value, determining whether the guide path information record value is within a valid period; In response to the guide path information record value being within the valid period, obtaining the domain name response data to generate the response result.

8. A domain name query device for performing domain name queries through servers in a server cluster, characterized in that, The device comprises: A delivery module configured to deliver guide information conforming to a balanced tendency from a server end to a client end, so as to guide the client end to realize dynamic adjustment of load by a server cluster; A request obtaining module configured to obtain a domain name query request sent by the client end, wherein when the client end follows the guidance of the server, the domain name query request carries a guide information record item, the guide information record item is used to deliver data required for domain name query by negotiation between the server and the client end, the guide information record item includes multiple fields, each field defines a record item, and the record item includes a load level record item, a sorting record item for sorting servers in the server cluster, a guide path information record item, and a signature information record item; A record item determining module configured to determine whether the domain name query request has the guide information record item; The response module is configured to respond to the domain name query request to obtain a response result, in response to the domain name query request having the guide information record item, the response result comprising the guide information record item and a guide information record value corresponding to the guide information record item, wherein a record value of the load level record item is set by a target load level, a record value of the guide path information record item is set by target guide path information, a record value of the signature information record item is set by target signature information, and a record value of the sorting record item is set by a target sorting table; The sending module is configured to send the response result to the client, so that the client obtains a final response result of the domain name query according to the response result; The response module is configured to respond to the domain name query request to obtain a response result, in response to the domain name query request having the guide information record item, the response result comprising the guide information record item and a guide information record value corresponding to the guide information record item, wherein a record value of the load level record item is set by a target load level, a record value of the guide path information record item is set by target guide path information, a record value of the signature information record item is set by target signature information, and a record value of the sorting record item is set by a target sorting table; 9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for querying DNS record

    CN108011994A