ladderlore
Request a guide
  • Type a service name, like S3 or IAM.

Service · Networking and Content Delivery · Builds on CLF-C02

Network Load Balancer and Gateway Load Balancer

Network Load Balancer for fast layer 4 traffic and static IPs. Gateway Load Balancer for security appliances.

You know from Cloud Practitioner

  • A load balancer spreads traffic over healthy targets in several Availability Zones.
  • The Application Load Balancer (ALB) works at layer 7 and routes by path, host and header.
Read the Cloud Practitioner lesson
  • Layer

    ALB
    7: HTTP, HTTPS, gRPC
    NLB
    4: TCP, UDP, TLS
    GWLB
    3: IP packets
  • Routing

    ALB
    Path, host, header
    NLB
    Port and protocol
    GWLB
    To an appliance fleet
  • IP address

    ALB
    DNS name only
    NLB
    Static or Elastic IP per zone
    GWLB
    Through endpoints
  • Source IP

    ALB
    X-Forwarded-For header
    NLB
    Kept for instance targets. For IP targets with TCP or TLS it is off by default and can be turned on.
    GWLB
    Preserved
  • Pick it for

    ALB
    Web apps, microservices
    NLB
    Speed, static IPs, PrivateLink
    GWLB
    Firewalls, inspection
The three load balancer types side by side.

1 / 3

  • Layer

    ALB
    7: HTTP, HTTPS, gRPC
    NLB
    4: TCP, UDP, TLS
    GWLB
    3: IP packets
  • Routing

    ALB
    Path, host, header
    NLB
    Port and protocol
    GWLB
    To an appliance fleet

2 / 3

  • IP address

    ALB
    DNS name only
    NLB
    Static or Elastic IP per zone
    GWLB
    Through endpoints
  • Source IP

    ALB
    X-Forwarded-For header
    NLB
    Kept for instance targets. For IP targets with TCP or TLS it is off by default and can be turned on.
    GWLB
    Preserved

3 / 3

  • Pick it for

    ALB
    Web apps, microservices
    NLB
    Speed, static IPs, PrivateLink
    GWLB
    Firewalls, inspection
The three load balancer types side by side.
Inspect traffic with an appliance?
Gateway Load Balancer
TCP, UDP or static IP needed?
Network Load Balancer
Application Load Balancer
yesnoyesno
Choosing a load balancer.

What it is

A Network Load Balancer (NLB) works at layer 4. It handles TCP, UDP and TLS, millions of requests per second and very low latency. It gets one static IP address per Availability Zone, and you can attach your own Elastic IP address, which suits firewall allow lists. It keeps the client’s source IP address for instance targets. For IP targets with TCP or TLS this is off by default, so the target sees the load balancer’s IP address. It can send traffic to instances, IP addresses and an ALB, and it is the front of a PrivateLink endpoint service.

What it is

A Gateway Load Balancer (GWLB) works at layer 3. It sends all traffic through a fleet of virtual appliances, such as firewalls and intrusion detection, using the GENEVE protocol on port 6081. The appliances inspect the traffic and send it back. The application sees nothing change. An ALB has no static IP. If you need static IPs with HTTP routing, put an NLB in front of the ALB or use Global Accelerator.

Remember

  • ALB: HTTP, HTTPS, gRPC. Path, host and header rules, WebSocket, Lambda targets, authentication.
  • NLB: TCP, UDP, TLS. Static or Elastic IP per Availability Zone. Client IP is kept for instance targets. For IP targets with TCP or TLS it is off by default, so the target sees the load balancer’s IP. Extreme throughput.
  • GWLB: layer 3. Sends traffic to inspection appliances over GENEVE. Used with GWLB endpoints.

Remember

  • Cross-zone load balancing is on by default for ALB, and off by default for NLB and GWLB.
  • NLB can have an ALB as a target, to get static IPs in front of an HTTP application.

On the exam

  • “Static IP addresses for a load balancer” or “ultra-low latency TCP and UDP” points to a Network Load Balancer.
  • “Route requests by URL path to different services” points to an Application Load Balancer.
  • “Route all traffic through third-party firewall appliances” points to a Gateway Load Balancer.