NSD
- About
- In-depth
- Download
- Support
- Security Advisories
Authoritative DNS makes your organisation’s names and services discoverable. Its reliability depends on more than answering queries quickly: the servers must publish the intended data, distribute changes and remain manageable as the workload grows.
NSD is designed around this role. Its focused architecture, standard interfaces and publication controls let operators build an authoritative service that fits their infrastructure.
A deliberate separation of responsibilities
NSD is strictly an authoritative name server: it only answers queries for the zones it hosts. It does not perform recursive resolution for clients, nor does it sign zones or manage DNSSEC keys. Instead, those tasks belong to dedicated tools like Unbound for resolution and Cascade for DNSSEC signing.
Keeping NSD focused on a single job reduces code complexity and keeps its attack surface small. It also gives you complete freedom in how you build and manage your DNS pipeline. Depending on your setup, NSD can:
- Load zone files generated directly by a provisioning system.
- Receive signed zones from a signer.
- Act as a secondary server pulling updates from another primary name server.
NSD is also built to support split primary and secondary architectures. For example, you can run NSD as a hidden primary that accepts zone updates and pushes them to public-facing secondaries, without ever exposing the primary to public internet queries. NSD can serve in either role—or both.
Query capacity and update behaviour
NSD holds its serving data in memory and handles queries across multiple forked processes. Each worker runs in its own address space, while the operating system shares unchanged memory pages through copy-on-write. This provides process-level memory isolation and avoids locking around a shared, mutable zone database in the query path.
To take full advantage of multi-core hardware, you can scale the number of server processes and—where supported by the OS—bind workers to specific CPU cores or partition sockets across processes. See the tuning guide for a full breakdown of these options.
Planning for zone updates
Zone updates also consume memory and CPU. NSD uses a process-based reload design: existing workers continue serving queries while a separate process prepares updated zone data. After a successful reload, new workers take over from those serving the previous version.
Copy-on-write allows unchanged memory pages to remain shared, but updates can temporarily increase memory use. Capacity planning should therefore consider peak memory during reloads as well as steady-state usage.
A query benchmark against unchanged zones does not measure the cost of processing updates. For a representative capacity test, measure reload times, peak memory and query performance using:
- Your actual zone sizes and record counts.
- A realistic frequency and volume of zone changes.
- A representative mix of query types and response sizes, including DNSSEC responses.
- Your expected UDP and TCP traffic mix.
Faster loading and more efficient storage
NSD integrates simdzone, NLnet Labs’ high-speed DNS zone-file parser. On supported processors, it uses SIMD instructions to parse zone text in parallel, falling back cleanly to a standard implementation on other hardware. While this significantly speeds up loading large zone files, it applies to startup and reload times rather than query-answering throughput. See the simdzone documentation for details and benchmarks.
Recent improvements to how NSD stores resource records also cut memory overhead by keeping RDATA in a more compact form rather than tracking every field individually. NLnet Labs has published measurements across several top-level-domain datasets showing how savings vary depending on zone structure and record types. For deployments with tight memory budgets, optional build-time flags offer further reductions—though some depend on CPU architecture or trade a small amount of lookup speed for lower RAM usage.
Publishing DNSSEC data with additional checks
NSD serves DNSSEC-signed zones, including signatures and NSEC or NSEC3 records for authenticated denial of existence. Signing and key management take place upstream.
Before publishing a zone update, NSD can run an optional verification hook. This checkpoint passes the candidate zone to an external verifier—such as ldns-verify-zone or validns—which inspects the data and either accepts or rejects the update. If a check fails, NSD keeps serving the previous valid version (subject to normal zone and signature expiry limits). While the hook catches signing errors and policy violations based on the verifier you choose, it is a safeguard rather than an automatic guarantee of zone correctness.
NSD can load and serve ZONEMD records containing a cryptographic digest of the zone contents. These records must be generated by external software. NSD itself does not generate or validate ZONEMD digests, however the verification hook mentioned above can be used to validate ZONEMD, for example by calling ldns-verify-zone -Z with the -Z option.
At DNS-OARC 42, PCH described using NSD’s verifier hook to validate signed zones in a pipeline using Knot DNS as the signer. This illustrates how independent implementations can perform complementary roles in critical infrastructure. NLnet Labs’ zone-verification article explains the design in detail.
Distributing and provisioning zones
NSD supports full transfers through AXFR and incremental transfers through IXFR, allowing servers to both receive and serve zone data. Incremental transfers reduce the bandwidth needed when a large zone changes, while NOTIFY messages prompt secondaries to check for updates immediately.
Transfer access controls determine which systems may exchange zone data. TSIG authenticates transfers using a shared secret. XFR over TLS (XoT) encrypts transfers and can also authenticate both endpoints using certificates. Certificate-based authentication offers an alternative to distributing shared TSIG secrets.
Catalog zones provide a standard way to distribute the list of zones a server should host. NSD can both produce and consume catalogs, using configuration patterns to apply settings to member zones automatically. Catalogs only define zone membership; the member zones themselves are still transferred separately.
Together, these mechanisms make NSD well suited for automated deployments without requiring manual configuration updates on every server for each new zone. Because catalogs carry administrative authority over zone membership, their transfer permissions, query access controls, and allowed configuration patterns deserve careful restriction.
Integrating with DNS proxies
PROXYv2 support lets a compatible DNS proxy—such as dnsdist—pass the original client address to NSD when forwarding a query. This preserves client IP information for access controls, logging, and traffic reporting that would otherwise only see the proxy’s address, helping NSD fit cleanly into deployments with a separate traffic-management layer. NSD supports PROXYv2 on configured UDP, TCP, and TLS listeners.
Because PROXYv2 metadata is supplied by the sender, these listeners must only accept traffic from trusted proxies. The allow-proxy option in nsd.conf(5) restricts which senders are permitted to use them.
Standards and operational visibility
NSD uses standard DNS protocols to interoperate with other authoritative servers, signers and resolvers. NLnet Labs also contributes directly to those standards. For example, Willem Toorop co-authored RFC 9103, specifying encrypted zone transfers, RFC 9018, defining interoperable server cookies for multi-implementation anycast deployments, and coordinated and co-authored RFC 9432, the design and specification of DNS Catalog Zones.
NSD has supported DNS over TLS (DoT) for authoritative queries since 2019. This allows compatible resolvers to encrypt their queries to NSD, extending encrypted DNS beyond the connection between clients and recursive resolvers. This is separate from XFR over TLS (XoT), which protects zone transfers between authoritative servers.
Alongside protocol interoperability, NSD gives operators clear visibility into running instances. You can inspect zone status, manage zones and retrieve statistics through nsd-control, or expose metrics directly to monitoring systems via the built-in Prometheus endpoint. Optional dnstap support provides detailed traffic capture when required.
See the RFC Compliance reference and configuration documentation for full protocol support and feature requirements.
Working within a resilient DNS service
Software diversity reduces reliance on the behaviour of any single implementation. In fact, this was the original motivation for developing NSD. It complements other operational safeguards, such as independent sites, monitoring and controlled updates. No individual nameserver can provide the resilience of the service as a whole.
Root and TLD operators routinely deploy NSD as part of nameserver fleets that combine several implementations. For example, in its RIPE 85 DNS update in October 2022, the RIPE NCC described running BIND, Knot DNS and NSD side by side in its authoritative DNS infrastructure.
For public query service, NSD also offers configurable request rate limiting (RRL) and DNS Cookies to help limit certain forms of spoofed-traffic abuse. These tools need to be set up carefully, and they cannot stop very large attacks that overwhelm the network connection.
Continued engineering and support
NSD’s focused scope still requires ongoing maintenance. It supports all currently assigned DNS resource record types, and automated tests check the IANA registries for new record types and SVCB parameters that may require implementation work. Operator reports complement testing and fuzzing by bringing real-world workloads and unexpected behaviour to the developers’ attention.
Security research is another ongoing driver of improvements. Reports from researchers—including work using LLM-assisted analysis—have led to vulnerability fixes and deeper hardening. Each report is investigated to address the underlying defect and ship timely corrections. Release notes and security advisories document these fixes, affected versions and researcher credits. Even with a narrow scope, keeping deployed software current remains essential to operating a secure service.
Experimental features are kept clearly separate from established capabilities. NSD’s optional AF_XDP support explores an alternative packet-processing path on Linux, but remains experimental with specific hardware and feature limitations outlined in the documentation.
NSD is open-source software licensed under the BSD 3-Clause licence. Its documentation and community forum support evaluation and day-to-day operations. Organisations that require service-level commitments and direct access to the development team can obtain professional support and consultancy from NLnet Labs.