What is the difference between ALB, NLB, and CLB in AWS?

Medium Topic: AWS June 17, 2026

AWS provides three types of load balancers under the Elastic Load Balancing (ELB) service, each designed for different use cases.

Application Load Balancer (ALB)

Operates at Layer 7 (HTTP/HTTPS).

  • Routing: Content-based routing by URL path, host, headers, query strings
  • Protocols: HTTP, HTTPS, WebSockets, HTTP/2, gRPC
  • Use cases: Microservices, container-based apps, web applications
  • Features: Sticky sessions, authentication (Cognito, OIDC), Lambda targets, WAF integration
Example: Route /api/* to API servers, /images/* to image servers

Network Load Balancer (NLB)

Operates at Layer 4 (TCP/UDP).

  • Performance: Handles millions of requests per second with extremely low latency
  • Protocols: TCP, UDP, TLS
  • Use cases: High-performance gaming, financial trading, IoT, real-time streaming
  • Features: Static IP addresses, Elastic IP support, preserves source IP

Classic Load Balancer (CLB)

Operates at Layer 4 and Layer 7 (legacy).

  • Status: Legacy – AWS recommends migrating to ALB or NLB
  • Protocols: HTTP, HTTPS, TCP, SSL
  • Limitation: Less feature-rich, cannot route to targets by port

Comparison

FeatureALBNLBCLB
OSI Layer744/7
ProtocolsHTTP/HTTPSTCP/UDPHTTP/HTTPS/TCP
LatencyLowUltra-lowMedium
Static IPNoYesNo
WebSocketsYesYesLimited
Path routingYesNoNo

When to Use Which

  • ALB: Most web applications, microservices, REST APIs, gRPC
  • NLB: Ultra-high performance, TCP/UDP apps, Static IP requirement, gaming
  • CLB: Avoid for new workloads – migrate to ALB or NLB
← Previous What is the difference between SQS, SNS, and... Next → How does AWS Auto Scaling work and what...

Practice Similar Questions

Back to AWS Topics