What it is
DNS (Domain Name System) is the Internet's phonebook and a lot more. It stores records under domain names, such as which IP addresses serve a hostname, which mail servers handle a domain, or which keys are used for DNSSEC.
Key points
- Resolvers cache answers using TTL to reduce load and latency.
- Queries usually use UDP, with TCP used for larger replies or zone transfers.
- Understanding recursion and authority explains most DNS behavior.
Concrete example
You type a URL. Before any TCP or TLS connection happens, your machine resolves the hostname through a resolver. If the resolver already cached the answer, the lookup can be microseconds. If not, it may contact several servers across the DNS hierarchy before returning the final IP.