AWS Network Load Balancer (NLB) – Key Concepts & Use Cases
In this lesson, we explored the Network Load Balancer (NLB), which operates at Layer 4 (TCP/UDP) of the OSI model and is designed for high-performance, low-latency workloads.
1. Key Features of Network Load Balancer
- Layer 4 Load Balancer: Unlike the Application Load Balancer (ALB), which works at Layer 7 (HTTP/S), the NLB handles TCP and UDP traffic.
- Extreme Performance: Supports millions of requests per second with ultra-low latency.
- Static IPs: Assigns one static IP per Availability Zone (AZ), and you can associate Elastic IPs for each AZ.
- Not in Free Tier: Unlike ALB, using NLB is not covered under AWS Free Tier.
When to Use Network Load Balancer?
- TCP/UDP Workloads (e.g., VoIP, gaming, or databases like MySQL).
- High-performance, high-throughput applications.
- Scenarios requiring static IPs for whitelisted access.
2. How Network Load Balancer Works
Target Groups in NLB
NLB routes traffic to target groups, which can contain:
- EC2 Instances – Directly forwards TCP/UDP traffic.
- IP Addresses – Must be private IPs, useful for hybrid architectures.
- Other AWS Load Balancers – Can be placed in front of an ALB for combining static IPs with ALB’s Layer 7 rules.
💡 Example Use Case: