Gateway Load Balancer

Learn how to distribute incoming traffic across multiple appliances using the Gateway Load Balancer.

Gateway Load Balancers (GLB) operate on the network layer, the third layer of the OSI model, and allow us to maintain, scale, and deploy third-party virtual appliances such as intrusion detection systems. A virtual appliance is a software package that includes an operating system, application software, and virtual hardware configuration required to run a virtual machine platform.

Press + to interact

These load balancers act as a gateway (a single point of entry and exit) and distribute incoming traffic across multiple appliances, scaling them up or down according to our applications’ requirements, decreasing the risk of potential failure.

Listeners and target groups

Gateway Load Balancers check for incoming requests through processes known as listeners. Unlike the listeners in ALB and NLB, we can not specify the port and protocol while creating a listener for Gateway Load Balancers. GLB listeners check for IP packets across all ports.  Rules in a listener specify the target group for a specific request.

Virtual appliances are registered as targets in target groups for Gateway Load Balancers. Target groups can have multiple registered targets, and regular health checks are performed on these targets. GLBs ensure that traffic is routed only to healthy targets. Following are some of the things we must keep in mind while creating target groups for a Gateway Load Balancer:

  • Protocol and port: Target groups for GLB support only the GENEVE protocol and port 6081.

  • Target type: Only EC2 instance IDs and IP addresses are supported as the target type for GLB target groups. Publicly accessible IP addresses are not supported by GLB.

  • Deregistering targets: GLB stops sending new requests to targets that are deregistered and in case of existing requests, it closes the connection if it has been idle for more than 120 seconds.

Gateway Load Balancer endpoint

A Gateway Load Balancer is deployed in the same VPC as the target group. GLB endpoint is a VPC endpoint that allows us to create a private connection link between the virtual appliances in our provider VPC and application servers in our consumer VPC. The application server and GLB endpoints are deployed in different subnets. The following diagram shows how GLB endpoints are used.

Press + to interact
GLB endpoints
GLB endpoints

In the diagram above, traffic coming from the internet uses the internet gateway to get to the GLB endpoint located in the consumer VPC. This endpoint routes this traffic to the Gateway Load Balancer, which distributes this traffic to the virtual appliance (the target of the GLB). Once the virtual appliance analyzes the traffic, it is sent back to the Gateway Load Balancer, which sends it to the application servers located in the consumer VPC.

Get hands-on with 1300+ tech skills courses.