Network Load Balancer (NLB) instances receive requests from clients and forward requests to backend servers. This topic describes how to create and manage an NLB instance.

Prerequisites

  • A virtual private cloud (VPC) is created. For more information, see Create a VPC with an IPv4 CIDR block.
  • Before you create an NLB instance, make sure that sufficient IP addresses are available in the vSwitch in the zone where you want to create the NLB instance. To create an NLB instance, make sure that at least nine IP addresses are available in each vSwitch, including eight IP addresses for health checks and one virtual IP address. If the number of IP addresses is insufficient, an error occurs and you cannot purchase an NLB instance.

Create an NLB instance

  1. Log on to the NLB console.
  2. In the top navigation bar, select the region where the NLB instance is deployed.
  3. On the Instances page, click Create NLB.
  4. On the NLB (Pay-As-You-Go) International Site page, set the following parameters.
    ParameterDescription
    RegionSelect the region where you want to create the NLB instance.
    Network TypeSelect the network type of the NLB instance. The system allocates a public or private IP address to the NLB instance based on the network type.
    • Internal-facing: If you create an internal-facing NLB instance, a private IP address is allocated. In this case, you can access the NLB instance only over the internal network of Alibaba Cloud.
    • Internet-facing: If you create an Internet-facing NLB instance, a public IP address is allocated. In this case, you can access the NLB instance over the Internet. Internet-facing NLB instances use elastic IP addresses (EIPs) to provide services over the Internet. If you create an Internet-facing NLB instance, you are charged for EIPs, bandwidth resources, and data transfer. For more information, see NLB billable items.
    Note After the NLB instance is created, you can change its network type as needed. For more information, see Change the network type of an NLB instance.
    IP VersionSelect an IP version.
    • IPv4: If you select this option, the NLB instance can be accessed by only IPv4 clients.
    • Dual-stack Networking: If you select this option, the NLB instance can be accessed by both IPv4 and IPv6 clients.
    VPCSelect the VPC where you want to deploy the NLB instance.
    ZoneSelect zones and vSwitches.
    1. NLB supports multi-zone deployment. If the current region has two or more zones, you must select at least two zones to ensure high availability. If you select multiple zones for an NLB instance, you are not charged additional fees.
    2. You must select a vSwitch for each zone of the NLB instance. If no vSwitch is available, create one as prompted.
    3. Optional:If you set Network Type to Internet-facing, you must select an EIP for each zone of the NLB instance.
      • You can use the default setting Automatically assign EIP if no EIP is available in a zone. The system automatically creates a pay-by-data-transfer EIP and associates the EIP with your NLB instance.
      • You can also specify an existing EIP to be associated with the NLB instance.
        Important You cannot associate the following EIPs with an NLB instance:
        • Subscription EIPs
        • Pay-by-bandwidth EIPs
        • EIPs that are associated with EIP bandwidth plans other than the EIP bandwidth plan that is used by your NLB instance.
    Associate with EIP Bandwidth PlanSpecify whether to associate the NLB instance with an EIP bandwidth plan. If you select Associate with EIP Bandwidth Plan, you must select an EIP bandwidth plan. If no EIP bandwidth plan is available, click Purchase EIP Bandwidth Plan to purchase an EIP bandwidth plan. Then, return to the NLB buy page and click Refresh to select the EIP bandwidth plan that you purchased.

    We recommend that you purchase a pay-as-you-go EIP bandwidth plan. For more information about how to purchase an EIP bandwidth plan, see Create an EIP bandwidth plan.

    Note This parameter is available only if Network Type is set to Internet-facing.
    Internet Metering MethodPay-By-Data-Transfer (default): The maximum bandwidth is not guaranteed and the value is for reference only. In scenarios where demand outstrips resource supplies, the maximum bandwidth may be limited. For more information about the billing of EIPs, see EIP billing.
    Note This parameter is available only if Network Type is set to Internet-facing and Associate with EIP Bandwidth Plan is not selected.
    Instance NameEnter a name for the NLB instance.
    Resource GroupSelect the resource group to which the NLB instance belongs.
    Service-linked RoleYou must click Create Service-linked Role to create a service-linked role for NLB the first time you create an NLB instance.
  5. Click Buy Now and complete the payment as prompted.
  6. Return to the Instances page and select the region where the NLB instance is deployed to view the NLB instance.

Release an NLB instance

You can release NLB instances that are not in use to reduce costs. After you release an NLB instance, you are no longer charged for the NLB instance.

Warning If you mapped a custom domain name to the domain name or IP address of an NLB instance and you want to release the NLB instance, we recommend that you map the custom domain name to the domain name or IP address of another NLB instance to prevent service interruptions.
  1. Log on to the NLB console.
  2. In the top navigation bar, select the region where the NLB instance is deployed.
  3. On the Instances page, find the instance that you want to release and click More > Release in the Actions column.
  4. In the Release Instance message, click OK.

Related operations

OperationProcedure
Change the name of an NLB instance
  1. On the Instances page, find the NLB instance that you want to manage, move the pointer over the instance name, and then click the Change the name of an NLB instance icon.
  2. In the dialog box that appears, enter a new name and click OK.
Manage tags
Each tag consists of a key-value pair.
  • You can add at most 20 tags to an NLB instance.
  • The keys of tags that are added to an NLB instance must be unique.
Add a tag

You can use tags to classify NLB instances by purpose or owner.

  1. On the Instances page, find the NLB instance that you want to manage and move the pointer over the Tags icon in the Tag column.
    • If no tag is added to the NLB instance, click Edit.
    • If a tag is added to the NLB instance, click Edit.
  2. In the Configure Tags dialog box, select or enter a key and a value. Then, click OK.

    You can also click the Remove icon next to a tag to remove the tag from the NLB instance.

Filter by tag

You can filter NLB instances by tag.

  • On the Instances page, click Filter by Tag above the instance list.
  • Select a tag key and a tag value from the drop-down list.

    You can click Clear Filter Condition above the instance list to clear the filter conditions.

Change the zones where an NLB instance is deployed
  1. On the Instances page, find the NLB instance that you want to manage and choose More > Modify Zone/Subnet in the Actions column.
  2. In the Modify Zone/Subnet dialog box, select the check boxes of the zones and click OK.
Warning If you change the zones of an Internet-facing NLB instance, the EIPs and relevant fees may be changed. For more information, see EIP billing.
Enable or disable cross-zone load balancingAfter you enable cross-zone load balancing, NLB distributes network traffic across backend servers in different zones.
  1. On the Instances page, find the NLB instance that you want to manage and click its ID.
  2. On the Instance Details tab, you can enable or disable Cross-Zone Distribution in the Instance Property section.
Configure deletion protectionYou can enable deletion protection to prevent NLB instances from being accidentally released.
  1. On the Instances page, find the NLB instance that you want to manage and click its ID.
  2. On the Instance Details tab, click Enable Deletion Protection or Disable Deletion Protection in the Instance Property section.

    After deletion protection is enabled for an instance, you cannot release the instance. If you want to release the instance, you must disable deletion protection.

Instance
Configure the configuration read-only modeYou can enable the configuration read-only mode to prevent NLB instances from being accidentally modified.
  1. On the Instances page, find the NLB instance that you want to manage and click its ID.
  2. On the Instance Details tab, click Enable Configuration Read-Only Mode or Disable Configuration Read-Only Mode in the Instance Property section.
Instance

What to do next

Configure a listener to listen for connection requests and forward the requests to backend servers based on a specified scheduling algorithm.

References