Introduction to AWS ELB
Posted on March 15, 2025 • 5 min read • 975 wordsIn a scalable and resilient architecture, traffic distribution is essential to ensure high availability. This is precisely the role of Elastic Load Balancers (ELB) in AWS.

An Elastic Load Balancer (ELB) acts as a traffic distributor, automatically spreading incoming traffic across multiple target resources such as EC2 instances, containers, or IP addresses.
This functionality is a cornerstone of fault-tolerant and highly available cloud application design. AWS offers three types of ELB tailored to different use cases, each with specific features.
When a user accesses your application, the request is first processed by the ELB. It evaluates routing rules and selects a healthy target based on load distribution algorithms (round robin, IP hash, etc.).
The ELB continuously monitors target health through configurable periodic health checks. If a target is deemed unhealthy, it is temporarily removed from the rotation.
The diagram below provides a structured visual representation of the logical flow of an Elastic Load Balancer (ELB) in AWS, highlighting the hierarchical relationship between key components: the Load Balancer, Listeners, and Target Groups.
On the left is the Load Balancer, acting as the unified entry point for incoming client or application requests. Just to its right are the Listeners, configured to listen on a specific port (such as 80 or 443) with a designated protocol (HTTP, HTTPS, TCP, etc.). Each listener can be associated with one or more routing rules based on conditions such as path, host, or headers. The traffic is then forwarded to the appropriate Target Groups, each containing a set of targets (EC2, ECS, IPs) that will handle the request if they are deemed healthy. Each target is monitored via health checks to ensure only healthy ones receive traffic. This visual setup emphasizes the separation of concerns between traffic routing, listening, and execution, enabling high availability, dynamic scaling, and fine-grained traffic control in modern AWS cloud architectures.

Key features include:
Elastic Load Balancers—particularly Application Load Balancers (ALB) and Network Load Balancers (NLB)—can handle SSL/TLS termination by decrypting HTTPS traffic at the load balancer level. This offloads the encryption overhead from backend instances, enhancing application performance. For example, a high-traffic e-commerce site can configure an ALB with an ACM (AWS Certificate Manager) certificate for centralized and automated certificate management. For added security, it is also possible to re-encrypt the traffic between the load balancer and targets, enabling end-to-end encryption.
In some scenarios, it is crucial for a user to remain connected to the same backend instance throughout a session—such as in shopping carts or admin dashboards. ELBs allow sticky sessions (session affinity) via application cookies or ELB-generated cookies (like AWSALB). When a client first connects, the cookie is returned and stored in the browser, ensuring subsequent requests are routed to the same target. This ensures a smooth and consistent experience, especially for applications that are not stateless.
ELBs are designed to work seamlessly with Auto Scaling Groups, dynamically adjusting the number of EC2 instances based on traffic demands. When traffic spikes, Auto Scaling adds instances; the ELB automatically registers them after health verification. Conversely, underutilized instances are gracefully removed. This ensures high availability without over-provisioning, optimizing both costs and performance. For example, an ALB-fronted REST API can absorb unexpected traffic surges (sales events, marketing campaigns) with zero downtime.
AWS offers three main types of ELB:
Specialized in HTTP/HTTPS routing, the ALB is designed for modern web applications. It supports content-based routing, headers, URL paths, and tight integration with ECS/EKS.
Optimized for low latency and high throughput, the NLB operates at the TCP layer. It’s ideal for high-performance network applications or those using non-HTTP protocols.
Enables seamless insertion of third-party security appliances into your network traffic. Operates at Layer 3 (IP) and simplifies service chaining for traffic inspection and filtering.

| Feature | ALB | NLB | GWLB |
|---|---|---|---|
| OSI Layer | 7 (Application) | 4 (Transport - TCP/UDP) | 3 (Network - IP) |
| Supported Protocols | HTTP, HTTPS | TCP, UDP, TLS | IP |
| Advanced Routing | Yes (path, header, host, etc.) | No | No |
| ECS/EKS Integration | Yes | Yes | No |
| Performance | Medium to High | Very High | High |
| Common Use Case | Web apps, REST APIs | Databases, VoIP | Network inspection, firewall |
An e-commerce site uses an ALB to route requests:
/products → product service/cart → shopping cart service/checkout → third-party payment service with SSL authenticationThe ALB manages routing rules efficiently while integrating with ECS containers.
A real-time trading platform uses an NLB for inbound TCP connections. The NLB offers static IPs and ultra-low latency, critical for the finance sector.
A company deploys a GWLB in front of a firewall cluster. It allows dynamic insertion of these appliances without altering existing architecture.
For optimal use of ELBs on AWS:
Elastic Load Balancers are a core component of modern AWS architectures. When properly configured, they enhance application availability, security, and performance. Choosing the right ELB and understanding its operation unlocks the full scalability potential of AWS cloud environments.