递归DNS解析器

递归DNS解析器是一种接受客户端[[dns|DNS]]查询并代为执行完整解析流程的服务器,从[[dns-root-server|根域名服务器]]开始,沿DNS层级逐步向下查询,直至找到被查询域名的[[authoritative-dns|权威服务器]]。与[[authoritative-dns|权威服务器]]不同,递归解析器充当中间人角色:根据每条记录的[[ttl|TTL]]缓存响应,从而降低延迟和上游查询负担。ISP运营的解析器、Cloudflare 1.1.1.1和Google 8.8.8.8等公共服务以及企业DNS服务器均作为递归解析器运行。[[dns-over-https|DNS over HTTPS]]和[[dns-over-tls|DNS over TLS]]对客户端与递归解析器之间的通道进行加密,以防止窃听。

示例

When you visit example.com, your laptop sends a query to the recursive resolver at 1.1.1.1, which contacts root, .com TLD, and authoritative nameservers in sequence before returning the IP — subsequent users hitting 1.1.1.1 receive the cached answer instantly.