Simple Enough Blog logo
  • Home 
  • Projects 
  • Tags 

  •  Language
    • English
    • Français
  1.   Blogs
  1. Home
  2. Blogs
  3. Introduction to AWS ELB

Introduction to AWS ELB

Posted on March 15, 2025 • 5 min read • 975 words
Aws   Devops   Getting-Started   Helene  
Aws   Devops   Getting-Started   Helene  
Share via
Simple Enough Blog
Link copied to clipboard

In 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.

On this page
I. Introduction to Load Balancers in AWS   II. General Operation of ELBs   Diagram: ELB, Listeners, and Target Groups   A. SSL/TLS Termination: Security and Performance   B. Sticky Sessions: Seamless User Experience   C. Auto Scaling: Intelligent Elasticity   III. Types of Elastic Load Balancer   A. Application Load Balancer (ALB)   B. Network Load Balancer (NLB)   C. Gateway Load Balancer (GWLB)   IV. ELB Comparison Table   V. Real-world Use Cases   Example 1: Web Application with Microservices   Example 2: Low-latency Financial Application   Example 3: Network Security and Filtering   VI. Deployment Best Practices   Conclusion   đź”— Helpful Resource  
Introduction to AWS ELB
Photo by Helene Hemmerter

I. Introduction to Load Balancers 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.


II. General Operation of ELBs  

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.

Diagram: ELB, Listeners, and Target Groups  

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.

ELB, Listeners, and Target Groups Diagram

Key features include:

  • SSL/TLS termination: Offloading SSL decryption at the load balancer level.
  • Sticky sessions: Maintaining user sessions on the same backend target.
  • Autoscaling: Native integration with Auto Scaling Groups.

A. SSL/TLS Termination: Security and Performance  

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.

B. Sticky Sessions: Seamless User Experience  

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.

C. Auto Scaling: Intelligent Elasticity  

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.


III. Types of Elastic Load Balancer  

AWS offers three main types of ELB:

A. Application Load Balancer (ALB)  

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.

B. Network Load Balancer (NLB)  

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.

C. Gateway Load Balancer (GWLB)  

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.

ELB Diagram: ALB, NLB, GWLB


IV. ELB Comparison Table  

FeatureALBNLBGWLB
OSI Layer7 (Application)4 (Transport - TCP/UDP)3 (Network - IP)
Supported ProtocolsHTTP, HTTPSTCP, UDP, TLSIP
Advanced RoutingYes (path, header, host, etc.)NoNo
ECS/EKS IntegrationYesYesNo
PerformanceMedium to HighVery HighHigh
Common Use CaseWeb apps, REST APIsDatabases, VoIPNetwork inspection, firewall

V. Real-world Use Cases  

Example 1: Web Application with Microservices  

An e-commerce site uses an ALB to route requests:

  • /products → product service
  • /cart → shopping cart service
  • /checkout → third-party payment service with SSL authentication

The ALB manages routing rules efficiently while integrating with ECS containers.

Example 2: Low-latency Financial Application  

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.

Example 3: Network Security and Filtering  

A company deploys a GWLB in front of a firewall cluster. It allows dynamic insertion of these appliances without altering existing architecture.


VI. Deployment Best Practices  

For optimal use of ELBs on AWS:

  • Choose the right type of load balancer based on protocol and performance needs.
  • Configure effective health checks to avoid routing traffic to unhealthy targets.
  • Use dynamic target groups, especially with services like Auto Scaling or ECS.
  • Enable access logs (ALB and NLB) for auditing and debugging.
  • For sensitive apps, combine WAF (Web Application Firewall) with ALB.

Conclusion  

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.


đź”— Helpful Resource  

  • AWS Official Documentation on Elastic Load Balancing
 1000: The Magic Number in the World of LLMs
Amazon EventBridge vs Amazon SNS: Which Solution to Choose? 
  • I. Introduction to Load Balancers in AWS  
  • II. General Operation of ELBs  
  • III. Types of Elastic Load Balancer  
  • IV. ELB Comparison Table  
  • V. Real-world Use Cases  
  • VI. Deployment Best Practices  
  • Conclusion  
  • đź”— Helpful Resource  
Follow us

We work with you!

   
Copyright © 2026 Simple Enough Blog All rights reserved. | Powered by Hinode.
Simple Enough Blog
Code copied to clipboard