Networking & Traffic Management
DNS Resolution
Turning a hostname into an IP address walks a chain of caches and authoritative servers — and along the way, DNS itself becomes a crude but effective load-balancing and failover tool.
- Resolution chain: browser cache → OS cache → recursive resolver (often the ISP or a public one like 8.8.8.8) → root servers → TLD servers → authoritative nameserver
- TTL controls how long a record is cached — low TTL enables fast failover and traffic shifting, at the cost of more lookups hitting the authoritative server
- DNS round-robin (returning multiple A records in rotation) gives coarse load distribution, but clients and resolvers cache results, so it is not real-time load balancing
- GeoDNS / latency-based routing returns a different IP depending on the resolver's location — often the very first routing decision in a global architecture
- DNS runs mostly over UDP (port 53) with TCP fallback for large responses, and is itself an eventually-consistent, cache-heavy system — propagation after a change is not instant
| Record | Purpose |
|---|---|
| A / AAAA | Hostname → IPv4 / IPv6 address |
| CNAME | Alias — one hostname points to another hostname |
| NS | Delegates a zone to a set of authoritative nameservers |
| MX | Mail server for the domain |
| TXT | Arbitrary text — domain verification, SPF/DKIM policy |