# PowerDNS

**PowerDNS** 是一系列开源 DNS 服务器软件，由三款主要产品组成：权威服务器（Authoritative Server），负责应答其托管域名的查询；递归服务器（Recursor），通过遍历 DNS 层级来解析其他域名的查询；以及 dnsdist，一款负载均衡器，在服务器之间分配 DNS 流量并提供 DDoS 防护。<sup>[1](https://doc.powerdns.com/index.html)</sup> 权威服务器与递归服务器是相互独立的组件，可以在同一部署中无缝混用。<sup>[1](https://doc.powerdns.com/index.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 主要产品 | 权威服务器、递归服务器和 dnsdist；前两者是相互独立的组件，可以无缝混用<sup>[1](https://doc.powerdns.com/index.html)</sup> |
| 权威模式 | 应答出自数据库后端，可被信任为权威；该服务器不解析其他域名<sup>[1](https://doc.powerdns.com/index.html)</sup> |
| 起源 | 约1999年始于荷兰；创立时的核心观察是，BIND——当时唯一大致可用的 DNS 产品——无法扩展到大量域名<sup>[2](https://berthub.eu/articles/posts/history-of-powerdns-1999-2003/)</sup> |
| 许可证 | 最初为 GPLv2，不可升级至 v3<sup>[2](https://berthub.eu/articles/posts/history-of-powerdns-1999-2003/)</sup> |
| 递归服务器缓存命中率 | 所有查询中有80%至90%直接从缓存应答<sup>[3](https://docs.powerdns.com/recursor/appendices/internals.html)</sup> |
| 分发 | 随 Debian、FreeBSD、Gentoo、NetBSD、OpenBSD、SUSE 和 Ubuntu 分发，另有源码包、Linux 软件包和 Docker 镜像<sup>[4](https://www.powerdns.com/downloads)</sup> |
| 当前版本线 | 权威服务器 5.1.x（5.1.3 于2026年6月30日发布）和 4.9.x（4.9.16 于2026年6月25日发布）<sup>[5](https://blog.powerdns.com/2026/05/30/powerdns-authoritative-server-5.1.3-released)</sup><sup> • </sup><sup>[6](https://doc.powerdns.com/authoritative/changelog/4.9.html)</sup> |

## 产品

**权威服务器**应答关于其所知域名的问题，不会上网去解析其他域名的查询。当它应答一个问题时，答案出自数据库，可被信任为权威。<sup>[1](https://doc.powerdns.com/index.html)</sup> 区数据通过可插拔后端提供；该项目假定后端自行处理复制，托管服务商所用的 MySQL 后端等数据库驱动的部署即以此方式运作。<sup>[7](https://doc.powerdns.com/authoritative/modes-of-operation.html)</sup><sup> • </sup><sup>[8](https://www.powerdns.com/case-studies)</sup> 辅助（从属）运行通过自动辅助功能支持：辅助服务器在引导新域名时，向 `supermasters` 表中匹配的 IP 地址发送非递归 SOA 和 NS 查询；文档警告说，如果主权威服务器隐藏在递归服务器之后，域名引导就会失败，因此这些查询必须直接发往权威服务器，或由 dnsdist 转发。<sup>[7](https://doc.powerdns.com/authoritative/modes-of-operation.html)</sup>

**递归服务器**默认自身不了解任何域名，总是咨询其他权威服务器来回答交给它的问题；它专为高性能递归 DNS 解析而设计。<sup>[1](https://doc.powerdns.com/index.html)</sup> 其解析算法从 `SyncRes::beginResolve()` 开始，该函数接收域名、DNS 类型和 DNS 类别，返回一个 DNSResourceRecord 对象向量，可直接用于应答包或内部使用。首先运行缓存检查（`SyncRes::doCacheCheck`），查询缓存与否定缓存；如果找到正确且未过期的答案，就将其返回——这种情况占所有查询的80%至90%。<sup>[3](https://docs.powerdns.com/recursor/appendices/internals.html)</sup> 否则，`SyncRes::getBestNSNamesFromCache` 从被查询的名称向上遍历父区直至根服务器，然后 `SyncRes::doResolveAt` 逐一尝试已知的域名服务器及其所有 IP 地址，直到有一个应答。<sup>[3](https://docs.powerdns.com/recursor/appendices/internals.html)</sup>

递归服务器缓存存储部分数据包，值得注意的是，它存储的不是记录的生存时间（Time To Live），而是死亡时间（Time To Die）；过期数据不得被视为存在。这部分代码已被证明颇为棘手，过去曾导致死锁。<sup>[3](https://docs.powerdns.com/recursor/appendices/internals.html)</sup> 一个域名在其自己的区中列出的域名服务器可能多于其父区列出的数量，因此在与父区服务器通信时，缓存不得用较小的父区副本覆盖较大的子区 NS 集合；而对于 SOA 和 CNAME 等记录类型，新数据应覆盖旧数据。PowerDNS 在这方面偏离了 RFC 2181 第5.4.1节，从4.7.0版本开始，一种机制会在父区 NS 集合包含的名称多于子区 NS 集合时保存父区 NS 集合。<sup>[3](https://docs.powerdns.com/recursor/appendices/internals.html)</sup>

递归服务器还支持**区到缓存**（Zone to Cache）功能，该功能定期、在启动时以及每当 Lua 配置重新加载时将一个区加载到缓存中，使递归服务器对这些区拥有始终热乎的缓存。区内容可通过区传送（AXFR 格式）获取，或从通过 http、https 或本地文件获取的区文件读取；文档中的示例从 Internic 的 URL 加载根区。从4.7.0版本开始，获取的区使用 DNSSEC 验证，用父区的 DS 记录或信任锚来验证区的 DNSKEY 记录，并按 RFC 8976 所述使用 ZONEMD 验证。<sup>[9](https://doc.powerdns.com/recursor/lua-config/ztc.html?highlight=cache)</sup>

**dnsdist** 是一款高度感知 DNS、DoS 和滥用的负载均衡器，用于将传入流量分配到多台 DNS 服务器。<sup>[1](https://doc.powerdns.com/index.html)</sup> 商业附加组件 dnsdist Defender 增加了对隧道、数据外泄、DDoS 攻击和命令与控制威胁的防护。<sup>[1](https://doc.powerdns.com/index.html)</sup>

除三款核心产品外，PowerDNS 产品组合还包括：PowerDNS Cloud Control，用于基于云的 DNS 管理；PowerDNS dstore，用于 DNS 数据的分布式存储；PowerDNS Lightning Stream，用于通过 S3 桶在服务器之间近实时同步 LMDB 数据库；PowerDNS ZoneControl，用于区管理；PowerDNS Platform Filter，用于运营商级互联网过滤；PowerDNS Recursor Plexus，用于在递归服务器实例之间保存和共享运行时状态；以及 Single Pane of Glass，一个用于 Cloud Control 的可观测性平台。<sup>[1](https://doc.powerdns.com/index.html)</sup>

## 历史

PowerDNS 由荷兰系统管理员伯特·休伯特（Bert Hubert）于约1999年创立，他曾帮助早期的荷兰有线互联网服务提供商卡塞马（Casema）从50个用户扩展到50,000个用户。创立时的商业洞察是，BIND 是当时唯一大致可用的 DNS 产品，却未能满足市场需求：它无法扩展到大量域名，而每一家较大的 DNS 托管公司都养着一整支团队，其工作就是让 BIND 处理数千甚至数万个域名。<sup>[2](https://berthub.eu/articles/posts/history-of-powerdns-1999-2003/)</sup> 该软件以 GPLv2 许可发布，不可升级至第3版——休伯特后来将这一许可决定描述为日后会困扰该项目的决定。<sup>[2](https://berthub.eu/articles/posts/history-of-powerdns-1999-2003/)</sup>

这家早期公司在商业上举步维艰。其潜在客户是网络托管商——休伯特称他们出了名地不乐意花钱——以及大型通信提供商，后者不愿将运营押注在一家看起来完全不像电信公司所寻找的东西的新创公司上。Infoblox 等竞争对手在 BIND 上构建了一款设备，对电信买家来说更容易采购，尽管该设备并未解决 BIND 的根本问题。<sup>[2](https://berthub.eu/articles/posts/history-of-powerdns-1999-2003/)</sup> 让软件存活下去，让公司的外在形象运转起来——网站开着、电话有人接、版本持续发布——后来被证明是生存的关键。<sup>[2](https://berthub.eu/articles/posts/history-of-powerdns-1999-2003/)</sup>

## 采用与发布

PowerDNS 随许多 Linux 和 UNIX 发行版分发，包括 Debian、FreeBSD、Gentoo、NetBSD、OpenBSD、SUSE 和 Ubuntu，通常以 `pdns`、`powerdns-server`、`pdns-recursor` 或 `pdns-server` 等软件包形式提供；由于发行版软件包可能停止维护，该项目建议对仍受支持的版本使用其自己的仓库。源代码托管在 GitHub 上，发布版本以源码包、发行版软件包和 Docker 镜像形式提供。<sup>[4](https://www.powerdns.com/downloads)</sup>

权威服务器目前有两条维护中的版本线。2026年6月30日发布的5.1.3版引入了 SOA-EDIT 扩散以及签名有效期延长，并修正了若干缺陷；根据该项目的生命周期终止政策，发布最后的5.1.0版本与4.8版支持结束同时发生，不过与 PowerDNS.COM BV 或 Open-Xchange 持有商业协议的客户仍可获得已终止生命周期版本的支持。<sup>[5](https://blog.powerdns.com/2026/05/30/powerdns-authoritative-server-5.1.3-released)</sup> 4.9.x 版本线继续接收安全修复：2026年6月25日发布的4.9.16仅包含一项安全修复，处理 PowerDNS 安全公告 2026-07；2026年早些时候的4.9.15和4.9.14分别修复了公告 2026-06 和 2026-05。<sup>[6](https://doc.powerdns.com/authoritative/changelog/4.9.html)</sup>

有记录的用户包括 BT，其使用 PowerDNS 处理宽带 DNS 流量和安全需求，为5G和物联网需求做准备；TELUS，用于网络边缘的云原生 DNS 服务；Quad9，用于隐私友好的公共加密 DNS 解析服务；以及 Allot，用于基于 DNS 的安全。托管服务商将数据库后端描述为一项显著特色：bHosted.nl 自约2004年起使用带 MySQL 后端的 PowerDNS，让客户编辑自己的记录；Zyro 使用 PowerDNS 管理其发布站点的域名，发布速度约为每天4,000个新网站。<sup>[8](https://www.powerdns.com/case-studies)</sup>

## References

1. [PowerDNS Documentation](https://doc.powerdns.com/index.html)
2. [Bert Hubert (2020). History of PowerDNS: 1999-2003](https://berthub.eu/articles/posts/history-of-powerdns-1999-2003/)
3. [Internals of the PowerDNS Recursor, PowerDNS Recursor documentation](https://docs.powerdns.com/recursor/appendices/internals.html)
4. [PowerDNS Downloads](https://www.powerdns.com/downloads)
5. [PowerDNS Authoritative Server 5.1.3 Released, PowerDNS Blog (June 30, 2026)](https://blog.powerdns.com/2026/05/30/powerdns-authoritative-server-5.1.3-released)
6. [Changelogs for 4.9.x, PowerDNS Authoritative Server documentation](https://doc.powerdns.com/authoritative/changelog/4.9.html)
7. [DNS Modes of Operation, PowerDNS Authoritative Server documentation](https://doc.powerdns.com/authoritative/modes-of-operation.html)
8. [PowerDNS Case Studies](https://www.powerdns.com/case-studies)
9. [Zone to Cache, PowerDNS Recursor documentation](https://doc.powerdns.com/recursor/lua-config/ztc.html?highlight=cache)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Networking fundamentals and architecture › Routing and addressing › Name addressing and DNS

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/powerdns

English original: https://www.edgepedia.org/powerdns
