Domain Name System — the distributed directory that maps names to addresses
What is DNS?
DNS — the Domain Name System — is the internet's distributed, hierarchical phone book. Every time you type a hostname into a browser, curl, or SSH, DNS translates that human-readable name into the IP address the network actually needs to route your packets.
Designed by Paul Mockapetris and published in RFC 1034/1035 in 1987, DNS replaced the single centralized HOSTS.TXT file that had been manually distributed to every host on ARPANET. It is now the largest distributed database in the world, answering trillions of queries per day with no single point of control.
Key Concepts
DNS Hierarchy
Caching Layers
A DNS query rarely reaches an authoritative server. Before hitting the network, it passes through several cache layers, each with its own TTL budget: the browser's internal DNS cache, the OS stub resolver, the local recursive resolver (often your router or ISP), and finally the authoritative nameserver. Each hop that has a cached answer stops the chain and returns immediately.
Negative caching (NXDOMAIN responses) is also stored for the duration of the SOA record's minimum TTL, preventing repeated lookups for names that do not exist.
Common Resource Record Types
in-addr.arpa. zone. Used by mail servers and logging tools.Full Recursive Resolution — step by step
When you look up dns.ximg.app and nothing is cached anywhere, here is exactly what happens:
a.root-servers.net) for dns.ximg.app. The root doesn't know the answer but returns a referral to the .app TLD servers.ximg.app's authoritative nameservers (e.g., ns1.linode.com).dns.ximg.app: 172.238.205.61.Resolver Types
dig — the definitive DNS query tool
nslookup — interactive and scripted lookups
host — simple one-line lookups
What DNSSEC Solves
Plain DNS has no authentication. A network attacker can intercept a UDP query and inject a forged response — a cache poisoning attack (Kaminsky attack, 2008) — redirecting users to malicious servers with no visible indication. DNSSEC adds cryptographic signatures to DNS records, allowing resolvers to verify that responses are authentic and unmodified.
DNSSEC does not encrypt queries (use DoH or DoT for that). It only provides authenticity and integrity via public-key signatures.
The Chain of Trust
Root of Trust
The chain terminates at the DNS Root Zone, which is signed by ICANN's Root Zone Management Partners. Recursive resolvers ship with the Root Zone's public key (the "trust anchor") hard-coded. This key is rotated periodically — the first root key rollover happened in 2018, causing disruption for resolvers that hadn't updated their trust anchors.
Validation status is indicated by the AD (Authenticated Data) flag in DNS responses. Use dig +dnssec +adflag to check whether a resolver is validating DNSSEC for a given name.
DNS over HTTPS / DNS over TLS
https://1.1.1.1/dns-query1.1.1.1:853Verdict
SRV records are a solution to problems most systems don't have. In theory they let you advertise service endpoints — host, port, priority, weight — directly in DNS. In practice they are almost never what you actually need, they are poorly supported across tooling, and every system that adopts them ends up building a second discovery layer alongside them anyway.
The record type has existed since 2000 (RFC 2782). In that time the only places it achieved meaningful adoption are Kerberos/Active Directory (where you have no choice), XMPP (a protocol the internet mostly abandoned), SIP telephony (a stack that everyone working in it hates), and a handful of other niche protocols. That is not a track record — that is a warning.
What an SRV record looks like
The five fields
_http, _xmpp, _sip. Must be registered with IANA or you are just making things up._tcp or _udp. That is the entire range of options. No TLS, no QUIC, no SCTP unless you feel like it.Why they cause more problems than they solve
_myservice._tcp.example.com — you are supposed to register the service name with IANA. Nobody does this. Everyone invents names and then wonders why nothing interoperates.Who actually uses them
Active Directory / Kerberos — The one legitimate large-scale use case. AD publishes SRV records for domain controllers, Kerberos KDCs, and LDAP servers because the protocol spec requires it and Windows clients are built to look them up. If you are not running AD, this does not apply to you.
SIP / VoIP — Telephony vendors use SRV for SIP trunk discovery. SIP is also a protocol famous for being painful to operate, and SRV is one of many reasons why.
XMPP — Federated chat servers discover each other via SRV. XMPP federation is one of the few things in tech that works exactly as designed and that almost no one uses.
Kubernetes kube-dns — Generates SRV records for named service ports. You never write these by hand; the control plane manages them. The fact that k8s uses SRV internally and hides it from you entirely is the correct approach.
Notice the pattern: every use case is either a legacy enterprise protocol from the early 2000s, a system you have no choice about, or an abstraction layer that hides the SRV record from the operator. That is the clearest possible signal.
Bottom line
If a colleague proposes adding SRV records to solve a service-discovery or load-balancing problem, ask two questions: which clients will actually look up this record? and what does this give us that a proper load balancer or service registry does not? If there are no good answers, the SRV record is infrastructure theater — complexity added to look thorough, not because it helps anything.
The record type is not wrong. It is simply almost never the right tool, and the engineers who reach for it first are usually the same ones who will want to implement a full internal PKI next week.