ELB Fundamentals

Load Balancing & Traffic Distribution

What is ELB?

Load Distribution

Distributes incoming traffic across multiple targets

High Availability

Automatically routes around unhealthy instances

Managed Service

Fully managed by AWS with automatic scaling

Multi-AZ

Operates across multiple Availability Zones

ELB Types

Application Load Balancer (ALB)

Layer 7 (HTTP/HTTPS) with advanced routing

Network Load Balancer (NLB)

Layer 4 (TCP/UDP) ultra-high performance

Gateway Load Balancer (GWLB)

Layer 3 for third-party virtual appliances

Classic Load Balancer (CLB)

Legacy - Layer 4 & 7 (not recommended)

Application Load Balancer (ALB) Features

Path-Based Routing

Route based on URL path

  • • /api/* → API servers
  • • /images/* → Image servers
  • • /admin/* → Admin servers

Host-Based Routing

Route based on hostname

  • • api.example.com → API targets
  • • web.example.com → Web targets
  • • mobile.example.com → Mobile targets

Target Groups

Logical grouping of targets

  • • EC2 instances
  • • IP addresses
  • • Lambda functions

Health Checks

Health Check Path

HTTP endpoint to check target health

Interval & Timeout

Configurable check frequency and timeout

Thresholds

Healthy/unhealthy threshold counts

Status Codes

Expected HTTP response codes

Load Balancing Algorithms

Round Robin

Requests distributed evenly across targets

Least Outstanding Requests

Route to target with fewest active requests

Flow Hash (NLB)

Hash-based routing for session persistence

Security Features

SSL/TLS Termination

Decrypt HTTPS traffic at load balancer

Security Groups

Control inbound/outbound traffic

WAF Integration

Web Application Firewall protection

Access Logs

Detailed request logging to S3

ELB Fundamentals Exam Tips

  • • ALB operates at Layer 7 and supports path/host-based routing with WebSocket support
  • • NLB operates at Layer 4 with ultra-high performance and static IP addresses
  • • Health checks determine target availability - unhealthy targets receive no traffic
  • • Cross-zone load balancing distributes traffic evenly across all AZs
  • • ELB automatically scales but cannot handle sudden traffic spikes - use pre-warming
Back to HA & Scalability Next: Auto Scaling Groups