首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何确定"cache-min-ttl“的适当值

如何确定"cache-min-ttl“的适当值
EN

Stack Overflow用户
提问于 2014-02-15 15:52:24
回答 1查看 4.8K关注 0票数 2

我在我的FreeBSD 10桌面上使用Unbound作为本地DNS缓存解析器,但是,我不知道如何在它的配置文件中为" cache -min-ttl“确定一个适当的值。我在谷歌上搜索过,但似乎没有什么明确的答案。目前,1800是我的选择,但不确定。以下是我的Unbound配置文件:

代码语言:javascript
复制
server:
    interface: 0.0.0.0
    verbosity: 1
    cache-min-ttl: 1800
    logfile: /var/unbound/unbound.log
    pidfile: /var/run/local_unbound.pid

forward-zone:
      name: "."
      forward-addr: 114.114.114.114        # 114 DNS
      forward-addr: 114.114.115.115        # 114 DNS
      forward-addr: 8.8.8.8        # Google Public DNS
      forward-addr: 8.8.4.4        # Google Public DNS
      forward-addr: 199.85.126.10        # Norton DNS
      forward-addr: 199.85.127.10        # Norton DNS
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-04-22 12:33:56

对于桌面,您不需要自己编写配置文件。脚本local-unbound-setup将自动为您执行此操作。自动生成的设置如下所示:

代码语言:javascript
复制
# Generated by local-unbound-setup
server:
        username: unbound
        directory: /var/unbound
        chroot: /var/unbound
        pidfile: /var/run/local_unbound.pid
        auto-trust-anchor-file: /var/unbound/root.key

(您在resolv.conf中拥有的名称服务器将添加到/var/unbound/forward.conf中。见/usr/sbin/local-unbound-setup.)

这意味着cache-min-ttl保持在它的默认值,根据unbound.conf(5)手册页,它是零;

代码语言:javascript
复制
   cache-min-ttl: <seconds>
          Time to live minimum for  RRsets  and  messages  in  the  cache.
          Default  is  0.  If the the minimum kicks in, the data is cached
          for longer than the domain owner intended, and thus less queries
          are  made  to look up the data.  Zero makes sure the data in the
          cache is as the domain owner intended, higher values, especially
          more  than an hour or so, can lead to trouble as the data in the
          cache does not match up with the actual data any more.
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21799834

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档