Skip to content

Overview

Architecture

A Network Load Balancer (or NLB) is a Layer 4 (TCP/UDP) load balancer that distributes incoming traffic to Compute instances managed by an Instance Pool.

Terminology

Several types of load balancing strategies are available during service configuration:

Round Robin
incoming traffic will be forwarded to each member of the Instance Pool in equal proportions and in circular order.
Source-Hash
incoming traffic will be balanced on different members of the target Instance Pool depending on the source IP address. A given source IP address will always forward to the same Instance.
Maglev-Hash
consistent hashing with minimal disruption. Each destination will receive an almost equal number of connections.

There is no difference in terms of raw performance between the strategies. The choice depends on your specific application and needs.

Features

A NLB is composed of several services, each bound to an Instance Pool that resides in the same zone as the NLB. Services will efficiently forward connections reaching the NLB’s IP address to the member instances of the Instance Pool.

While the instances remain individually accessible through their public IP, the NLB will expose a single IP address for all services and distribute the incoming traffic across the members of the Instance Pool following the service’s rules.

NLB services will update automatically when the Instance Pool scales up or down, distributing traffic across all reachable member instances of the pool and excluding unreachable ones by using an integrated health check functionality.

NLB acts only on incoming traffic, so all return traffic from the backend to the client that originated the request goes out directly from the pool member instance.

Each NLB is composed of services, each with its own configuration. Each NLB service can target a different Instance Pool residing in the same zone as the NLB, and is independent from other services.

Each NLB Service is composed of the following parts:

  • A target Instance Pool
  • A load balancing strategy
  • A triplet indicating the Protocol, Service Port and Target Port for the traffic to be balanced.
  • A Health Check probe

Note

While it’s possible to edit and modify most of the parameters of a service, it is not possible to modify the targeted Instance Pool. Moreover, an Instance Pool cannot be deleted if it is targeted by a service.

Network Load Balancer supports labels.

For service limits, quotas, and zone availability, see NLB Limits and Quotas.

Last updated on