You can select the appropriate load balancer based on your application needs. If you need flexible application management, we recommend that you use an Application Load Balancer. If extreme performance and static IP is needed for your application, we recommend that you use a Network Load Balancer. If you have an existing application that was built within the EC2-Classic network, then you should use a Classic Load Balancer.
Load Balancer Feature | Application Load Balancer |
Network Load Balancer |
Classic Load Balancer |
---|---|---|---|
Protocols | HTTP, HTTPS | TCP, UDP, TLS | TCP, SSL/TLS, HTTP, HTTPS |
Platforms | VPC | VPC | EC2-Classic, VPC |
Health checks | ✔ | ✔ | ✔ |
CloudWatch metrics | ✔ | ✔ | ✔ |
Logging | ✔ | ✔ | ✔ |
Zonal fail-over | ✔ | ✔ | ✔ |
Connection draining (deregistration delay) | ✔ | ✔ | ✔ |
Load Balancing to multiple ports on the same instance | ✔ | ✔ | |
IP addresses as targets | ✔ | ✔ | |
Load balancer deletion protection | ✔ | ✔ | |
Configurable idle connection timeout | ✔ | ✔ | |
Cross-zone load balancing | ✔ | ✔ | ✔ |
Sticky sessions | ✔ | ✔ | ✔ |
Static IP | ✔ | ||
Elastic IP address | ✔ | ||
Preserve Source IP address | ✔ | ||
Resource-based IAM Permissions | ✔ | ✔ | ✔ |
Tag-based IAM permissions | ✔ | ✔ | |
Slow start | ✔ | ||
WebSockets | ✔ | ✔ | |
PrivateLink Support | ✔ (TCP, TLS) | ||
Source IP address CIDR-based routing | ✔ | ||
Layer 7 | |||
Path-Based Routing | ✔ | ||
Host-Based Routing | ✔ | ||
Native HTTP/2 | ✔ | ||
Redirects | ✔ | ||
Fixed response | ✔ | ||
Lambda functions as targets | ✔ | ||
HTTP header-based routing | ✔ | ||
HTTP method-based routing | ✔ | ||
Query string parameter-based routing | ✔ | ||
Security | |||
SSL offloading | ✔ | ✔ | ✔ |
Server Name Indication (SNI) | ✔ | ✔ | |
Back-end server encryption | ✔ | ✔ | ✔ |
User authentication | ✔ | ||
Custom Security Policy | ✔ |
When to use a Classic Load Balancer
Never
When to use a Network Load Balancer
- when protocol is not HTTPS or HTTP
- when you need a static IP for whitelisting
- when you need unbroken encryption (not terminated on NLB)
- when using PrivateLink
- when very high performance is required (millions of requests per second)
When to use a Application Load Balancer
When not using a Network Load Balancer