AWS · Comparison
ALB vs NLB vs Gateway Load Balancer
Which Elastic Load Balancing type fits my traffic: Application, Network or Gateway Load Balancer?
Decision summary
Pick by protocol and purpose:
- HTTP or HTTPS, with routing by path, host or header: Application Load Balancer.
- TCP, UDP or TLS, very high performance, static IPs, or a PrivateLink service: Network Load Balancer.
- Sending traffic through a fleet of firewalls or inspection appliances: Gateway Load Balancer.
An NLB can also sit in front of an ALB when you need static IPs and HTTP routing together.
Best fit for each option
Application Load Balancer
Web apps, REST and gRPC APIs, microservices and containers that need content-based routing, TLS termination, user authentication or WAF.
Network Load Balancer
TCP or UDP services, millions of requests per second, static or Elastic IP addresses, preserving client IPs, and exposing services through PrivateLink.
Gateway Load Balancer
Deploying and scaling third-party firewalls, intrusion prevention or deep packet inspection appliances transparently in the traffic path.
Side by side
| Application Load Balancer | Network Load Balancer | Gateway Load Balancer | |
|---|---|---|---|
| Best for | HTTP(S) applications and APIs | TCP/UDP, extreme performance, static IPs | Inline security appliances |
| Performance | Layer 7; inspects requests | Layer 4; lowest latency, very high connection rates | Layer 3 pass-through with GENEVE |
| Limits | Rules, listeners and targets quotas per load balancer | Targets per zone and per load balancer; fixed listener limit | One listener; small fixed target limit |
| Security | Security groups, TLS, WAF, built-in authentication | Security groups, TLS, source IP preserved | The appliances provide the inspection |
| Cost | Hourly plus LCU-hours | Hourly plus NLCU-hours | Hourly per zone plus GLCU-hours, plus endpoint charges |
Scaling and topology
Limits and constraints
| Item | Value | Context | Source |
|---|---|---|---|
| Rules per Application Load Balancer | 100 Can be raised with a quota request |
Source checked |
|
| Targets per Network Load Balancer | 3,000 Can be raised with a quota request |
Source checked |
|
| Listeners per Gateway Load Balancer | 1 Fixed limit |
Source checked |
Quotas and limits change. Check the linked source before designing around a number.
Cost trade-offs by scenario
| Scenario | What happens to cost |
|---|---|
| Many small HTTP services | One shared ALB with host and path rules is cheaper than one load balancer per service. |
| High-throughput TCP service | An NLB handles it without the per-rule evaluation of an ALB; capacity units are driven by connections and bytes. |
| Inspection of all traffic | GWLB charges plus appliance instances and licences; compare with Network Firewall for your volume. |
Prices differ by Region and change over time; see the pricing pages linked under Sources.
When to avoid each option
Application Load Balancer
- Non-HTTP protocols.
- You need a static IP address on the load balancer itself.
Network Load Balancer
- You need path or host routing, redirects or user authentication: an NLB does not read HTTP.
Gateway Load Balancer
- Ordinary application load balancing.
- Native AWS inspection, where Network Firewall may be simpler.
Example scenarios
| Situation | Choose | Why |
|---|---|---|
A web shop routes /api to one service and images to another. | Application Load Balancer | Path-based routing is an ALB feature. |
| A multiplayer game uses UDP and partners allow-list fixed IPs. | Network Load Balancer | UDP support and static IPs per zone. |
| All traffic must pass a vendor firewall fleet that scales with load. | Gateway Load Balancer | It distributes traffic across appliances transparently. |
Exam cues
- HTTP routing, containers, Lambda targets, WAF: ALB.
- Static IP, UDP, extreme performance, PrivateLink: NLB.
- Third-party virtual appliances: GWLB.
Service pages
- Elastic Load Balancing (ELB) · Managed load balancers that spread traffic across healthy targets: Application (HTTP), Network (TCP/UDP) and Gateway (appliances).
Related
Courses and lessons
- Elastic Load Balancing: ALB vs NLB vs Gateway Load Balancer · AWS Solutions Architect – Associate (SAA-C03) · Members
Services, comparisons and patterns
- Elastic Load Balancing (ELB) · Service
- AWS Network Firewall · Service
- AWS PrivateLink · Service
- AWS Global Accelerator · Service
Sources
Independent study material, not affiliated with or endorsed by Amazon Web Services.