- 论坛徽章:
- 1
|
前幾天有談到,我想就是 named 用時間來計算選擇那一部 NS,
至於 RTT 值如可看到我也不知道,根據某一篇 RFC DNS MIB 的說明有這個 OID,
但是 ISC BIND 或 NET-SNMP 都沒有做這個 mib agent
RTT 相關資料供你參考
- Given a choice of servers, which one is queried?
- Based on a question by Mark A. Dohm <mark.dohm@teldta.com> and answer by Paul A Vixie <paul@vix.com>
- Every recursive BIND name server (that is, one which is willing to go out and find something if asked something it doesn't know) will remember the measured round trip time (RTT) to each server it sends queries to. If it has a choice of several servers for some domain (like "." for example) it will use the one whose measured RTT is lowest.
- Since the measured RTT of all NS RRs starts at zero (0), every one is tried once. Once all have responded, all RTT's will be nonzero, and the "fastest server" will get all queries henceforth, until it slows down for some reason.
- To promote dispersion and good recordkeeping, BIND will penalize the RTT by a little bit each time a server is reused, and it will penalize the RTT a _lot_ if it ever has to retransmit a query. For a server to stay "#1", it has to keep on answering quickly and consistently.
- Note that this is something BIND does that the DNS Specification does not mention at all. So other servers, those not based on BIND, might behave very differently.
- Transferring
复制代码
rfc1122
rfc1612
rfc1794
rfc4339
最後,你如果真的想知道 RTT 怎麼算怎麼看,
請詳讀 lib/dns/adb.c 下的 source code
裏面的 comment 有很好的說明,尤其是
dns_adb_adjustsrtt 這個 function , 他決定了 NS 的 RTT 值調整及最終的 NS 取用順序
lib/dns/resolver.c 則說明了計算方法
我沒有整理過,而且講 RTT 實在也太泠門 |
|