Exercise 1: Layer 4 vs. Layer 7 Load Balancers — Possible Solution ==================================================================== Explanation: Per the chapter's own table, Layer 4 (Transport) is where "TCP, UDP, ports" operate, while Layer 7 (Application) is where "HTTP, DNS, SSH" operate. A load balancer's own job is to decide which backend server should handle a given piece of traffic -- what differs between the two types is exactly how much information about that traffic they're able to see and use to make that decision. A Layer 4 load balancer only has access to Transport-layer information -- source/destination IP addresses and ports, and basic TCP/UDP connection details. It can distribute traffic based on things like "which server has the fewest active connections" or a simple round-robin across IP:port combinations, but it has no visibility at all into what's actually inside the traffic -- it can't read an HTTP URL path, a hostname, or a cookie, because none of that exists yet at the layer it operates on. It's fast and simple precisely because it isn't inspecting or understanding the application data being carried. A Layer 7 load balancer operates at the Application layer, meaning it actually understands the protocol being carried -- per the chapter's own example, HTTP specifically. This lets it make routing decisions based on the actual content of a request: the URL path (e.g. routing /api/* to one set of servers and /images/* to another), the hostname in the request, cookies, or headers. This is strictly more capable than a Layer 4 load balancer, but it also requires more processing work, since it has to actually parse and understand the application protocol rather than just reading connection-level metadata. The colleague's proposed switch from Layer 4 to Layer 7 would trade some raw simplicity/speed for the ability to make smarter, content-aware routing decisions -- a real, practical tradeoff directly explained by which OSI layer each type of load balancer actually operates at. WHY THIS WORKS AS AN ANSWER ------------------------------ This explains specifically what information is and isn't visible at each layer (connection metadata only vs. actual application content), using the chapter's own table entries for layers 4 and 7, rather than a vague "Layer 7 is smarter."