andybest
V2EX  ›  问与答

为什么客户端 DNS 查询速度跟域名使用的 DNS 解析服务器有关系?

  •  
  •   andybest · Jan 10, 2015 · 3075 views
    This topic created in 4167 days ago, the information mentioned may be changed or developed.
    /t/160825 中说尽量选用靠谱的 DNS 解析商来提高用户/客户端解析速度

    在我理解,如果是一个大 TTL 设定的话,域名使用哪家 DNS 解析商关系不大对吗?

    比如我使用某国外不知名 DNS 解析商,增加一条 A 记录,TTL 为 1 天(只是假设,不讨论该设置是否合理)
    那么国内某 ISP 初次访问解析该域名的确可能需要稍微长一些的时间,
    但接下来的 1 天,所有使用该 ISP 的都可以从该 ISP DNS 中获取这个解析的缓冲,速度是和使用国内 DNS 解析商是一样的。

    这种理解正确吗?(长 TTL 设置下,除首次解析速度不同外,缓冲期间解析速度是等同的)
    5 replies    2015-01-11 00:19:08 +08:00
    Draplater
        1
    Draplater  
       Jan 10, 2015
    ISP的DNS缓存是有限的,如果这个域名很少解析,就会被新解析的域名从缓存中挤掉。
    andybest
        2
    andybest  
    OP
       Jan 10, 2015
    @Draplater 也就是说 TTL 设置的缓冲时间在节点 DNS 中未必实际对等?
    Draplater
        3
    Draplater  
       Jan 10, 2015
    @andybest TTL只是过期时间,不是缓存时间
    andybest
        4
    andybest  
    OP
       Jan 10, 2015
    @Draplater 在节点服务器上的过期/存活时间不就意味着缓冲时间?

    参考: http://en.wikipedia.org/wiki/Time_to_live

    The units used are seconds. An older common TTL value for DNS was 86400 seconds, which is 24 hours. A TTL value of 86400 would mean that, if a DNS record was changed on the authoritative nameserver, DNS servers around the world could still be showing the old value from their cache for up to 24 hours after the change.

    设置了 TTL 一天,实际节点服务器没有缓冲该解析一天这种情况是普遍现象还是偶然?
    typcn
        5
    typcn  
       Jan 11, 2015
    我也发现了,我修改记录为 A 之后,过了大概 30秒 又修改成了 记录 B ,TTL 是 600

    我朋友说第二天整天都访问的 记录 A 所对应的 IP 上面的 404 页面。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4127 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 81ms · UTC 10:14 · PVG 18:14 · LAX 03:14 · JFK 06:14
    ♥ Do have faith in what you're doing.