Summary of the invention
The application's technical problem to be solved is to provide a kind of optimum application server choosing method of domain name system DNS, to guarantee dns resolution service reliability and to shorten consuming timely, simultaneously can meet some specific network application demands, and improve fail safe.
Accordingly, the application also provides a kind of optimum application server selecting device of domain name system DNS, to guarantee said method application and realization in practice.
In order to address the above problem, the application discloses a kind of optimum application server choosing method of domain name system DNS, comprising:
Client by completing port to a plurality of dns servers of appointment in preset dns server list simultaneously asynchronism and concurrencies send DNS inquiry request, described DNS inquiry request comprises domain name;
When there being dns server to return to IP address corresponding to domain name according to described DNS inquiry request to client, client is according to described IP address generation candidate IP address list;
Client is according to described candidate IP address list, and the application server corresponding to each IP address sends connection request simultaneously;
Responsive state information according to each application server to described connection request, determines optimum application server.
Preferably, described method, also comprises:
The IP address of current domain name and corresponding optimal service device is write in the buffer memory of client, and record the life cycle TTL information of domain name and corresponding IP address record.
Preferably, before in client, by completing port, to a plurality of dns servers of appointment in preset dns server list, asynchronism and concurrencies send the step of DNS inquiry request simultaneously, also comprise:
The record that whether has the corresponding IP address of the current domain name for the treatment of requesting query in its buffer memory of client query, if having, judges that whether the life cycle TTL information of domain name and corresponding IP address record is expired, if not, and direct extraction described IP address.
Preferably, describedly according to each application server, the responsive state information of described connection request is determined to the step of optimum application server comprises:
If in Preset Time, there is the application server very first time to respond described connection request, interrupt and being connected of other application server, current application server is defined as to optimum application server.
Preferably, describedly according to each application server, the responsive state information of described connection request is determined to the step of optimum application server comprises:
If exceed after Preset Time, there is connection request described in many application server responses, the connect hours of each application server is sorted, the shortest application server of connect hours is defined as to optimum application server.
Preferably, describedly according to each application server, the responsive state information of described connection request is determined to the step of optimum application server comprises:
The DNS inquiry request sending when client during for DNS inquiry request based on http protocol, is obtained the speed of download of the application server of the described connection request of response, and the fastest application server of speed of download is defined as to optimum application server.
Preferably, described client comprises according to IP address generation candidate IP address list:
Obtain the affiliated network segment in described IP address;
From each network segment, extract an IP address and write candidate's IP address list.
The embodiment of the present application also discloses a kind of optimum application server selecting device of domain name system DNS, comprising:
Domain name request module: for by client by completing port to a plurality of dns servers of preset dns server list appointment simultaneously asynchronism and concurrencies send DNS inquiry request, described DNS inquiry request comprises domain name;
Candidate's IP address list generation module: for there being dns server to return to IP address corresponding to domain name according to described DNS inquiry request to client, by client according to described IP address generation candidate IP address list;
IP address connection request module: for by client according to described candidate IP address list, the application server corresponding to each IP address sends connection request simultaneously;
Optimum application server determination module: for the responsive state information to described connection request according to each application server, determine optimum application server.
Preferably, described device, also comprises:
Domain-name information logging modle: for the IP address of current domain name and corresponding optimal service device is write to the buffer memory of client, and record the life cycle TTL information of domain name and corresponding IP address record.
Preferably, described device, also comprises:
Client-cache enquiry module: the record that whether has the corresponding IP address of the current domain name for the treatment of requesting query for its buffer memory of client query, if have, whether the life cycle TTL information that judges domain name and corresponding IP address record is expired, if not, directly extracts described IP address.
Preferably, described optimum application server determination module further comprises:
The very first time, optimum application server was determined submodule: in Preset Time, while having the application server very first time to respond described connection request, interruption is connected with other application server, and current application server is defined as to optimum application server.
Preferably, described optimum application server determination module further comprises:
Connect hours, optimum application server was determined submodule: for after exceeding Preset Time, while having described in many application server responses connection request, connect hours to each application server sorts, and the shortest application server of connect hours is defined as to optimum application server.
Preferably, described optimum application server determination module further comprises:
The optimum application server of speed of download is determined submodule: while being the DNS inquiry request based on http protocol for the DNS inquiry request sending in client, the speed of download of obtaining the application server of the described connection request of response, is defined as optimum application server by the fastest application server of speed of download.
Preferably, described candidate's IP address list generation module comprises:
The network segment obtains submodule: obtain the affiliated network segment in described IP address;
IP address extraction submodule: write candidate's IP address list for extracting an IP address from each network segment.
Compared with prior art, the application comprises following advantage:
The application still adopts udp protocol as the transport layer protocol of DNS Protocol, but send a plurality of DNS inquiry request to a plurality of dns servers in asynchronism and concurrency mode, owing to adopting the mode of asynchronism and concurrency to realize, when having dns server response to return to IP address corresponding to domain name in request, client is resolved immediately, is not subject to the increase of dns server number and affects whole parsing the response time.Because request and the response time of each dns server are different, thereby can obtain the fastest DNS response.Thereby many DNS concurrent request, the defect that analysis service is unreliable and the time consuming time is longer are not supported in the Windows system dns resolution service in prior art that solved.
The application has realized dns server collocation strategy, and is not subject to the increase of dns server number and affects whole resolution speed.Meet diverse network application demand.Thereby having solved Windows system dns resolution service in prior art is towards system-wide, does not possess the configurable dns server of application-specific, can not meet the defect of some network application demand.
The application resolves the IP address that dns server returns, and the connection of corresponding foundation and corresponding application server, returns to caller according to connect hours minimum as optimum application server IP address, has realized the optimisation strategy testing the speed based on connection.For the DNS inquiry request of http protocol, the application also supports the speed of download of downloading this domain name root URL according to the fastest HTTP GET to return to caller as optimum application server IP address, has realized based on HTTP GET and has downloaded the optimisation strategy testing the speed.Solved Windows system dns resolution in prior art and served the defect that any acceleration optimisation strategy is not provided: the object that has reached network acceleration.Can self adaptation find IP address corresponding to the shortest path optimum application server the fastest with response.Education network be can apply to and application, the access of the mobile operator of telecommunications Netcom network resource optimization accelerated.For user, provide network service faster.
The application has realized dns resolution service voluntarily, and preserves the dns resolution result through optimizing with cipher mode.Compare Windows system dns resolution service and have higher fail safe.The application has solved Windows system dns resolution service and has had leak, the defect of being easily held as a hostage and distorting.
Embodiment
For the application's above-mentioned purpose, feature and advantage can be become apparent more, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
For making those skilled in the art understand better the application, below the correlation technique of domain name system (DNS) is described.
Domain name system (DNS) is a kind of distributed data base for TCP/IP application program, and it provides the transitional information between host name and IP address.Conventionally, the network user communicates by udp protocol (User Datagram Protocol, User Datagram Protocol) and dns server, and server is monitored at specific 53 ports, and returns to the required relevant information of user.
DNS is divided into Client(client) and Server(server), Client plays the part of the role of question, namely asks Server a Domain Name(domain name) real IP address, Server will answer the real IP address of this Domain Name.Conventionally, local DNS first can look into the data bank of oneself, if the data bank of oneself does not have the real IP address of this Domain Name, can be toward the upper set dns server inquiry of this DNS, after obtaining according to this real IP address of this Domain Name, the real IP address that this Domain Name is corresponding stores away, and answers client.
Dns server can be according to different empowered zones (Zone), each name data under record under this net territory, this name data comprises: inferior domain name and Hostname under net territory, in claiming server, each dns name has a cache buffer area (Cache), the main purpose of this cache buffer area is that title and relative IP address that this name server is checked out are recorded in cache buffer area, when also have another one client when going to inquire about identical title on this server next time, server just not be used on an other main frame and goes to find, and can directly from cache buffer area, find corresponding title record material, be returned to client, thereby accelerate the speed of client to name query.
For example, when DNS client is inquired about a certain Hostname on Internet to the dns server of appointment, dns server can be looked for the specified title of user in this data bank, if do not had, this server can be inquired about and have or not this pseudonym to claim record in the cache buffer area of oneself, if find corresponding title record, from dns server, directly corresponded to IP address is returned to client, if name server can not find out at data logging, and in cache buffer area, there is no corresponding title record yet, server just can be inquired about desired title to other name server.
Or as, DNS client is inquired about certain Hostname on Internet to the dns server of appointment, when dns server is when this data logging can not find the specified title of user, can turn to the cache buffer area of this server to look for whether there is this data, when cache buffer area also can not find, can go to require help to look for the IP address of this title to immediate name server, on another station server, also use identical action executing query manipulation, after inquiring, can reply the source server that originally requires inquiry, this source dns server is after receiving the result of another dns server inquiry, first inquired Hostname and corresponding IP address are recorded in cache buffer area, finally inquired result is being replied to client.
The application's main thought is, realized the mechanism that Windows WinSock API realizes DNS Protocol of never calling, by the domain name while asynchronism and concurrency that needs are resolved, send to a plurality of dns servers, once having dns server response returns, client is resolved IP address, if IP address is more than 1, according to different segment, screen and deposit in candidate IP address list, client traversal candidate IP address list, the asynchronous transmission server request that connects, and according to each application server the responsive state information to described connection request, determine optimum application server.
With reference to Fig. 1, show the flow chart of steps of optimum application server choosing method embodiment 1 of a kind of domain name system DNS of the application, specifically can comprise the following steps:
Step 101: client sends DNS inquiry request to a plurality of dns servers simultaneously;
In practice, described DNS inquiry request comprises domain name, can be by client according to the dns server list that set in advance, to a plurality of dns server asynchronism and concurrencies of appointment in list, send.In concrete application, can realize by I/O Completion port mechanism (completing port) transmit mechanism of asynchronism and concurrency.
Step 102: when there being dns server to return to IP address corresponding to domain name according to described DNS inquiry request to client, client is according to described IP address generation candidate IP address list;
If the DNS inquiry request that has dns server to initiate according to client is returned to IP address corresponding to domain name, client, by the IP address receiving, is inserted candidate's IP address list one by one, then can be according to whether carrying out re-scheduling processing at the same network segment.
Particularly, in a preferred embodiment of the present application, described client can be by following sub-step according to IP address generation candidate IP address list:
Sub-step S01: obtain the affiliated network segment in described IP address;
Sub-step S02: extract an IP address from each network segment and write candidate's IP address list.
In specific implementation, the IP address of the same network segment can only retain first IP address as the optimum IP of candidate, and inserts in candidate's IP address list.
For example: the IP address set returning is:
202.101.22.35
202.101.22.36
202.102.21.23
202.102.21.25
Wherein, 202.101.22.35 and 202.101.22.36 belong to the IP address of the same network segment, and 202.102.21.23 and 202.102.21.25 belong to the IP address of the same network segment.
Extract first IP address in each network segment, 202.101.22.35 and 202.102.21.23, write these two IP addresses in candidate's IP address list, as shown in the table:
In practice, the address of the corresponding application server in described IP address.In practice, if dns server does not return to IP address corresponding to domain name to client according to described DNS inquiry request in Preset Time, to client, return to miscue information.
The application still adopts udp protocol as the transport layer protocol of DNS Protocol, but send a plurality of DNS inquiry request to a plurality of dns servers in asynchronism and concurrency mode, owing to adopting the mode of asynchronism and concurrency to realize, when having dns server response to return to IP address corresponding to domain name in request, client is resolved immediately, is not subject to the increase of dns server number and affects whole parsing the response time.Because request and the response time of each dns server are different, thereby can obtain the fastest DNS response.Thereby many DNS concurrent request, the defect that analysis service is unreliable and the time consuming time is longer are not supported in the Windows system dns resolution service in prior art that solved; Moreover the application has realized dns server collocation strategy, and be not subject to the increase of dns server number and affect whole resolution speed.Meet diverse network application demand.Thereby having solved Windows system dns resolution service in prior art is towards system-wide, does not possess the configurable dns server of application-specific, can not meet the defect of some network application demand.
Step 103: client is according to described candidate IP address list, and the application server corresponding to each IP address sends connection request simultaneously;
Client travels through all candidate IP address in candidate's IP address list, and the asynchronous application server corresponding to each IP address initiated connection request.
Step 104: the responsive state information according to each application server to described connection request, determine optimum application server.
As the example of the concrete application of the embodiment of the present application, can select minimum application server of connect hours as optimum application server, also can select the fastest application server of speed of download as optimum application server.
Particularly, in a preferred embodiment of the present application, described step 103 can comprise:
Sub-step S11: if in Preset Time, have the application server very first time to respond described connection request, interrupt and being connected of other application server, current application server is defined as to optimum application server.
For example: suppose that the time that default reception application server connects is 100ms, client is sent after connection request to each application server corresponding to candidate IP address in candidate's IP address list, first has made response application server A corresponding to candidate IP address, and it receives the 20ms of being consuming time that asks and respond.After receiving the response of this application server A, client is cancelled current all-network connection event at once, does not wait for the response of other application server, and application server A is returned to client as optimum application server.
In another preferred embodiment of the present application, described step 103 can also comprise:
Sub-step S12: if exceed after Preset Time, have connection request described in many application server responses, the connect hours of each application server is sorted, the shortest application server of connect hours is defined as to optimum application server.
For example: suppose that the time that default reception application server connects is 100ms, client is sent after connection request to each application server corresponding to candidate IP address in candidate's IP address list, waited for and after 100ms, do not received the response that any one application server is made, but when 110ms, there is an application server B to make response, when 120ms, there is an application server C to make response, when 150ms, there is an application server D to make response, when 180ms, have an application server E to make response; In this case, by sorting according to described connection is consuming time, the application server that the connect hours is the shortest returns to client as optimum application server.
The present embodiment is by selecting minimum application server of connect hours as optimum application server, when client is submitted same DNS inquiry request again to, directly adopt the IP address of this optimum application server to carry out network connection, and search corresponding application server without resubmiting to resolve to dns server, thereby realized the acceleration optimization of dns resolution service, reached the object of network acceleration.
In another preferred embodiment of the present application, described step 103 specifically can comprise:
Sub-step S21: the DNS inquiry request sending when client is during for DNS inquiry request based on http agreement, obtain the speed of download of the application server of the described connection request of response, the fastest application server of speed of download is defined as to optimum applicationization server.
In concrete application, the DNS inquiry request sending when client is during for DNS inquiry request based on http protocol, initiate immediately HTTP Get order and obtain the root URL of this domain name, and sort according to the speed of download of application server corresponding to each candidate IP address, select the fastest server address of speed of download to return to client as optimum application server.
In another preferred embodiment of the present application, described step 104: client also comprises before sending DNS inquiry request to a plurality of dns servers simultaneously:
When receive after same DNS inquiry request time, directly by described optimum application server, to client, returned to the corresponding IP address of asked domain name, described IP address is the address of this optimum application server;
Read the buffer memory of optimum application server, obtain current asked domain name;
Whether the life cycle TTL information that judges domain name and corresponding IP address record is expired, if not, the IP address of this optimal service device returned to client;
If the life cycle TTL information of judgement domain name and corresponding IP address record is expired, 101 steps in redirect above-described embodiment, redefine optimum application server.
The present embodiment is by selecting the fastest application server of speed of download as optimum application server, when client is submitted same DNS inquiry request again to, directly adopt the IP address of this optimum application server to carry out network connection, and search corresponding application server without resubmiting to resolve to dns server, thereby realized the acceleration optimization of dns resolution service, reached the object of network acceleration.
With reference to Fig. 2, show the flow chart of steps of optimum application server choosing method embodiment 2 of a kind of domain name system DNS of the application, specifically can comprise the following steps:
Step 201: whether have the record of the corresponding IP address of the current domain name for the treatment of requesting query in its buffer memory of each client query, if having, perform step 202; Otherwise, execution step 204;
Step 202: whether the life cycle TTL information that judges domain name and corresponding IP address record is expired, if not, performs step 203; If so, perform step 204;
In practice, if the life cycle TTL information of domain name and corresponding IP address record is expired, it can be deleted in client-cache.Step 203: directly extract described IP address;
Step 204: client sends DNS inquiry request to a plurality of dns servers simultaneously;
Step 205: when there being dns server to return to IP address corresponding to domain name according to described DNS inquiry request to client, client is according to described IP address generation candidate IP address list;
Step 206: client is according to described candidate IP address list, and the application server corresponding to each IP address sends connection request simultaneously;
Step 207: the responsive state information according to each application server to described connection request, determine optimum application server.
Step 208: the IP address of current domain name and corresponding optimal service device is write in the buffer memory of client, and record the life cycle TTL information of domain name and corresponding IP address record.
In specific implementation, the buffer memory of described client can be internal memory map, has recorded the data of domain name and corresponding IP address in host file.Can be with DLL(code database) form provides module initialization, anti-initialization, DNS to optimize IP query interface.
One, module initialization interface: specify DNS cache file path and block configuration file path.
int?Init(TCHAR*szDnsCachePath,TCHAR*szConfigPath);
1, create and load dns resolution buffer memory initialization thread; Its effect is set up one associated " database " by some conventional network address domain names IP address corresponding with it exactly.Because when user inputs the network address of a needs login in browser, system can be found corresponding IP address first automatically from host file, once find, system can be opened corresponding webpage immediately, if do not found, system can submit network address to DNS name resolution server to carry out the parsing of IP address again.
A, loading host file (host is a system file that there is no extension name) are to internal memory map;
B, the keeping records of loading DNS cache file are to internal memory map;
2, create the pipeline between client and application server, wait for that client connects.
The effect of above-mentioned steps is exactly that one associated " database " set up in some conventional network address domain names IP address corresponding with it.Because when user inputs the network address of a needs login in browser, system can be found corresponding IP address first automatically from host file, once find, system can be opened corresponding webpage immediately, if do not found, system can submit network address to DNS name resolution server to carry out the parsing of IP address again.
Two, the anti-initialization interface of module: Unload module.
int?UnInit();
1, preserve the dns server of preserving in internal memory map and optimize IP address date in DNS cache file.Internal memory map is in client; When domain name need to being resolved, first read buffer memory at every turn; If there is the dns resolution record of this domain name in buffer memory, return to its IP address;
2, update notifications thread quits work;
3, notice pipe service device quits work.
Three, obtain and optimize IP (test the speed or download the preferred IP address of testing the speed and obtaining by connection)
1, first from internal memory map, search domain name and whether hit, if hit, and life cycle not out of date (TTL), directly return.Otherwise continue next step;
2, check that nodename(obtains the title of specific node type) whether be IP address format.If so, directly return; If not, continue next step;
3, check whether nodename is special DNS host name of localhost(, the IP address of the computer of quoting this title is distributed in representative) or local host name.If directly return to 127.0.0.1; If not, continue next step;
4, travel through dns server, construct in order to or obtain the DNS A order DNS inquiry packet data buffer zone of IPV4 address, dns server sequence number is cumulative;
5, call ParseDns (), in asynchronism and concurrency mode, send DNS inquiry packet to a plurality of dns servers;
6, resolve dns server and return to IP address list;
7, call WSAConnect (), connect with application server;
8, after connecting successfully, close immediately, record connects consuming time;
9, according to minimum consuming time, return to application server IP address;
If 10 domain name mapping request promoters are http protocols, after connecting, initiate immediately the root URL that this domain name is obtained in HTTP GET order.According to the F.F. line ordering of speed of download, select the optimum application server IP of the fastest conduct of speed of download address to return to caller.
For making those skilled in the art understand better the application, below by the advantage of a DNS network acceleration sequential chart explanation the embodiment of the present application.
Cip Candidate IP (candidate IP)
Oip Optimized IP (optimum IP)
tp?Type(0-parse?failed|1-Parse?ok,only?single?ip|2-parse?ok,acceptable?connect?time|3-parse?ok,sorted|4-parse?OK,sorted?httpget|5-parse?OK,parameter?is?ip?format)
ip?IP?address(optimized)
Ds DNS Server Ip address (dns server IP address)
Life cycle time of the IP address that ttl DNS parsed IP ttl(DNS resolves)
De DNS Elapsed (ms) (dns resolution service is consuming time)
St DNS UDP SendTo timestamp (ms) (dns resolution Request System timestamp)
Cb Connect begin timestamp (ms) (the IP address applications server system timestamp that connects dns resolution)
Rf DNS UDP RecfFrom timestamp (ms) (dns resolution answering system timestamp)
Ae DNS+Connect elapsed (ms) (dns resolution and connection application server are always consuming time)
It is consuming time that ct Connect elapsed (ms)-1means not connected(connects application server)
St Is connected (whether connecting)
H host(domain name)
Minus sign line be DNS UDP be initiated to end time line
The number of equaling is to connect dns server to resolve the address of IP--------->de00016 (ms) ds220.181.126.8 that is initiated to end time line
========================>ct00047ip=222.222.198.93->de00000(ms)ds192.168.0.222
================================>ct00063ip=119.147.105.185->de00000(ms)ds115.182.38.43
================================>ct00063ip=221.192.150.94->de00000(ms)ds115.182.38.43
================================>ct00063ip=60.217.241.31->de00000(ms)ds115.182.38.43
========================================>ct00078ip=221.206.124.245->de00000(ms)ds115.182.38.43
========================================>ct00078ip=122.136.65.130
--------------------------------------------------------------->de00125(ms)ds111.13.49.13
=================>ct00032ip=221.192.146.60
sorted?by?connect?elapsed?time!
No.01cip=221.192.146.60ds=111.13.49.13ttl=000062(s)st=233643093(ms)rf=233643218(ms)de=00125(ms)ae=00157(ms)cb=233643218(ms)ct=00032(ms)st=1
No.02cip=222.222.198.93ds=220.181.126.8ttl=000061(s)st=233643093(ms)rf=233643109(ms)de=00016(ms)ae=00063(ms)cb=233643109(ms)ct=00047(ms)st=1
No.03cip=60.217.241.31ds=115.182.38.43ttl=000061(s)st=233643093(ms)rf=233643093(ms)de=00000(ms)ae=00063(ms)cb=233643093(ms)ct=00063(ms)st=1
No.04cip=221.192.150.94ds=115.182.38.43ttl=000061(s)st=233643093(ms)rf=233643093(ms)de=00000(ms)ae=00063(ms)cb=233643093(ms)ct=00063(ms)st=1
No.05cip=119.147.105.185ds=192.168.0.222ttl=000119(s)st=233643093(ms)rf=233643093(ms)de=00000(ms)ae=00063(ms)cb=233643093(ms)ct=00063(ms)st=1
No.06cip=122.136.65.130ds=115.182.38.43ttl=000061(s)st=233643093(ms)rf=233643093(ms)de=00000(ms)ae=00078(ms)cb=233643093(ms)ct=00078(ms)st=1
No.07cip=221.206.124.245ds=115.182.38.43ttl=000061(s)st=233643093(ms)rf=233643093(ms)de=00000(ms)ae=00078(ms)cb=233643093(ms)ct=00078(ms)st=1
oip=221.192.146.60ds=111.13.49.13ttl=000062(s)st=233643093(ms)rf=233643218(ms)de=00125(ms)ae=00157(ms)cb=233643218(ms)ct=00032(ms)st=1
fast?ip?IS?NOT?choiced?by?local?primary?DNS,DNS?accelerator?raito=1.969m_Status?Code=0m_dw?Elapsed=00532m_Parse?Type=3
Find out from the graph, dns server 220.181.126.8 response time 16ms, connecting the application server 222.222.198.93 connection of resolving consuming time is 47 milliseconds.
Dns server 192.168.0.222 response time 0ms, connecting the application server 119.147.105.185 connection of resolving consuming time is 63 milliseconds.
Dns server 111.13.49.13 response time 125ms, connecting the application server 221.192.146.60 connection of resolving consuming time is 32 milliseconds.
According to connection speed sequence, select the preferred IP of conduct of connect hours minimum consuming time.
It should be noted that, for embodiment of the method, for simple description, therefore it is all expressed as to a series of combination of actions, but those skilled in the art should know, the application is not subject to the restriction of described sequence of movement, because according to the application, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and related action might not be that the application is necessary.
With reference to figure 3, show the structure chart of the optimum application server selecting device embodiment of a kind of domain name system DNS of the application, can comprise:
Domain name request module 301: for send DNS inquiry request by client to a plurality of dns servers simultaneously, described DNS inquiry request comprises domain name;
Candidate's IP address list generation module 302: for there being dns server to return to IP address corresponding to domain name according to described DNS inquiry request to client, by client according to described IP address generation candidate IP address list;
IP address connection request module 303: for by client according to described candidate IP address list, the application server corresponding to each IP address sends connection request simultaneously;
Optimum application server determination module 304: for the responsive state information to described connection request according to each application server, determine optimum application server.
In the application's a preferred embodiment, described device can also comprise:
Domain-name information logging modle: for the IP address of current domain name and corresponding optimal service device is write to the buffer memory of client, and record the life cycle TTL information of domain name and corresponding IP address record.
A kind of example as the concrete application of the embodiment of the present application, can also comprise:
Client-cache enquiry module: the record that whether has the corresponding IP address of the current domain name for the treatment of requesting query for its buffer memory of client query, if have, whether the life cycle TTL information that judges domain name and corresponding IP address record is expired, if not, directly extracts described IP address.
In the application's a preferred embodiment, described optimum application server determination module may further include following submodule:
The very first time, optimum application server was determined submodule: in Preset Time, while having the application server very first time to respond described connection request, interruption is connected with other application server, and current application server is defined as to optimum application server.
In the application's a preferred embodiment, described optimum application server determination module may further include following submodule:
Connect hours, optimum application server was determined submodule: for exceeding after Preset Time, while having described in many application server responses connection request, connect hours to each application server sorts, and the shortest application server of connect hours is defined as to optimum application server.
In the application's a preferred embodiment, described optimum application server determination module may further include following submodule:
The optimum application server of speed of download is determined submodule: while being the DNS inquiry request based on http agreement for the DNS inquiry request sending in client, the speed of download of obtaining the application server of the described connection request of response, is defined as optimum application server by the fastest application server of speed of download.
In specific implementation, described candidate's IP address list generation module 302 can comprise:
The network segment obtains submodule: obtain the affiliated network segment in described IP address;
IP address extraction submodule: write candidate's IP address list for extracting an IP address from each network segment.
For system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and each embodiment stresses is the difference with other embodiment, between each embodiment identical similar part mutually referring to.
The application can be used in numerous general or special purpose computingasystem environment or configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, the system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, minicom, mainframe computer, comprise distributed computing environment (DCE) of above any system or equipment etc.
The application can describe in the general context of the computer executable instructions of being carried out by computer, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can in distributed computing environment (DCE), put into practice the application, in these distributed computing environment (DCE), by the teleprocessing equipment being connected by communication network, be executed the task.In distributed computing environment (DCE), program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
The optimum application server choosing method of the domain name system DNS above the application being provided, and a kind of optimum application server selecting device of domain name system DNS., be described in detail, to have applied specific case herein the application's principle and execution mode have been set forth, the explanation of above embodiment is just for helping to understand the application's method and core concept thereof; Meanwhile, for one of ordinary skill in the art, the thought according to the application, all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.