All Products
Search
Document Center

Server Load Balancer:Overview of NLB instances

Last Updated:Aug 22, 2023

Network Load Balancer (NLB) instances receive requests from clients and distribute requests across backend servers based on the forwarding rules that you configure on listeners. To use the NLB service, you must create an NLB instance and add listeners and backend servers to the NLB instance.

Instance status

Instance status

Description

Lock

Whether the NLB instance can be deleted

Whether the configuration can be changed

Running

The NLB instance is running as expected.

N/A

Based on whether delete protection is enabled.

  • Delete protection is enabled: yes.

  • Deletion protection is disabled: no.

Based on whether the configuration read-only mode is enabled.

  • Configuration read-only mode is enabled: yes.

  • Configuration read-only mode is disabled: no.

Creating

The NLB instance is being created.

N/A

No

No

Updating Configuration

The configuration of the NLB instance is being updated.

N/A

No

Creation Failed

The NLB instance fails to be created.

N/A

Yes

Stopped

The NLB instance stops running is stopped.

Locked (Overdue Payment): The NLB instance is locked due to overdue payments. Renew your NLB instance at the earliest opportunity. The NLB instance resumes after it is unlocked.

No

Locked (Associated Resources in Abnormal State): The elastic IP addresses (EIPs) or Internet Shared Bandwidth instances that are associated with the NLB instance are locked due to overdue payments. Renew the EIPs or Internet Shared Bandwidth instances at the earliest opportunity. The NLB instance resumes providing services after the associated resources are unlocked.

No

Locked (Associated Resources Overdue and Released): The EIPs or Internet Shared Bandwidth instances that are associated with the NLB instance are released due to overdue payments and the NLB instance is unavailable. We recommend that you release the NLB instance.

Yes

Network types

Alibaba Cloud provides Internet-facing and internal-facing NLB instances.

You can change the network type of an NLB instance as needed. For more information, see Change the network type of an NLB instance.

  • After you switch an Internet-facing NLB instance to an internal-facing NLB instance, all EIPs are disassociated from the NLB instance and the domain name of the NLB instance is resolved to a private IP address instead of an EIP.

  • To switch an internal-facing NLB instance to an Internet-facing NLB instance, you must associate EIPs with the NLB instance. In this case, you are charged for data transfer over the Internet.

Internet-facing NLB

After you create an Internet-facing NLB instance, the system automatically allocates a public and a private IP address to each zone of the NLB instance.

  • An Internet-facing NLB instance uses a public IP address to provide services over the Internet. Requests from the Internet are forwarded to backend servers based on the forwarding rules that you configure on listeners.

  • The private IP address of an Internet-facing NLB instance can be accessed by Elastic Compute Service (ECS) instances that are deployed in the virtual private cloud (VPC) to which the NLB instance belongs.

Internal-facing NLB

After you create an internal-facing NLB instance, the system automatically allocates a private IP address to each zone of the NLB instance.

  • An internal-facing NLB instance uses a private IP address to provide services and distributes requests from the internal network to backend servers based on the forwarding rules that you configure on listeners.

  • An internal-facing NLB instance cannot be accessed over the Internet.

IP versions

NLB supports IPv4 and dual-stack networking.

IP version

Default value

Description

IPv4

  • An IPv4 Internet-facing NLB instance is assigned a public IPv4 address and a private IPv4 address in each zone.

  • An IPv4 internal-facing NLB instance is assigned a private IPv4 address in each zone.

Clients can use only IPv4 addresses, such as 192.0.2.0, to access an IPv4 NLB instance.

Dual stack

  • A dual-stack Internet-facing NLB instance is assigned a public IPv4 address and an IPv6 address in each zone.

  • A dual-stack internal-facing NLB instance is assigned a private IPv4 address and an IPv6 address in each zone.

Clients can use IPv4 addresses, such as 192.168.0.1, and IPv6 addresses, such as 2001:db8:1:1:1:1:1:1, to access a dual-stack NLB instance.

Note

You can determine the network type of a dual-stack NLB instance based on the network type of its IPv4 address. If the IPv4 address is a private IP address, the NLB instance is internal-facing. If the IPv4 address is a public IP address, the instance is Internet-facing.

Cross-zone load balancing

By default, cross-zone load balancing is enabled for NLB. When this feature is enabled, each NLB node distributes network traffic across backend servers in all zones specified for cross-zone load balancing within a region. When this feature is disabled, each NLB node distributes network traffic only across backend servers within the current zone.

The following example shows how cross-zone load balancing works. In this example, the round-robin scheduling algorithm is used. Two nodes are deployed for NLB to provide load balancing services. One of them is deployed in Zone A. The other is deployed in Zone B. The node in Zone A is associated with two ECS instances. The node in Zone B is associated with eight ECS instances. When the round-robin scheduling algorithm is used, network traffic is evenly distributed across the NLB nodes, which means that each zone of NLB receives 50% of network traffic. Then, the NLB nodes distribute the network traffic across backend servers in the specified zones.

  • When cross-zone load balancing is enabled, each ECS instance in the zones receives 10% of the network traffic. This is because the NLB node in each zone routes 50% of the network traffic to all 10 ECS instances. nlb_cross1

  • When cross-zone load balancing is disabled, each ECS instance in Zone A receives 25% of the network traffic and each ECS instance in Zone B receives 6.25% of the network traffic. nlb_cross2

Domain names

Each NLB instance has a domain name. You can configure CNAME records to resolve your custom domain name to the domain name of an NLB instance. This facilitates access to network resources. Clients can use the custom domain name specified in the CNAME record to access the NLB instance. The DNS server resolves the custom domain name to the domain name of the NLB instance.

The domain name of an Internet-facing NLB instance or an internal-facing NLB instance can be resolved to an IP address.

  • The domain name of an Internet-facing NLB instance is mapped to multiple public IP addresses (one in each zone) to enable Internet access. In addition, a private IP address is available in each zone of an Internet-facing NLB instance. The private IP addresses can be accessed by ECS instances in the VPC to which the NLB instance belongs.

  • The domain name of an internal-facing NLB instance is mapped to multiple private IP addresses (one in each zone). The private IP addresses can be accessed by ECS instances in the VPC to which the NLB instance belongs.