问题原文
原帖链接 · yifan · CC BY-SA 4.0
We have registered 4 name servers in tld server for our domain. Here is an example of our NS record.
example.com. 172800 IN NS ns1.example.com.
example.com. 172800 IN NS ns2.example.com.
example.com. 172800 IN NS ns3.example.com.
example.com. 172800 IN NS ns4.example.com.
I have three questions here.
1.I just want to know which name server will be chosen to handle DNS query, Randomly or Orderly?
2.Is it possible that the name server is chosen based on the locaion of the client IP address?
3.If a DNS query was sent to ns3.example.com, but this name server did not respond within a certain period, what to do next? Will this DNS query be sent to another name server?
4.If there are multiple A records for a domain, which one would be chosen? For example,
ns1.example.com 172800 IN A 192.168.1.3
ns1.example.com 172800 IN A 192.168.1.4
which IP will be returned for a DNS query?
已采纳解答
原帖链接 · Håkan Lindqvist · CC BY-SA 4.0
The choice of which authoritative server to query is done arbitrarily by the resolver server. The details of the strategy is implementation specific. Expect that any authoritative server may receive any query and must be able to answer all of them.
Not in the sense that you could rely on it in any way.
But, as an example, if the client is near the resolver server that queries your authoritative servers and that resolver implementation likes to latch on to a specific server based on low latency, you might indirectly get mostly this sort of effect if there's a steady stream of queries.The resolver server should try the other servers until it gets a response (ideal case, of course), all options are exhausted or the whole operation times out.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
