AWS Certified Developer - Associate

Load Balancing AutoScaling

Network Load Balancer

In this lesson, we will explore the Network Load Balancer and its key features. The Network Load Balancer (NLB) is designed to operate at Layer 4 of the OSI model, making it an ideal solution for routing traffic based on TCP, UDP, or TLS protocols.

Key Benefit: Static IP Address

One distinct advantage of the NLB is that it assigns a fixed IP address (static or Elastic IP), which is critical for both exam requirements and real-world configurations.

Advantages of the Network Load Balancer

The NLB offers several notable benefits:

  • Retains the Client's Source IP Address:
    Unlike the Application Load Balancer (ALB) that substitutes the client's IP with a specific header, the NLB preserves the original IP address. This is particularly useful for applications that require accurate source IP visibility.

  • High Performance and Low Latency:
    Designed for high throughput, the NLB minimizes latency making it suitable for performance-critical applications.

  • Robust Target Support:
    The NLB can forward incoming traffic to various backend targets, including:

    Target TypeExample
    EC2 InstancesEC2 Instances
    ECS TasksECS Tasks
    Lambda FunctionsLambda Functions
    Application Load BalancerALB for additional routing capabilities

The diagram below illustrates a typical NLB setup:

The image illustrates a network load balancer setup, showing a user connecting via TCP/UDP/TLS to a load balancer, which then routes traffic to various targets like EC2 instances, ECS tasks, Lambda functions, and ALB.

Routing Traffic to an Application Load Balancer

One of the unique capabilities of the NLB is its ability to forward traffic to an Application Load Balancer. This feature is not available with ALBs, as they cannot route traffic to other load balancers.

The workflow for routing traffic is as follows:

  1. Traffic is sent to the Network Load Balancer.
  2. The NLB's static (or fixed) IP can be integrated into DNS settings or firewall configurations.
  3. The NLB forwards the incoming traffic to an Application Load Balancer.
  4. The ALB then routes the traffic to its designated backend targets.

The following diagram further clarifies this process:

The image is a diagram showing a network load balancer (NLB) and an application load balancer (ALB) within a VPC, directing traffic to HTTP(S) targets.

Summary

The Network Load Balancer:

  • Operates at Layer 4 of the OSI model using TCP/UDP protocols.
  • Retains the client's original source IP address.
  • Provides high performance with low latency.
  • Offers a static IP address essential for secure DNS and firewall configurations.
  • Supports routing to various backend targets, including the capability to integrate with Application Load Balancers.

This makes the Network Load Balancer an excellent choice for applications that require non-HTTP/HTTPS protocol support, enhanced performance, and reliable IP stability.

SEO Tips

For more insights on load balancing strategies in cloud environments, explore AWS Load Balancers and other cloud networking resources.

Watch Video

Watch video content

Previous
Application Load Balancer