Layer 7 Load Balancer

Definition

Load balancer that works at the application layer, routing traffic based on content like URLs, headers, and cookies for optimized performance.

Use Cases

Provider Equivalents

Frequently Asked Questions

What's the difference between a Layer 7 load balancer and a Layer 4 load balancer?
A Layer 7 load balancer understands HTTP/HTTPS and can route based on content like URL paths (/api vs /images), hostnames (api.example.com), headers, and cookies. A Layer 4 load balancer only sees network/transport details (IP, port, TCP/UDP) and typically routes without looking inside the HTTP request. Layer 7 enables smarter routing and features like redirects and WAF integration, while Layer 4 is often simpler and can be lower latency.
When should I use a Layer 7 load balancer?
Use it when you need application-aware routing or controls, such as path/host-based routing, blue/green or canary releases using headers/cookies, TLS termination, centralized authentication, or integrating a web application firewall. It’s also useful when multiple services share the same domain and you want one entry point that routes requests to different backends.
How much does a Layer 7 load balancer cost?
Cost usually depends on (1) hours the load balancer runs, (2) how much traffic it processes (bytes/requests), and (3) enabled features (TLS termination, WAF, advanced routing, global vs regional). Cloud providers price these differently (for example, AWS ALB uses hourly plus LCU consumption; GCP HTTP(S) Load Balancing is based on forwarding rules and data processed; Azure Application Gateway pricing depends on SKU/capacity units and data; OCI charges for load balancer instances and bandwidth). The biggest cost drivers are sustained throughput, high request rates, and add-ons like WAF.

Category: networking

Difficulty: advanced

Related Terms

See Also