Gateway Load Balancer
A layer 3 load balancer that sends all network traffic through a fleet of third-party virtual appliances such as firewalls, using GENEVE.
What it is
Many companies must inspect all their network traffic with third-party appliances: firewalls, intrusion detection and prevention systems (IDS/IPS), deep packet inspection, payload manipulation. Running a fleet of these appliances, scaling it and keeping traffic flowing through it is hard.
The Gateway Load Balancer (GWLB) is built to deploy, scale and manage such virtual appliances in AWS. It works at layer 3 (IP packets, all ports) and combines two jobs:
- a transparent network gateway: a single entry and exit point for all traffic;
- a load balancer that spreads that traffic across the appliances and scales with demand.
How it works
- Route tables are changed so traffic between users and the application goes to the GWLB (through a Gateway Load Balancer endpoint in the VPC).
- The GWLB forwards the packets to an appliance in its target group, wrapped in the GENEVE protocol on port 6081.
- The appliance inspects the traffic and either drops it or sends it back to the GWLB.
- Allowed traffic continues to the application. Neither side notices the detour.
The GWLB keeps each flow on the same appliance (flow stickiness), so stateful firewalls see both directions of a connection.
Target groups
- EC2 instances;
- IP addresses, which must be private IPs.
Exam tips
- "Third-party firewall / IDS / IPS / deep packet inspection appliances", "inspect all traffic" → Gateway Load Balancer.
- "GENEVE protocol on port 6081" → GWLB.
- "Layer 3" load balancer → GWLB (ALB is layer 7, NLB layer 4).
Common traps
- "Use an NLB to send traffic through firewall appliances." For transparent inspection of all traffic, GWLB is the purpose-built answer.
- "GWLB routes HTTP requests by path." It works on IP packets; it doesn't read HTTP.
Check yourself
A GWLB lab needs licensed appliance software from the AWS Marketplace and a second VPC, so instead:
A Gateway Load Balancer with the firewall instances in its target group, and Gateway Load Balancer endpoints plus route table changes in each VPC.
GENEVE on port 6081.
AWS documentation
Network Load Balancer
The layer 4 load balancer for TCP, UDP, TLS and QUIC, with static IPs per AZ, extreme performance, and instance, IP or ALB targets.
Sticky sessions and cross-zone load balancing
Keeping a user on the same target with cookies, and how cross-zone load balancing spreads traffic evenly across AZs.