aws-basics
πΌππ πππππππ πππ π¬ππππππ π³πππ π©πππππππ (π¬π³π©)
AWS Elastic Load Balancer (ELB) seamlessly distributes incoming traffic across EC2 instances, containers, and IP addresses within multiple Availability Zones ensuring high availability, fault tolerance, and scalability.
Published on August 14, 2025
Updated on August 14, 2025
Understanding Elastic Load Balancer (ELB)
An Elastic Load Balancer (ELB) is a service that distributes incoming traffic across multiple targets, such as EC2 instances, containers, IP addresses, and Lambda functions. It enhances the availability and fault tolerance of applications by preventing a single point of failure and ensuring that traffic is routed only to healthy targets. ELB also automatically scales its request handling capacity in response to traffic changes, ensuring optimal performance and responsiveness.
Elastic Load Balancing automatically distributes your incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones. It monitors the health of its registered targets, and routes traffic only to the healthy targets. Elastic Load Balancing scales your load balancer capacity automatically in response to changes in incoming traffic.
How Elastic Load Balancing works
You configure your load balancer to accept incoming traffic by specifying one or more listeners. A listener is a process that checks for connection requests. It is configured with a protocol and port number for connections from clients to the load balancer. Likewise, it is configured with a protocol and port number for connections from the load balancer to the targets.
Why Use Elastic Load Balancing?
High Availability: Distributes traffic across instances in multiple Availability Zones, reducing downtime risk.
Scalability: Seamlessly integrates with Auto Scaling to handle traffic spikes.
Fault Tolerance: Automatically redirects traffic from unhealthy targets to healthy ones.
Enhanced Security: Supports integration with AWS Shield and Secure Sockets Layer (SSL) termination.
Ease of Maintenance: Makes rolling updates or instance replacements seamless.
Types of Elastic Load Balancers
AWS offers three main types of ELBs, each tailored to specific use cases:
1. Application Load Balancer (ALB)
Operates at Layer 7 (Application Layer).
Best for HTTP/HTTPS traffic, microservices, and containerized applications.
Supports host-based and path-based routing.
Ideal for modern architectures like REST APIs and web apps.
Example Use Case:
A web application serving different domains (example.com and blog.example.com) can use ALB to route traffic based on the requested domain or URL path.
2. Network Load Balancer (NLB)
Operates at Layer 4 (Transport Layer).
Best for TCP/UDP traffic and high-performance, low-latency scenarios.
Can handle millions of requests per second.
Ideal for gaming applications, IoT data ingestion, and financial systems.
Example Use Case:
A high-frequency trading platform requiring ultra-low latency for processing financial transactions can use NLB.
3. Gateway Load Balancer (GWLB)
Designed for transparent traffic inspection and third-party virtual appliances.
Routes traffic through third-party services for tasks like deep packet inspection or firewalling.
Best for network appliance-based architectures.
Example Use Case:
Organizations wanting to deploy a virtual firewall for incoming traffic can use GWLB.
How ELB Works?
Traffic Routing: ELB receives incoming traffic and evaluates health checks of target instances.
Health Monitoring: Periodically checks the health of registered targets.
Routing Logic: Routes traffic to healthy targets based on configured rules (e.g., round-robin or weighted routing).
Article ID: 689e07c499771ad48f6f7e5c
Slug: understanding-elb