domain-name-system – 未绑定 – 仅在短时间内缓存的域

domain-name-system – 未绑定 – 仅在短时间内缓存的域,第1张

概述我最近设置了Unbound for DNS缓存,以及 Linux Mint 18.1上的DNScrypt.它工作,但我注意到页面只在很短的时间内缓存: >首次查询google.com – 48ms(域未缓存) > google.com的第二个查询(紧接着之后) – 0ms(域缓存) > google.com的第三次查询(在〜分钟后) – 46ms(域未缓存) 这是预期的行为,还是我需要设置不同的东 我最近设置了Unbound for DNS缓存,以及 Linux Mint 18.1上的DNScrypt.它工作,但我注意到页面只在很短的时间内缓存:

>首次查询Google.com – 48ms(域未缓存)
> Google.com的第二个查询(紧接着之后) – 0ms(域缓存)
> Google.com的第三次查询(在〜分钟后) – 46ms(域未缓存)@H_301_5@

这是预期的行为,还是我需要设置不同的东西来缓存页面更长的时间?这是我的Unbound配置(/etc/unbound/unbound.conf):
#@H_301_5@

Unbound configuration file for Debian.    #    # See the unbound.conf(5) man page.    #    # See /usr/share/doc/unbound/examples/unbound.conf for a commented    # reference config file.age    #    # The following line includes additional configuration files from the    # /etc/unbound/unbound.conf.d directory.    include: "/etc/unbound/unbound.conf.d/*.conf"    server:        verbosity: 1        num-threads: 4        outgoing-range: 8192        so-rcvbuf: 4m        so-sndbuf: 4m        so-reuseport: yes        msg-cache-size: 50m        msg-cache-slabs: 16        num-querIEs-per-thread: 4096        rrset-cache-size: 100m        rrset-cache-slabs: 16        infra-cache-slabs: 16        do-ip4: yes        do-ip6: no        do-udp: yes        do-tcp: yes        do-daemonize: yes        hIDe-IDentity: yes        hIDe-version: yes         harden-short-bufsize: yes        harden-large-querIEs: yes        harden-glue: yes        harden-dnssec-stripped: yes        harden-below-nxdomain: yes        harden-referral-path: yes        logfile: "/etc/unbound/unbound.log"        use-caps-for-ID: yes        do-not-query-localhost: no        prefetch: no     forward-zone:        name: "."        forward-addr: 127.0.0.1@40
解决方法 未绑定将(或至少应该)将结果缓存在 TTL中为您请求的记录指定的时间.

这正是我在一个运行未绑定的系统上观察到的.初始请求需要14ms,后续请求需要0ms,当TTL到期时,下一个请求需要14ms.@H_301_5@

初始请求显示300秒TTL并需要18ms@H_301_5@

;; ANSWER SECTION:Google.com.             300     IN      A       172.217.20.46;; query time: 18 msec;; SERVER: 10.34.20.1#53(10.34.20.1);; WHEN: Sun Feb 12 20:39:30 2017;; MSG SIZE  rcvd: 44

后续请求 – TTL正在倒计时并需要0ms@H_301_5@

;; ANSWER SECTION:Google.com.             196     IN      A       172.217.20.46;; query time: 0 msec;; SERVER: 10.34.20.1#53(10.34.20.1);; WHEN: Sun Feb 12 20:41:14 2017;; MSG SIZE  rcvd: 44

TTL已过期,因此另一个上游请求为23ms@H_301_5@

;; ANSWER SECTION:Google.com.             300     IN      A       172.217.20.46;; query time: 23 msec;; SERVER: 10.34.20.1#53(10.34.20.1);; WHEN: Sun Feb 12 20:44:37 2017;; MSG SIZE  rcvd: 44
总结

以上是内存溢出为你收集整理的domain-name-system – 未绑定 – 仅在短时间内缓存的域全部内容,希望文章能够帮你解决domain-name-system – 未绑定 – 仅在短时间内缓存的域所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1095654.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存