Dung (Donny) Nguyen

Senior Software Engineer

AWS Load Balancer

AWS Load Balancer is a fully managed service that automatically distributes incoming application traffic across multiple targets, such as EC2 instances, containers, and IP addresses. This helps to improve the performance, availability, and scalability of our applications.

Key benefits of using AWS Load Balancer:

Types of AWS Load Balancers:

AWS offers four types of load balancers, each operating at a different layer of the network stack and optimized for different workloads.

1. Application Load Balancer (ALB)

Operating at Layer 7 (the application layer) of the OSI model, the ALB makes routing decisions based on the content of the request, such as the URL path, HTTP headers, host name, query string, or HTTP method.

Key features:

Use cases:

2. Network Load Balancer (NLB)

Operating at Layer 4 (the transport layer), the NLB routes traffic based on IP protocol data (TCP, UDP, and TLS). It is designed for ultra-high performance and low latency, capable of handling millions of requests per second.

Key features:

Use cases:

3. Gateway Load Balancer (GWLB)

Operating at Layer 3 (the network layer), the GWLB is used to deploy, scale, and manage a fleet of third-party virtual network appliances, such as firewalls, intrusion detection/prevention systems (IDS/IPS), and deep packet inspection tools.

Key features:

Use cases:

4. Classic Load Balancer (CLB)

The CLB is the legacy load balancer that operates at both Layer 4 and basic Layer 7. It was the original Elastic Load Balancing offering and is now largely superseded by the ALB and NLB.

Key features:

Use cases:

Quick comparison:

Feature ALB NLB GWLB CLB
OSI Layer 7 (Application) 4 (Transport) 3 (Network) 4 & 7
Protocols HTTP, HTTPS, gRPC, WebSocket TCP, UDP, TLS IP (GENEVE) TCP, SSL, HTTP, HTTPS
Content-based routing Yes No No No
Static IP No (use with Global Accelerator) Yes No No
Primary use case Web apps, microservices High-performance, low latency Security appliances Legacy applications

Distributing technique of AWS Load Balancer:

By using AWS Load Balancer, we can improve the performance, availability, and scalability of our applications while reducing the complexity of our infrastructure.