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 BalancerNetwork Load BalancerGateway Load Balancer
Best forHTTP(S) applications and APIsTCP/UDP, extreme performance, static IPsInline security appliances
PerformanceLayer 7; inspects requestsLayer 4; lowest latency, very high connection ratesLayer 3 pass-through with GENEVE
LimitsRules, listeners and targets quotas per load balancerTargets per zone and per load balancer; fixed listener limitOne listener; small fixed target limit
SecuritySecurity groups, TLS, WAF, built-in authenticationSecurity groups, TLS, source IP preservedThe appliances provide the inspection
CostHourly plus LCU-hoursHourly plus NLCU-hoursHourly per zone plus GLCU-hours, plus endpoint charges

Scaling and topology

ClientsALB (layer 7)routes by path, host, headerHTTPSAPI target group/api/*Lambda target/images/*Admin servicehost: admin.*
An Application Load Balancer routes each HTTP request by its path, host name or headers

Limits and constraints

ItemValueContextSource
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

ScenarioWhat happens to cost
Many small HTTP servicesOne shared ALB with host and path rules is cheaper than one load balancer per service.
High-throughput TCP serviceAn NLB handles it without the per-rule evaluation of an ALB; capacity units are driven by connections and bytes.
Inspection of all trafficGWLB 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

SituationChooseWhy
A web shop routes /api to one service and images to another.Application Load BalancerPath-based routing is an ALB feature.
A multiplayer game uses UDP and partners allow-list fixed IPs.Network Load BalancerUDP support and static IPs per zone.
All traffic must pass a vendor firewall fleet that scales with load.Gateway Load BalancerIt 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

Related

Courses and lessons

Services, comparisons and patterns

Sources

Independent study material, not affiliated with or endorsed by Amazon Web Services.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake