$ ls ~yifei/notes/

Linux 上的 DNS 缓存

Posted on:

Last modified:

Linux 内核中没有 DNS 缓存

Firefox 内置了 DNS 缓存

nscd 可以提供本地的 DNS 缓存,好多机器开了,但是据说这个服务有很多问题。

Python 使用了 getaddrinfo 函数,会使用系统的 DNS 缓存

nslookup 和是 dig 这样的工具会 bypass 掉 DNS 缓存。

另外 Go 语言好像也不会使用本机的 DNS 缓存,即使开了

https://wiki.archlinux.org/index.php/dnsmasq 可以用来做本地缓存

还可以使用 systemd 提供的 resolved

  1. https://stackoverflow.com/questions/11020027/dns-caching-in-linux
WeChat Qr Code

© 2016-2022 Yifei Kong. Powered by ynotes

All contents are under the CC-BY-NC-SA license, if not otherwise specified.

Opinions expressed here are solely my own and do not express the views or opinions of my employer.

友情链接: MySQL 教程站