BG更新的DNScaching

我正在寻找Ubuntu服务器使用DNScaching的解决scheme。

  • 如果它有logging并且没有过期(在caching或本地定义中),则返回该logging
  • 如果它logging并且已经过期,则返回logging ,**在后台更新本地条目
  • 如果没有find上游的查询

最重要的是甚至可能无效的logging快速返回,但不要等待DNSparsing。

这可以通过configurationbind / dnsmasq来完成,创build自定义解决scheme的方式或方式会更好。

我不知道一个解决scheme,正是你所要求的,但例如Unbound有一个选项来预取数据caching项即将到期。

从unbound.conf(5) :

prefetch: <yes or no> If yes, message cache elements are prefetched before they expire to keep the cache up to date. Default is no. Turning it on gives about 10 percent more traffic and load on the machine, but popular items do not expire from the cache. 

虽然这与您在问题中所描述的方法不同,但似乎应该达到相同的总体目标。