AWS Elastic Load Balancing Comparison

AWS Elastic Load Balancing

Deciding between Layer 7, Layer 4, and Layer 3

ALB: APPLICATION NLB: NETWORK GLB: GATEWAY

The Ingredients: Traffic Types

What kind of data are you serving?

Layer 7: Application

Handles high-level requests like HTTP, HTTPS, and gRPC. It looks at the content of the message.

  • URL Path Routing
  • Host Header Routing
  • User Cookies

Layer 4: Transport

Handles raw connections like TCP, UDP, and TLS. It focuses on speed and performance.

  • Ultra-low Latency
  • Millions of RPS
  • Static/Elastic IPs

Layer 3: Network

Handles IP Packets. Used for transparently passing traffic through security appliances.

  • Firewall Inspection
  • Intrusion Detection
  • Bump-in-the-wire

The Traffic Flow Process

Visualizing how traffic hits the OSI layers

LAYER 7 (APP) LAYER 4 (TRANS) LAYER 3 (NET) ALB NLB GLB Containers EC2 Fleet Appliances

ALB Process

Terminates SSL, inspects headers, and routes to specific target groups based on URL paths.

NLB Process

Passes traffic through with zero inspection. Best for handling sudden spikes and massive loads.

GLB Process

Acts as a single entry/exit point for traffic. Routes to 3rd party firewalls for deep packet inspection.

Key Decision Matrix

Feature Application (ALB) Network (NLB) Gateway (GLB)
OSI Layer Layer 7 Layer 4 Layer 3
Protocols HTTP, HTTPS, gRPC TCP, UDP, TLS IP
Latency Millisecond (Higher) Microsecond (Lowest) Variable (Appliance dependent)
Static IP No (DNS only) Yes (Elastic IP) No
Primary Use Case Microservices / Web Apps Gaming / High-perf Finance Network Security / Firewalls

© 2023 Architecture Visualized • AWS Cloud Educational Series

Documentation Best Practices Pricing

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top