Decision Rules
The classic tradeoffs from across this course, distilled to one line each and the concrete condition that tips the choice.
Choose TCP: reliability, ordering, and congestion control are built in, at the cost of handshake and head-of-line-blocking latency.
Choose UDP: no connection setup, no retransmission stalls - the application (or a protocol built on top, like QUIC) handles reliability if it needs any at all.
Choose L4 load balancing: it forwards connections based on the IP/port 4-tuple alone, so it is fast and protocol-agnostic, but it cannot route on URL path, headers, or cookies.
Choose L7 load balancing: it terminates and inspects the request, which costs more CPU per connection but unlocks content-based routing.
Choose a forward proxy: it sits in front of clients, hiding their identity and enforcing outbound policy (content filtering, egress control).
Choose a reverse proxy: it sits in front of servers, hiding their identity and topology while handling TLS termination, caching, and routing.
Choose symmetric crypto: one shared key, orders of magnitude faster than public-key crypto, which is exactly why TLS uses it for the bulk data transfer after the handshake.
Choose asymmetric (public-key) crypto: a public/private keypair lets strangers authenticate and agree on a key without ever transmitting a secret, at a steep computational cost - which is why it is used to bootstrap the connection, not to encrypt the whole payload.
Choose IPv6: the address space problem that forced NAT and CGNAT workarounds onto IPv4 simply does not exist, and there is no reason to inherit IPv4's exhaustion for a design starting from zero.
Choose IPv4 (or dual-stack): a green-field preference for IPv6 does not override a hard compatibility requirement with infrastructure that only speaks IPv4.
Choose polling: plain request/response on a timer, trivial to build and debug, at the cost of wasted requests and staleness up to the poll interval.
Choose WebSockets: one persistent full-duplex connection carries updates in both directions with no per-message handshake overhead.
Choose SSE (Server-Sent Events): a one-way stream over plain HTTP, simpler to operate than WebSockets (works through ordinary HTTP infrastructure, auto-reconnects) when you only need server-to-client push.
Choose unicast: a single, addressable destination - the normal case for most client-server traffic.
Choose anycast: the same IP address is announced from multiple locations, and routing delivers each request to the topologically closest live instance - how large-scale DNS and CDN edge nodes achieve low latency and failover without client-side logic.