Which type of load balancer routes traffic based on URL or headers?

Test your Systems Design Concepts knowledge with our comprehensive quiz. Utilize flashcards and multiple choice questions to enhance your study session. Prepare thoroughly with detailed explanations for each answer and ace your examination!

Multiple Choice

Which type of load balancer routes traffic based on URL or headers?

Explanation:
Routing by URL or HTTP headers requires inspecting the contents of the HTTP request, which happens at the application layer. A Layer 7 load balancer acts as an HTTP reverse proxy, terminates the client connection, and examines the URL path, host header, cookies, and other HTTP headers to decide which backend pool to send the request to. This enables fine-grained routing like sending /api to one set of servers and /static to another, or routing based on a specific header. In contrast, a Layer 4 load balancer makes decisions only from transport-layer information—IP addresses and TCP/UDP ports—without looking into the HTTP payload, so it cannot route by URL or headers. DNS-based load balancing relies on DNS responses rather than per-request inspection, and a global traffic manager typically directs traffic at a global or regional level, not based on the details inside each HTTP request. Hence, the ability to route traffic based on URL or headers comes from a Layer 7 load balancer.

Routing by URL or HTTP headers requires inspecting the contents of the HTTP request, which happens at the application layer. A Layer 7 load balancer acts as an HTTP reverse proxy, terminates the client connection, and examines the URL path, host header, cookies, and other HTTP headers to decide which backend pool to send the request to. This enables fine-grained routing like sending /api to one set of servers and /static to another, or routing based on a specific header.

In contrast, a Layer 4 load balancer makes decisions only from transport-layer information—IP addresses and TCP/UDP ports—without looking into the HTTP payload, so it cannot route by URL or headers. DNS-based load balancing relies on DNS responses rather than per-request inspection, and a global traffic manager typically directs traffic at a global or regional level, not based on the details inside each HTTP request. Hence, the ability to route traffic based on URL or headers comes from a Layer 7 load balancer.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy