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.
Glossary
DNS-Based Service Discovery (DNS-SD)

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.
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.
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.
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.
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.).
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.
Browsing and Resolving Phases
Discovery is a two-phase process:
- 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.). - 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.
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.
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.
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
DNS-Based Service Discovery (DNS-SD) is one protocol within a broader ecosystem of patterns and tools for enabling dynamic communication in distributed systems. The following terms are essential for understanding how agents and services find each other.
Service Registry
A service registry is a centralized or decentralized database that tracks the network locations and metadata of available agents or services in a distributed system. It is the authoritative source for service discovery.
- Acts as the 'phone book' for a dynamic system.
- Stores entries containing IP addresses, ports, health status, and capability metadata.
- Can be implemented as a standalone component (e.g., Consul, etcd) or embedded within a platform (e.g., Kubernetes).
Multicast DNS (mDNS)
Multicast DNS (mDNS) is a protocol that resolves hostnames to IP addresses within small local networks without requiring a dedicated DNS server. It is a foundational technology for zero-configuration networking, often used alongside DNS-SD.
- Uses multicast UDP packets to query for services on the local link.
- Enables devices like printers and smart home gadgets to be discovered automatically.
- The
.localdomain is reserved for mDNS hostnames.
Health Check & Heartbeat
A health check is a periodic probe to verify an agent's operational status, while a heartbeat is a periodic signal from an agent to maintain its registration. These mechanisms are critical for registry accuracy.
- Health Checks: Can be active (registry probes the agent) or passive (agent reports status).
- Heartbeats: Prevent stale entries; failure to send a heartbeat triggers deregistration.
- Often implemented alongside a lease mechanism, where registration is time-bound and must be renewed.
Client-Side vs. Server-Side Discovery
These are two fundamental architectural patterns for implementing service discovery.
- Client-Side Discovery: The service consumer (client) queries the registry directly and is responsible for load balancing between available instances. This adds logic to the client but reduces hops.
- Server-Side Discovery: An intermediary (like a load balancer or API gateway) queries the registry. The client sends a request to a stable endpoint, and the intermediary handles routing. This centralizes complexity.
Service Mesh
A service mesh is a dedicated infrastructure layer for managing service-to-service communication in a microservices architecture. It abstracts service discovery, load balancing, and security into a network of lightweight proxies.
- Proxies (data plane) are deployed as sidecars alongside each service.
- A control plane manages configuration and policy.
- Tools like Istio and Linkerd provide these capabilities, often integrating with various service registries.
Dynamic Registration & Deregistration
Dynamic registration is the process by which agents automatically add themselves to a registry upon startup. Deregistration is the removal of an agent's entry, either gracefully upon shutdown or due to failure.
- Enables fully automated lifecycle management without manual intervention.
- Graceful deregistration is crucial for preventing request failures during deployments or scaling events.
- Often implemented via startup/shutdown hooks that call the registry's API.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us