All Products
Search
Document Center

Server Load Balancer:Create and manage an NLB instance

Last Updated:Mar 30, 2026

Network Load Balancer (NLB) is a next-generation Layer 4 load balancing service designed for the Internet of Everything (IoE). You can create an NLB instance to distribute requests from clients to backend servers. This topic describes how to create and manage NLB instances.

Prerequisites

  • You have created a VPC.

  • Before you create an NLB instance, ensure the vSwitches in the selected zones have sufficient IP addresses. When you create an instance, three IP addresses are used from each specified vSwitch: two local IP addresses for communicating with backend servers and performing health checks, and one virtual IP (VIP) address to provide services. The VIP address remains unchanged after it is created. Insufficient IP addresses will cause the instance creation to fail.

    Note

    To ensure the NLB instance can scale, we recommend that you reserve at least eight IP addresses in each vSwitch where the instance is deployed.

  • The AliyunServiceRoleForNlb service-linked role exists in your account. When you create an NLB instance for the first time, you are prompted to create this role. This role allows NLB to access other Alibaba Cloud services, such as elastic network interfaces, elastic IP addresses, and Internet Shared Bandwidth.

Create an instance

  1. Log on to the NLB console.

  2. In the top navigation bar, select the region in which the NLB instance is deployed.

  3. On the Instances page, click Create NLB.

  4. On the NLB (Pay-As-You-Go) buy page, configure the following parameters.

    Parameter

    Description

    Region

    Select the region where you want to deploy the instance.

    Network Type

    Select a network type for the instance. The system assigns a service address based on your selection.

    • Private: provides a private IP address in each zone. The NLB instance is accessible only from within Alibaba Cloud.

    • Public: provides a public IP address and a private IP address in each zone. By default, a public NLB instance uses an elastic IP address (EIP) to provide public access. If you select this option, you are charged for the EIP instance and for bandwidth or data transfer.

      • The EIP allows the NLB instance to be accessed from the internet.

      • The private IP address allows ECS instances within the VPC to access the NLB instance.

    Note
    • After an NLB instance is created, you can change its network type. For more information, see Change the network type of an NLB instance.

    • By default, a dual-stack instance uses its IPv4 address for public services. To use an IPv6 address for public services, you must change the network type, which incurs IPv6 gateway fees. For more information, see IPv6 gateway billing.

    VPC

    Select the VPC in which to deploy the instance.

    Zone

    Select the zones and vSwitches for your instance.

    1. NLB supports multi-zone deployment. If the current region supports two or more zones, select at least two zones to ensure high availability for your services. NLB does not charge additional fees for the zones.

    2. For each selected zone, select a vSwitch. If no vSwitch is available, create one as prompted.

    3. Optional: If you set Network Type to Public, you must select an EIP for each selected zone.

      • If no EIP is available, you can keep the default selection Auto-assign EIP. The system automatically creates a pay-as-you-go (pay-by-data-transfer) EIP with BGP (Multi-ISP) lines and basic Anti-DDoS protection, and then associates it with the NLB instance.

      • You can select an existing EIP to associate with the new NLB instance.

        Important
        • You can associate only existing pay-as-you-go (pay-by-data-transfer) EIPs that are not added to an Internet Shared Bandwidth instance.

        • The EIPs that are allocated to different zones of the same NLB instance must be of the same type.

        • An automatically assigned EIP is released with the NLB instance or when the network type is changed from public to private. Existing EIPs are not affected when the NLB instance is released or its network type is changed from public to private.

    IP Version

    Select an IP version for the instance.

    • IPv4: The NLB instance can be accessed only by clients that use IPv4 addresses.

    • Dual-stack: The NLB instance can be accessed by clients that use both IPv4 and IPv6 addresses.

    Associate with EIP Bandwidth Plan

    Select whether to add the resource to an Internet Shared Bandwidth. If you select Associate with EIP Bandwidth Plan, you must select an Internet Shared Bandwidth package. If no Internet Shared Bandwidth packages are available, click Purchase Internet Shared Bandwidth Package and complete the purchase. Then, return to the NLB purchase page and click the Refresh icon to select an Internet Shared Bandwidth package.

    We recommend that you purchase a pay-as-you-go Internet Shared Bandwidth instance. For more information, see Create and manage an Internet Shared Bandwidth instance.

    Note

    This parameter is available only when Network Type is set to Public.

    Internet Metering Method

    The default billing method is Pay-By-Data-Transfer. The peak bandwidth is for reference only and is not a service level agreement (SLA) commitment. When resource contention occurs, the peak bandwidth may be limited. For more information about EIP billing, see EIP billing.

    Note

    This parameter is available only when Network Type is set to Public and Associate with EIP Bandwidth Plan is not selected.

    Service-linked Role

    When you create an NLB instance for the first time, you must click Create Service-linked Role.

    Instance Name

    Enter a name for the instance.

    Resource Group

    Select a resource group for the instance.

  5. Click Create Now and complete the purchase as prompted.

  6. Return to the Instances page. The newly created instance appears in the selected region.

Release an instance

You can release an instance to avoid unnecessary charges.

Warning
  • If you have mapped a custom domain name to the DNS name or IP address of the NLB instance, we recommend that you point the domain to another load balancer instance before you release the NLB instance to prevent service interruptions.

  • After an NLB instance is released, its configurations and data are deleted and cannot be recovered.

  • If the NLB instance is managed by another Alibaba Cloud service, such as Container Service for Kubernetes (ACK), releasing the instance disrupts the service and the action is irreversible.

You cannot release an instance if deletion protection is enabled for it.

  1. Log on to the NLB console.

  2. In the top navigation bar, select the region in which the NLB instance is deployed.

  3. On the Instances page, find the target instance. In the Actions column, click 更多操作 and select Release.

  4. In the Release Instance dialog box, click OK.

More operations

Actions

Procedure

Modify the instance name

On the Instances page, find the target instance. Hover over the instance name, click the 修改实例名 icon, enter a new name, and then click OK.

Manage tags

  • Each tag consists of a key-value pair.

    • You can bind up to 20 tags to an instance.

    • The tag keys for an instance must be unique.

  • Tags help you categorize instances by criteria such as purpose or owner.

  • You can filter instances by tag.

Add or edit tags

  1. On the Instances page, find the target instance and hover over the 标签 icon in the Tag column.

    • If the instance has no tags, click Edit.

    • If the instance has tags, click Edit.

  2. In the Modify Tag dialog box, select or enter a tag key and tag value, and then click OK.

    You can also click the 删除 icon next to a tag to unbind it.

Filter by tag

On the Instances page, click Filter Tags above the instance list. Select a Tag Key and Tag Value.

To remove the filter, click Clear Search Condition above the instance list.

Enable or disable cross-zone load balancing

By default, after cross-zone load balancing is enabled, traffic to the NLB instance is distributed to backend servers in all enabled zones within the same region.

On the Instances page, click the ID of the target instance. In the Instance Property section, enable or disable Cross-Zone Distribution.

Configure deletion protection

Enabling deletion protection prevents an instance from being accidentally released.

  1. On the Instances page, click the ID of the target instance.

  2. On the Instance Details tab, in the Instance Property section, click Enable Deletion Protection or Disable Deletion Protection.

    You cannot release an instance with deletion protection enabled. To release the instance, you must first disable this feature.

Configure configuration read-only mode

Important

If your NLB instance is managed by Container Service for Kubernetes (ACK), modifying the NLB instance configuration after you disable configuration read-only mode may disrupt the ACK cluster.

Enabling configuration read-only mode prevents accidental configuration changes.

  1. On the Instances page, click the ID of the target instance.

  2. On the Instance Details tab, in the Instance Property section, click Enable Configuration Read-only Mode or Disable Configuration Read-only Mode.

What to do next

After you create an instance, you need to configure a listener. The listener checks for connection requests and distributes them to backend servers based on your specified scheduling algorithm.

Related topics