Domain Name System (DNS)
A distributed hierarchical naming system that resolves domain names into records used to locate and configure internet services.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/domain-name-system/
01What it means
The Domain Name System (DNS) is a distributed hierarchical database and protocol for looking up information associated with domain names. Resolvers query authoritative name servers and cache records such as addresses, mail routes, aliases, and service metadata for a defined time to live. DNS maps names to records; it is not web hosting or a URL redirect service.[1][2][3]
- 01ClientName + record type
- 02Recursive resolverChecks cache
- 03DNS hierarchyFollows referrals
- 04Authoritative serverReturns answer
- 05Cache + returnReuse within TTL
Resolvers and clients may reuse the answer until its time to live expires.
02Why it matters
Nearly every web request and API call begins with name resolution. DNS choices control where traffic goes and affect availability, migration speed, email delivery, certificate validation, incident response, and how quickly configuration changes reach users.
03When to use it
Use DNS whenever a stable human-readable or service name must locate changing infrastructure or publish standardized service information. Do not use it as a real-time database: caching and distributed propagation mean changes are not instantaneous or globally atomic.
04How it works
- A client gives a domain name and record type to a recursive resolver, often using a locally cached answer first.
- If needed, the resolver follows referrals through the DNS hierarchy toward authoritative name servers.
- An authoritative server returns the requested record, an alias, a delegation, or a negative answer.
- The resolver validates DNSSEC information when configured and returns the result to the client.
- Resolvers and clients cache the answer according to its time to live before querying again.
- Operators monitor authoritative service, delegation, record correctness, expiry, and resolution from relevant regions.
05A practical example
Before moving an API to a new load balancer, a team lowers the record's TTL in advance. It updates the address record during the migration, keeps the old endpoint available while cached answers expire, and checks authoritative and external resolution before retiring it.
06Where it breaks
DNS answers can be cached beyond an operator's immediate control, so changes are not instant. DNS does not guarantee that the destination service works, encrypt ordinary queries by default, or authenticate records without mechanisms such as DNSSEC; configuration and registrar compromise can redirect broad traffic.
Common mistakes
- Changing a record during an incident and expecting every resolver to observe it immediately.
- Confusing domain registration, DNS hosting, web hosting, and HTTP redirects.
- Removing old infrastructure before previous cached records have safely expired.
- Monitoring only the application while ignoring delegation, authoritative servers, and resolver behavior.
07Sources
- Domain Names—Concepts and Facilities (RFC 1034)RFC Editor · Internet StandardDomain Names—Concepts and Facilities (RFC 1034)
- Domain Names—Implementation and Specification (RFC 1035)RFC Editor · Internet StandardDomain Names—Implementation and Specification (RFC 1035)
- The Domain Name SystemICANN · Institutional overviewThe Domain Name System