7. DNS
One-liner. A distributed, cached, hierarchical name-to-address lookup — and often the first 20–100 ms of a request.
Memorize
- Resolution: stub resolver → recursive resolver → root → TLD → authoritative.
- Records:
A,AAAA,CNAME(not at zone apex),MX,TXT,NS,SOA,CAA. - TTL controls caching; negative caching follows the SOA minimum.
- Resolvers are shared and may ignore your TTL; propagation is not instant.
- Anycast puts the same resolver IP in many places (1.1.1.1, 8.8.8.8) for low latency.
- DNSSEC signs answers; it authenticates, it does not encrypt.
dig +tracewalks the hierarchy;dig +shortis the quick answer.
Trap. Changing a record and expecting immediate global effect — old TTLs must expire. Do this. Lower the TTL a day before a migration, then raise it after.
Check
Which record type can you not place at a zone apex?
Why
A CNAME cannot coexist with the mandatory SOA/NS records at the apex; use an alias/A records instead.