AWS Compare 高频对比

ALB vs NLB vs GWLB

ALB vs NLB vs GWLB

compareALBNLBGWLB
Last organized

Choose an Elastic Load Balancing type by protocol layer, content routing, static IP requirements, and appliance insertion.

One-line choice

  • ALB: HTTP/HTTPS, host/path/header routing, and microservice entry points.
  • NLB: TCP/UDP/TLS, very low latency, high throughput, and static IPs.
  • GWLB: transparent insertion and scaling of firewalls, IDS/IPS, and DPI appliances.

Comparison

DimensionALBNLBGWLB
Primary layerLayer 7Layer 4Layer 3
TrafficHTTP, HTTPS, WebSocket, gRPCTCP, TLS, UDPIP packet inspection
Core strengthContent routing and multiple target groupsStatic IP/EIP and low latencyGENEVE encapsulation and appliance scale
Fixed public IPPrimarily DNS-basedStatic IP per AZ; optional EIPTraffic enters through GWLBe and route tables
Typical targetinstance, ip, lambdainstance, ip, albfirewall / IDS / IPS appliance

Exam boundaries

  • Need both fixed ingress IPs and Layer 7 routing: NLB → ALB.
  • An HTTP health check does not make an NLB a Layer 7 proxy.
  • An NLB TLS listener terminates TLS; TCP 443 can pass it through.
  • GWLB distributes traffic but does not implement firewall policy itself.
  • An Active load balancer does not mean its targets are healthy.
  • Cross-zone controls node-to-target routing; it is not the same as Multi-AZ.

Remember

Choose ALB for HTTP semantics, NLB for connections and static IPs, and GWLB for a security-appliance service chain.