Chapter 4: Discovery
Introduction
- Focus on creating reliable, secure channels between processes on different machines
- DNS (Domain Name System) acts as the Internet's phone book
- DNS is a distributed, hierarchical, and eventually consistent key-value store
DNS Resolution Process
- Browser first checks local cache for hostname resolution
- If not found, request goes to DNS resolver (typically from ISP)
- Root name server maps top-level domain (TLD like .com) to appropriate server
- Resolver queries TLD name server for domain info
- TLD server maps domain to authoritative name server
- Authoritative server returns final IP for hostname
Key Technical Details
- Handles subdomains through delegation
- Uses UDP for queries due to low overhead
- Currently transitioning to DNS over TLS for security
- Resolution process requires multiple round trips
- Caching used at multiple levels to improve performance
Caching & TTL (Time To Live)
- Browser, OS, and DNS resolver maintain internal caches
- Each DNS record has a TTL indicating validity period
- TTL Tradeoffs:
- Long TTL: Slower propagation of changes
- Short TTL: Higher load on name servers
- Client might not respect TTL settings
Critical Considerations
- DNS can become single point of failure
- Server unavailability + short TTL = More impacted clients
- Service becomes unreachable if DNS fails to resolve IP
- Industry moving towards DNS over TLS for security