ELB

a managed load balancer

Load Balancer

Distributing Traffic

High Availability

Scalability and Elasticity

Session Persistence

SSL/TLS Termination

Health Checks and Monitoring

Traffic Shaping and Prioritization

evenly distribute incoming network traffic across multiple servers or instances

routing traffic to healthy servers

scale horizontally by adding or removing servers dynamically

remove unhealthy or underperforming servers from the pool

handle SSL/TLS encryption and decryption, offloading this resource-intensive task from backend servers

often perform health checks on backend servers

prioritize or shape traffic based on specific rules or policies

AWS guarantees that it will be working

AWS takes care of upgrades, maintenance, high availability

AWS provides only a few configuration knobs

Integrated with AWS services

EC2

EC2 ASG

ECS

AWS Certificate Manager (ACM),

CloudWatch

Route53

Types of AWS Load Balancer

ALB

NLB

GWLB

Layer 7

Target groups

feature used to group and route incoming traffic to targets

Support for HTTP/2 and WebSocket

Support redirects

Instances

Container

IP Address

Routing tables

Route to different target groups

path in URL

hostname in URL

Query String, Header

Greate fit for

Microservices

Container-based Application

Dynamic Port Mapping

Health checks are at the target group level

The true IP of the client is inserted in the header X-Forwarded-For

Layer 4

Forward TCP & UDP traffic

Handle millions of request per seconds

Less latency ~100 ms

has one static IP per AZ

Target groups

EC2 Instances

IP Address

ALB

must be private IP

Deploy, scale, and manage a fleet of 3rd party network virtual appliances in AWS

Firewall

Intrusion Detection and
Prevention Systems

Deep Packet Inspection
Systems

Layer 3 (Network layer)

Use GENEVE protocol on port 6081

Target groups

EC2 instances

IP Address

Must be private IP

Sticky Session

same client is always redirected to the same
instance

Work for ALB NLB

Cookie name

Application-based Cookies

Custom cookie

Application cookie

Generated by target

Can include custom attributes

Don't use

AWSALB

AWSALBAPP

AWSALBTG

Generated by the ELB

Name

AWSALBAPP

Duration-based Cookies

Cookie generated by the load balancer

Cross-Zone Load Balancing

With

Without

distributes evenly
across all registered instances in all AZ

distributed in the instances of the
node