What is DNS?
DNS translates human-readable domain names into IP addresses.
techpaths.dev → DNS lookup → 76.76.21.21
How DNS Resolution Works
This entire chain takes 20-120ms on first lookup. Subsequent lookups are served from cache.
DNS Record Types
| Record | Purpose | Example |
|---|---|---|
| A | Domain → IPv4 | techpaths.dev → 76.76.21.21 |
| AAAA | Domain → IPv6 | techpaths.dev → 2606::... |
| CNAME | Alias to another domain | www → techpaths.dev |
| MX | Mail server | → mail.google.com |
| TXT | Verification, SPF, DKIM | v=spf1 include:... |
| NS | Authoritative name servers | → ns1.cloudflare.com |
TTL and Propagation
Before a migration: Lower TTL to 60s a day before, make the change, then raise it back.
GeoDNS — Global Load Balancing
Anycast Routing
Multiple servers share the same IP. Network routes each user to the nearest one.
DNS Failover
Key Takeaway
- DNS resolution is a chain: Browser → Resolver → Root → TLD → Authoritative
- TTL controls cache duration — lower TTL = faster propagation
- GeoDNS routes users to nearest data center
- Anycast routes to nearest server sharing the same IP
- Use Cloudflare for DNS — fastest globally, free, DDoS protection included