Create and manage NLB instances

更新时间:
复制 MD 格式

Network Load Balancer (NLB) is a Layer 4 load balancer designed for Internet of Everything (IoE) scenarios. After you create an NLB instance, you can distribute client requests to backend servers.

Prerequisites

  • You have created a Virtual Private Cloud (VPC).

  • Each vSwitch specified during NLB instance creation must have sufficient available IP addresses. The system consumes three IP addresses per vSwitch: two local IPs for backend communication and health checks, and one VIP that serves clients. The VIP remains static after creation. If a vSwitch has insufficient IP addresses, instance creation fails.

    Note

    Reserve at least eight IP addresses in each vSwitch to ensure full elasticity.

  • Your account must have the AliyunServiceRoleForNlb service-linked role. The console prompts you to create this role the first time you create an NLB instance. It grants NLB access to ENIs, EIPs, 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 Network Load Balancer (Pay-As-You-Go) page, configure the following parameters.

    Parameter

    Description

    Region

    Select the region where you want to create the instance.

    Network Type

    Select the network type. The system assigns a private or public service address accordingly.

    • Private: A private IP address is provisioned in each zone. The instance is accessible only from within the Alibaba Cloud internal network.

    • Public: A public IP address and a private IP address are provisioned in each zone. A public NLB instance uses an EIP for public access. You are charged for the EIP and for bandwidth or data transfer.

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

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

    Note

    VPC

    Select the VPC where you want to deploy the instance.

    Zone

    Select availability zones and vSwitches.

    1. NLB supports multi-zone deployment. Select at least two zones for high availability. NLB does not charge extra for multiple zones.

    2. Select a vSwitch for each zone. If none is available, create one as prompted.

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

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

      • Select an existing EIP to associate with the NLB instance.

        Important
        • Only pay-as-you-go (pay-by-data-transfer) EIPs that are not associated with an Internet Shared Bandwidth instance can be used.

        • The EIPs that you allocate to different availability zones of the same NLB instance must be of the same type.

        • An auto-assigned EIP is released when you release the NLB instance or change its network type from public to private. A manually associated EIP is retained in the NLB instance in these scenarios.

    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 EIPs to an Internet Shared Bandwidth instance. If you select Associate with EIP Bandwidth Plan, select an existing instance or click Purchase Internet Shared Bandwidth to create one. Then, return to the NLB creation page and click the Refresh icon to refresh the list.

    We recommend a pay-as-you-go Internet Shared Bandwidth instance. Create and manage an Internet Shared Bandwidth instance.

    Note

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

    Internet Metering Method

    The default billing method is Pay-By-Data-Transfer. The bandwidth peak is an upper limit, not a guarantee. During resource contention, actual bandwidth may be lower. 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

    The first time you create an NLB instance, click Create Service-Linked Role to create the required 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 and select the correct region to view your new instance.

Release an instance

Release an instance to stop incurring charges.

Warning
  • If you mapped a custom domain name to the DNS name or IP address of the NLB instance, remap it to another load balancer before releasing the NLB instance to prevent service interruptions.

  • Releasing an NLB instance permanently deletes its configurations and data, which cannot be recovered.

  • If the NLB instance is managed by another cloud service such as ACK, releasing the NLB instance causes that service to stop working. This operation cannot be reversed.

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 the More icon and select Release.

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

More operations

Actions

Procedure

Modify an instance name

On the Instances page, find the target instance, move the pointer over the instance name, click the Edit name icon, enter a new name, and then click OK.

Manage tags

  • Each tag consists of a key-value pair.

    • You can bind a maximum of 20 tags to an instance.

    • Tag keys must be unique on an instance.

  • Tags help categorize instances for easier management, for example, by purpose or owner.

  • Filter instances by tag to find specific resources.

Add or edit tags

  1. On the Instances page, find the target instance and move the pointer over the Tags 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 a tag value, and then click OK.

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

Filter by tag

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

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

Enable or disable cross-zone load balancing

When cross-zone load balancing is enabled, the NLB instance distributes traffic to backend servers across all enabled zones in the region.

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

Configure deletion protection

Deletion protection prevents accidental release of an instance.

  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.

    After you enable this feature, the instance cannot be released until you disable deletion protection.

Configure modification protection

Important

If your NLB instance is managed by ACK, do not disable modification protection. Disabling it may allow changes to the NLB instance configuration that affect the normal operation of the ACK cluster.

Modification protection prevents accidental changes to instance settings.

  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, add a listener to distribute connection requests to backend servers based on your scheduling algorithm.

References