Inferensys

Glossary

DNS-Based Service Discovery (DNS-SD)

DNS-Based Service Discovery (DNS-SD) is a protocol that uses standard DNS queries (SRV and TXT records) to discover services available on a network.
Strategy consultant facilitating AI use case discovery workshop, sticky notes on glass wall, casual corporate meeting.
AGENT REGISTRATION AND DISCOVERY

What is DNS-Based Service Discovery (DNS-SD)?

DNS-Based Service Discovery (DNS-SD) is a protocol that uses standard DNS queries to discover services available on a network.

DNS-Based Service Discovery (DNS-SD) is a zero-configuration networking protocol that leverages standard DNS resource records—specifically SRV (service) and TXT (text) records—to allow clients to dynamically discover the network names and connection details of available services. Defined in RFC 6763, it operates over both traditional unicast DNS and Multicast DNS (mDNS) for local networks. This mechanism enables agent registration and discovery by allowing an agent to advertise its capabilities as a service type (e.g., _http._tcp) and for other agents to browse for and resolve these advertisements to specific hostnames and ports.

Within multi-agent system orchestration, DNS-SD provides a lightweight, decentralized alternative to centralized service registries like Consul or etcd. It is foundational for dynamic registration and capability advertisement in heterogeneous systems. Agents publish SRV records to specify their host and port and TXT records for metadata like version or API paths. Discovering agents perform DNS queries for a given service type, receiving a list of available instances. This protocol underpins many client-side discovery patterns and integrates with systems like Kubernetes for internal service lookup, promoting loose coupling and network resilience.

PROTOCOL MECHANISMS

Key Features of DNS-SD

DNS-Based Service Discovery (DNS-SD) leverages standard DNS record types and query mechanisms to enable zero-configuration discovery of networked services. Its design is defined by several core architectural principles.

01

Standard DNS Protocol Foundation

DNS-SD operates entirely within the existing Domain Name System (DNS) protocol framework, using standard DNS message formats and query types. This eliminates the need for new client libraries or network infrastructure, leveraging the universal UDP/TCP port 53. It uses specific DNS record types: SRV records for mapping a service instance name to a hostname and port, TXT records for arbitrary metadata (key-value pairs), and PTR records for service type enumeration and instance listing. This standards-based approach ensures broad compatibility.

02

Service Instance Naming Convention

A core feature is its structured naming scheme for advertising services. A fully qualified service instance name follows the pattern: <Instance>.<Service>.<Domain>

  • Instance: A human-readable name for the specific instance (e.g., Printer-Lobby).
  • Service: The service type and transport protocol, prefixed with an underscore (e.g., _http._tcp, _ipp._tcp).
  • Domain: The DNS domain (e.g., local., office.example.com). This convention allows clients to browse for service types (_http._tcp) and then resolve specific instances (MyWebServer._http._tcp.local.).
03

Multicast DNS (mDNS) for Zero-Configuration

While DNS-SD can work with traditional unicast DNS servers, its most common implementation is paired with Multicast DNS (mDNS) on local networks. Using the .local. domain, mDNS allows devices to perform DNS operations via IP multicast (address 224.0.0.251) without any pre-configured DNS server. This enables zero-configuration networking: a printer can advertise _ipps._tcp services on the local multicast domain, and a laptop can discover it immediately without manual IP entry or server setup.

04

Browsing and Resolving Phases

Discovery is a two-phase process:

  1. Service Browsing (Enumeration): A client sends a PTR record query for a service type (e.g., _http._tcp.local.). The response is a list of PTR records pointing to all available instance names (e.g., ServerA._http._tcp.local., ServerB._http._tcp.local.).
  2. Service Resolving: For a selected instance, the client performs consecutive SRV and TXT record lookups on the instance name. The SRV record provides the target hostname and port, and the TXT record provides optional configuration metadata. This separation allows clients to first see what's available before committing to a connection.
05

TXT Records for Metadata and Configuration

TXT records are a flexible mechanism for advertising service metadata and configuration parameters. Each TXT record contains a set of key-value pairs (e.g., txtvers=1, path=/printer/lobby, adminurl=http://...). This allows service providers to advertise capabilities (paper sizes supported), connection parameters, or human-readable descriptions without requiring a separate protocol handshake. Clients can read this metadata during the resolve phase to make informed connection decisions.

06

Inherent Decentralization and Scalability

When used with mDNS, DNS-SD is a fully decentralized protocol. There is no central registry or single point of failure; each service advertises itself, and each client performs its own queries. This makes the system highly robust for local network discovery. For larger, managed networks, DNS-SD can be implemented using traditional, authoritative DNS servers, allowing centralized management of service records. This dual-mode capability supports scaling from small ad-hoc networks to large enterprise domains.

DNS-SD

Frequently Asked Questions

DNS-Based Service Discovery (DNS-SD) is a core protocol for enabling agents in a multi-agent system to find each other without manual configuration. These questions address its core mechanics, use cases, and how it fits within modern orchestration architectures.

DNS-Based Service Discovery (DNS-SD) is a protocol that allows network services, such as agents in a multi-agent system, to advertise their availability and be discovered by clients using standard DNS queries. It works by publishing SRV (Service) records to map a service name to a specific hostname and port, and TXT records to provide additional metadata about the service's capabilities and configuration. A client discovers services by performing a DNS query for a service type (e.g., _agent-protocol._tcp.local.), receiving a list of SRV records pointing to available instances, and then optionally querying their associated TXT records for details.

Key Mechanism: The protocol leverages the existing, ubiquitous DNS infrastructure, making it a zero-configuration solution for local networks (often paired with Multicast DNS (mDNS)) and a scalable one for wider networks using unicast DNS.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.