Layer 4 Load Balancer

Definition

Load balancer that works at the transport layer, routing traffic based only on IP address and port number without looking at the content.

Use Cases

Provider Equivalents

Frequently Asked Questions

What's the difference between a Layer 4 load balancer and a Layer 7 load balancer?
A Layer 4 load balancer routes connections based on network and transport info like IP address, port, and protocol (TCP/UDP). It doesn’t look inside the application data. A Layer 7 load balancer understands application protocols like HTTP/HTTPS and can route based on URL path, host header, cookies, or other request content—useful for web apps and API routing.
When should I use a Layer 4 load balancer?
Use Layer 4 when you need very high performance and low latency, when you’re balancing non-HTTP protocols (TCP/UDP), or when you want end-to-end encryption pass-through (TLS terminates on the backend). Common examples include gaming (UDP), VoIP, MQTT, database proxies, and high-throughput TLS pass-through on port 443.
How much does a Layer 4 load balancer cost?
Pricing usually depends on (1) hours the load balancer runs, (2) number of connections or new connections per second, (3) processed bytes/throughput, and (4) optional features like static IPs, cross-zone balancing, or private connectivity. Exact costs vary by cloud and region, so estimate using the provider’s pricing calculator with your expected traffic volume and connection rate.

Category: networking

Difficulty: advanced

Related Terms

See Also