AWS Network Load Balancer (NLB) is an Amazon Web Services (AWS) tool that distributes end user traffic across multiple cloud resources to ensure low latency and high throughput for applications. Amazon NLB manages Transmission Control Protocol (TCP) traffic at Layer 4 of the Open Systems Interconnection (OSI) reference model. AWS designed the Network Load Balancer to handle millions of end user requests per second and unpredictable spikes in end user traffic to ensure high availability for cloud applications.
Network Load Balancer performs health checks on what it calls "targets" -- which can be an EC2 instance, IP address, microservice or container -- to ensure that it routes traffic to high-performing resources. When a target becomes slow or unavailable, the Network Load Balancer routes traffic to another target. If the service does not detect any healthy targets within a given Availability Zone (AZ), it can fail over to resources in another AZ. If the Network Load Balancer itself becomes unresponsive, integration with Amazon Route 53 can direct traffic to an alternate load balancer in another region.
Using Network Load Balancer
An administrator can set up load balancing by using the AWS Management Console or AWS Command Line Interface. First the administrator must define one or multiple listeners to receive connection requests from end users through the port and protocol the administrator has defined. The listeners then forward requests to a target group the administrator has created.
Network Load Balancer uses one static IP address per Availability Zone that applications use as the front-end IP. The load balancer also enables AWS customers to assign an Elastic IP per Availability Zone, and it records end user IP addresses for back-end application processing. Along with the Application Load Balancer, Network Load Balancer replaces Amazon's deprecated Elastic Load Balancing tool.
The tool is API-compatible with the Application Load Balancer to give IT teams more programmatic load balancing control, and it also integrates with other Amazon services, such as Auto Scaling and CloudFormation.