DNS, IP, TCP, and UDP

A browser typically resolves a hostname through DNS, obtains an IP address, and establishes a transport connection to a server. IP routes packets between networks. TCP provides an ordered, reliable byte stream; UDP provides datagrams without TCP's built-in delivery and ordering guarantees.

DNS caching reduces repeated lookups but means record changes are not instantly visible everywhere. TTL controls how long many resolvers may cache an answer, although actual behavior can vary. TCP connection setup and congestion control affect latency, especially across distant regions. Modern protocols may reuse connections to avoid repeated setup costs.

Think in layers: application behavior, transport connections, and network routing fail differently. A timeout might be caused by DNS, connection establishment, packet loss, server overload, or a slow downstream dependency. Observability should distinguish these phases where possible.

Key Takeaways
  • DNS maps names to records; it does not guarantee the service is healthy.
  • TCP offers reliable ordered delivery; UDP has different trade-offs.
  • Connection reuse can reduce latency and resource overhead.
Knowledge Check

What does TLS primarily provide for a typical HTTPS connection?