An Application Load Balancer (ALB) instance is an entity that provides load balancing services. This topic describes how to create an ALB instance.

Prerequisites

  • A virtual private cloud (VPC) is created. For more information, see Create a VPC with an IPv4 CIDR block and Create a VPC with an IPv6 CIDR block.
  • The service-liked role AliyunServiceRoleForAlb is attached to your Alibaba Cloud account. A service-linked role is required the first time you create an ALB instance. The service-linked role allows the ALB instance to access cloud services and resources, such as elastic network interfaces (ENIs), security groups, EIPs, and EIP bandwidth plans. For more information, see Service-linked roles for ALB.

Create an ALB instance

  1. Log on to the ALB console.
  2. On the Instances page, click Create ALB.
  3. On the Application Load Balancer buy page, set the following parameters.
    Parameter Description
    Region Select the region where you want to create an ALB instance.
    Network Type Select the network type of the ALB instance. The system assigns a public or private IP address to the ALB instance based on the selected network type. Valid values:
    • Internal: If you create an internal-facing ALB instance, a private IP address is assigned to each zone. The ALB instance is accessible only over the internal network.
    • Public-facing: If you create an Internet-facing ALB instance, a public IP address and a private IP address are assigned to each zone. Internet-facing ALB instances use EIPs to provide services over the Internet. If you select Public-facing, you are charged instance fees and bandwidth fees or data transfer fees for EIPs.
      • EIPs are used to provide services over the Internet and expose ALB instances to the Internet.
      • Private IP addresses allow ECS instances in virtual private clouds (VPCs) to access ALB instances.
    Note If an ALB instance is assigned both an IPv4 address and an IPv6 address, the IPv4 address is used to provide services over the Internet. If you need to use the IPv6 address to provide services over the Internet, you must change the network type of the ALB instance. In this case, you are charged IPv6 gateway fees. For more information, see Billing rules.
    VPC Select the VPC where you want to deploy the NLB instance.
    Zone Select a zone and a vSwitch.
    1. ALB supports multi-zone deployment. If the selected region supports two or more zones, you must select at least two zones to ensure high service availability. No additional fees are charged by ALB.
    2. Select a vSwitch in each zone that you selected. If no vSwitches are available, create one as prompted.
    3. Optional: Select an EIP in each zone that you selected.
      • Use the default setting Automatically assign EIP if no EIPs are available in the zone. The system will automatically create a pay-by-data-transfer EIP and associate the EIP with your ALB instance.
      • You can also specify an existing EIP to be associated with the ALB instance.
        Note You cannot associate the following types of EIPs with an ALB 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 the ALB instance
    IP Mode Select an IP mode for the ALB instance.
    • Static IP: Only one IP address is available in each zone. The IP address cannot be changed. An ALB instance that uses a static IP address supports at most 100,000 queries per second (QPS).
    • Dynamic IP: One or more IP addresses are available in each zone. The number of IP addresses that the ALB instance uses varies based on your workloads. This mode supports up to one million QPS.
    IP Version Select an IP version.
    • IPv4: If you select this option, the ALB instance can be accessed only by IPv4 clients.
    • Dual-stack Networking: If you select this option, the ALB instance can be accessed by both IPv4 and IPv6 clients.
    Note
    • The dual-stack feature is not available by default. To use the feature, log on to the Quota Center console. On the Whitelist Quotas page, enter the quota ID slb_user_visible_gray_label/support_ipv6, and click Apply.
    • For more information about regions in which dual-stack is supported, see Overview of ALB instances.
    • If you want to enable both IPv4 and IPv6, you must enable IPv6 for the vSwitches in the zones of the VPC.
    • If dual-stack is enabled for ALB, ALB can forward requests from both IPv4 and IPv6 clients to the backend servers.
      • Dual-stack ALB instances can forward requests from IPv6 clients to backend IPv4 services of the following types: ECS, elastic network interface (ENI), Elastic Container Instance, and IP. Backend services of the Function Compute type are not supported.
      • Dual-stack ALB instances can forward requests from IPv6 clients to backend IPv6 services of the following types: ECS, ENI, and Elastic Container Instance. Backend services of the Function Compute and IP types are not supported.
    • You cannot enable access control for listeners of dual-stack ALB instances.
    • You cannot upgrade existing IPv4 ALB instances to dual-stack ALB instances. You can only create dual-stack ALB instances.
    Edition Select the edition of the ALB instance.
    • Basic: Basic ALB instances support basic routing features such as request forwarding based on domain names, URLs, and HTTP headers.
    • Standard: Standard ALB instances support advanced routing features in addition to the features of basic ALB instances. Standard ALB instances support custom TLS security policies, redirects, and rewrites.
    • WAF Enabled: As an upgrade from standard ALB instances, WAF-enabled ALB instances are integrated with Web Application Firewall (WAF) 3.0 to protect your web applications. Network traffic is filtered by WAF before it is routed to ALB listeners.
    Note Limits on WAF-enabled ALB instances:
    • Before you purchase WAF-enabled ALB instances, you must complete real-name verification.
    • For more information about the regions in which WAF-enabled ALB instances are supported, see Limits on WAF-enabled ALB instances.
    • Make sure that WAF 3.0 is activated within your Alibaba Cloud account.
      • If WAF is not activated in your Alibaba Cloud account, a pay-as-you-go WAF 3.0 instance is created after you create a WAF-enabled ALB instance.
      • If a WAF 2.0 instance already exists in your Alibaba Cloud account, release the WAF 2.0 instance or migrate data from the WAF 2.0 instance to a WAF 3.0 instance. (Automatic migration is not supported. If you want to migrate data, join the DingTalk group 34657699 for consultation). For more information about how to release a WAF 2.0 instance, see Terminate the WAF service.
    • You can upgrade only basic and standard ALB instances that are in the Running state to WAF-enabled ALB instances.

    For more information about the differences among basic ALB instances, standard ALB instances, and WAF-enabled ALB instances, see Functions and features.

    Associate with EIP Bandwidth Plan By default, the maximum Internet bandwidth for an ALB instance is 400 Mbit/s. If you require higher bandwidth, associate the ALB 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 plans are available, click Purchase EIP Bandwidth Plan to purchase an EIP bandwidth plan. Then, return to the ALB 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 when Network Type is set to Public-facing.
    Billing Method By default, Pay-by-Data-Transfer is selected. The maximum bandwidth is used for reference only. It indicates the upper limit of the bandwidth. In case of resource contention, the bandwidth allocated to each ALB instance may be lower than its maximum bandwidth value. For more information about the billing of EIPs, see EIP billing.
    Note This parameter is available only when Network Type is set to Public-facing and Associate with EIP Bandwidth Plan is not selected.
    Instance Name Enter a name for the ALB instance.
    Resource Group Select the resource group to which the ALB instance belongs.
    Note A service-linked role is required the first time you create an ALB instance. The service-linked role allows ALB to access cloud services and resources, such as ENIs, security groups, EIPs, and EIP bandwidth plans. For more information,see Service-linked roles for ALB
    Note This parameter is displayed only the first time you create an ALB instance.
  4. Click Buy Now and complete the payment.
  5. Return to the Instances page and select the region where the ALB instance is deployed to view the ALB 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