Elastic Load Balancing (ELB) is the managed load balancing service of Amazon Web Services that automatically distributes incoming application or network traffic across multiple targets, such as EC2 instances, containers, IP addresses and Lambda functions, in one or more Availability Zones. In cloud networking, it sits at the entry point of a workload inside a VPC and turns a group of interchangeable servers into one stable, highly available endpoint.
The word elastic describes the service itself: AWS scales the load balancer capacity automatically as traffic grows or falls, so operators do not size, patch or replace load balancer appliances. ELB is the AWS-specific implementation of the broader cloud load balancer concept and works closely with security groups, Amazon Route 53, autoscaling groups and AWS Global Accelerator.
How Elastic Load Balancing routes traffic
Elastic Load Balancing works by placing load balancer nodes in each enabled Availability Zone and resolving one DNS name to the addresses of those nodes. A client connects to a node, and the node forwards the request to a registered target selected by the routing algorithm and the current health status of each target.
Every load balancer has three building blocks. Listeners check for connections on a protocol and port, such as HTTPS on 443. Rules attached to a listener decide where a request goes. Target groups hold the registered backends together with their health check settings, so one load balancer can serve many applications by sending each rule to a different target group.
Health checks are the mechanism that delivers availability. The load balancer probes each target at a fixed interval, and a target that fails a set number of consecutive checks is marked unhealthy and removed from rotation until it recovers. When cross-zone load balancing is enabled, each node spreads traffic across targets in all zones rather than only its own zone, which evens out load when zones hold different numbers of targets.
The following table lists the core components and their role in a request path.
| Component | What it defines | Typical example |
|---|---|---|
| Listener | Protocol and port that accept client connections | HTTPS on port 443 |
| Rule | Condition and action for routing a request | Path /api/* goes to the API group |
| Target group | Set of backends plus health check settings | Six containers on port 8080 |
| Health check | Probe path, interval and thresholds | GET /health every 10 s |
| Node | Per-zone capacity that receives traffic | One node per enabled zone |
Types of Elastic Load Balancing
Elastic Load Balancing offers four load balancer types, each operating at a different layer of the network stack. The choice determines which routing decisions are possible, how much latency is added and which features, such as TLS termination or static IP addresses, are available.
The Application Load Balancer works at Layer 7 and reads HTTP headers, paths, host names and query strings. The Network Load Balancer works at Layer 4, handles TCP, UDP and TLS with very low latency and can expose one static or Elastic IP address per zone. The Gateway Load Balancer inserts third-party firewalls and inspection appliances transparently by using the GENEVE encapsulation protocol on port 6081. The Classic Load Balancer is the previous generation and is kept only for legacy workloads.
| Type | OSI layer | Protocols | Best suited for |
|---|---|---|---|
| Application Load Balancer | Layer 7 | HTTP, HTTPS, gRPC, WebSocket | Web applications and microservices |
| Network Load Balancer | Layer 4 | TCP, UDP, TLS | Low-latency or non-HTTP traffic |
| Gateway Load Balancer | Layer 3 | IP packets over GENEVE | Firewall and inspection fleets |
| Classic Load Balancer | Layer 4 and 7 | TCP, SSL, HTTP, HTTPS | Legacy EC2-Classic era setups |
Key configuration parameters
A handful of settings decide how Elastic Load Balancing behaves under failure and during deployments. Defaults are reasonable for many workloads, but tuning health checks and draining usually has the largest effect on user-visible errors.
The table below summarizes the parameters that operators adjust most often, with common values and what each one affects.
| Parameter | Common range | Effect |
|---|---|---|
| Health check interval | 5 to 300 s, often 10 to 30 s | Speed of detecting a failed target |
| Unhealthy threshold | 2 to 10 failed checks | Balance between fast removal and flapping |
| Deregistration delay | 0 to 3,600 s, default 300 s | Time for in-flight requests to finish |
| Idle timeout | 1 to 4,000 s, default 60 s | How long idle connections stay open |
| Stickiness duration | 1 s to 7 days | How long a client stays on one target |
Connection draining, called the deregistration delay in current load balancers, lets a target finish open requests before it leaves the group. A delay that is too long slows rolling deployments, while a delay that is too short cuts off uploads and long API calls. Session stickiness keeps a client on one target with a cookie, but it weakens even distribution and should be a temporary measure for stateful legacy code.
Elastic Load Balancing compared with related services
Elastic Load Balancing distributes traffic within one AWS Region, which separates it from services that steer traffic globally or simply translate names. Teams often combine several of them in one architecture, so the boundaries matter.
| Service | Scope | Main job | Relationship to ELB |
|---|---|---|---|
| Elastic Load Balancing | Regional | Spread traffic across healthy targets | Baseline entry point |
| Amazon Route 53 | Global DNS | Resolve names, failover between Regions | Points alias records at load balancers |
| AWS Global Accelerator | Global edge | Anycast static IPs over the AWS backbone | Uses load balancers as endpoints |
| Amazon CloudFront | Global edge | Cache and deliver content | Uses a load balancer as origin |
A multi-Region design therefore typically uses Route 53 or Global Accelerator in front of one load balancer per Region. ELB itself never moves traffic between Regions, and a regional outage cannot be absorbed by a single load balancer, however many zones it spans.
Limitations and common mistakes
Elastic Load Balancing removes much operational work, yet several recurring misconfigurations cause outages, unexpected cost or security gaps. Most of them come from treating the load balancer as a black box.
- Shallow health checks that only test whether a port is open keep sending traffic to targets whose database connection has failed.
- Deep health checks that call shared dependencies can mark every target unhealthy at once; when all targets fail, the load balancer fails open and sends traffic to all of them anyway.
- Overly permissive security groups on targets allow traffic that bypasses the load balancer; targets should accept traffic only from the load balancer security group.
- Hard-coding load balancer IP addresses breaks clients, because Application Load Balancer addresses change; use the DNS name or a Network Load Balancer with static addresses.
- Ignoring cost drivers such as Load Balancer Capacity Units and cross-zone data transfer leads to surprising bills for idle or chatty workloads.
Sudden traffic spikes deserve special care. Capacity scales automatically, but scaling is not instantaneous, so events with an abrupt surge, such as a product launch, may need load testing in advance or a pre-warming request through AWS support.
The idea in brief
Picture a busy supermarket with ten checkout lanes and one staff member at the entrance who points each shopper to the shortest open lane. If a register breaks, that person stops sending people there. Elastic Load Balancing plays that role for a website or application running on AWS.
Visitors always use one address, while the service quietly spreads their requests across many servers and skips any server that stops responding. When more visitors arrive, the service grows by itself. The result is an application that stays online when individual servers fail.
A practical scenario
An online ticketing platform runs its checkout API on twelve containers spread across three Availability Zones in one AWS Region. An Application Load Balancer terminates HTTPS with a certificate from AWS Certificate Manager and sends requests under /checkout to one target group and /search to another, each with its own health check on a /health path every 10 seconds.
During a rolling deployment, the team sets the deregistration delay to 60 seconds so that payments in progress finish before old containers stop. When one zone suffers a network fault during a concert sale, health checks remove its four containers within about 30 seconds, and the remaining eight absorb the load while autoscaling adds replacements. The outcome is no failed checkout requests visible to buyers and a deployment window shortened from five minutes to roughly one.