AWS Elastic Load Balancing
Learn how Elastic Load Balancing spreads traffic across healthy targets and how to choose ALB, NLB, or legacy CLB for AWS workloads.
AWS Elastic Load Balancing distributes incoming traffic across multiple targets so one failing instance does not take the whole application offline. For DevOps teams, it matters because it lets teams add or replace capacity behind a stable endpoint while still protecting users from unhealthy instances. Instead of relying on one fragile manual configuration, you can design a repeatable service boundary that stays stable while the workload behind it changes.
Elastic Load Balancing: Traffic Distribution
Core ideas
The main ideas to understand are Application Load Balancer works at layer 7 and understands HTTP and HTTPS requests; Network Load Balancer works at layer 4 for TCP and UDP traffic and is built for very high performance; Classic Load Balancer is the legacy option that still appears in older environments but lacks the flexibility of newer services; and target groups, health checks, and listener rules decide where requests go and when a target should be removed from rotation. These details shape architecture decisions, but they also shape day-to-day operations. When a team chooses defaults without understanding how the service behaves under failure, scale, or security review, the platform often becomes harder to debug than the application itself.
| Type | Layer | Best fit |
|---|---|---|
| ALB | Layer 7 | HTTP and HTTPS apps needing smart routing |
| NLB | Layer 4 | TCP or UDP services needing low latency |
| CLB | Legacy | Older stacks that have not been modernised |
From an operations perspective, the goal is to pick the correct balancer type, register the right targets, and make health checks reflect real application readiness rather than a port-only probe. The comparison below highlights the choices that usually matter first. It is often better to start with a simpler design and add sophistication only after metrics, incidents, or delivery requirements prove the change is necessary.
Practical commands
aws elbv2 describe-load-balancers --query 'LoadBalancers[].{Name:LoadBalancerName,Type:Type,DNS:DNSName}' --output table
aws elbv2 describe-target-groups --query 'TargetGroups[].{Name:TargetGroupName,Protocol:Protocol,Port:Port}' --output table
aws elbv2 describe-target-health --target-group-arn arn:aws:elasticloadbalancing:REGION:ACCOUNT:targetgroup/app-tg/1234567890abcdef
Practical CLI checks make the service easier to support in real environments. Use the commands below to inspect the current state and confirm that automation matches intent. Before you promote a change, verify listener ports, target group health states, and deregistration behaviour before shifting production traffic. A safe default is graceful draining and application-level health checks that prove the dependency chain is usable. That discipline makes later troubleshooting, scaling, and security reviews far less painful.
ELB Types
Which AWS load balancer type operates at layer 7 of the OSI model?
Target health
What decides whether a target should continue receiving traffic from an ELB target group?