Network Load Balancer
A Network Load Balancer (NLB) is a type of load balancer that operates at the transport layer (Layer 4) of the OSI model, primarily handling TCP, UDP, and TLS traffic. It distributes incoming network traffic across multiple targets, such as EC2 instances, containers, or IP addresses, based on IP protocol data, without inspecting the application content. NLBs are designed for high performance, ultra-low latency, and can handle millions of requests per second while maintaining a single static IP address per Availability Zone.
Developers should use a Network Load Balancer when building applications that require extreme performance, such as gaming servers, IoT applications, or real-time streaming services, due to its ability to handle volatile traffic patterns with minimal latency. It is also ideal for scenarios where preserving the source IP address of clients is crucial, like for security logging or geolocation, and for protocols that don't require content-based routing, such as TCP-based databases or custom protocols.