Classic Load Balancer (CLB) instances receive requests from clients and forward requests to backend servers. This topic describes how to create and manage a CLB instance.
Prerequisites
Before you create a CLB instance, make sure that the preparations are complete. For more information, see Preparations.
Create a CLB instance
A CLB instance is an entity that provides load balancing services. To use the CLB service, you must create a CLB instance.
Log on to the CLB console.
On the Instances page, click Create CLB.
On the CLB instance buy page, configure the parameters and click Buy Now.
Parameter
Description
Region
The region in which you want to create the CLB instance.
NoteMake sure that the CLB instance resides in the same region as the Elastic Compute Service (ECS) instances that you want to add as backend servers.
Zone Type
Specifies whether the CLB instance is deployed in one zone or across multiple zones. A zone represents an Alibaba Cloud data center that contains a set of independent infrastructure resources. The infrastructure resources such as networks, power supply, and air-conditioning in different zones are independent of each other. Therefore, if the infrastructure resources in one zone are unavailable, the other zones can still serve your workloads. Each zone belongs to a specific region. A region may contain one or more zones.
Single zone: The CLB instance is deployed in only one zone.
Multi-zone: The CLB instance is deployed across two zones. By default, the primary zone is used to distribute network traffic. If the primary zone fails, the system automatically implements a failover and continues to provide load balancing services by using the secondary zone. This ensures high service availability.
Primary Zone
The primary zone of the CLB instance. The primary zone is used to distribute network traffic.
Backup Zone
The secondary zone of the CLB instance. By default, the secondary zone is used to distribute network traffic only if the primary zone fails.
Instance Name
The custom name of the CLB instance.
SLB instance
You can create an Internet-facing CLB instance or an internal-facing CLB instance based on your business requirements. The system allocates a public or private IP address to the CLB instance based on the specified instance type. In this example, Internet is selected.
Internet: If you select this option, only a public IP address is allocated to the CLB instance. In this case, the CLB instance can provide services over the Internet.
Intranet: If you select this option, only a private IP address is allocated from the IP address pool of Alibaba Cloud to the CLB instance. In this case, the CLB instance can be accessed only from the internal network of Alibaba Cloud.
For more information, see the Instance types section of the "Overview of CLB instances" topic.
Instance Billing Method
The billing method of the CLB instance. Valid values: Pay-By-CLCU and Pay-By-Specification. In this example, Pay-By-CLCU is selected.
Specification
The specifications of the CLB instance.
The performance of the CLB instance varies based on the specifications. For more information, see the Instance specifications section of the "Overview of CLB instances" topic.
This parameter is available only if you set the Instance Billing Method parameter to Pay-By-Specification.
Network Type
The network type of the CLB instance. Default value: VPC.
This parameter is available only if you set the SLB instance parameter to Intranet.
IP Version
The IP address version that is used by the CLB instance. Valid values: IPv4 and IPv6.
VPCId
The ID of the virtual private cloud (VPC) in which the CLB instance is deployed.
This parameter is available only if you set the SLB instance parameter to Intranet.
VswitchId
The vSwitch ID.
This parameter is available only if you set the SLB instance parameter to Intranet.
Internet Data Transfer Fee
The billing method for data transfer over the Internet. Valid values:
By traffic
By bandwidth
If you set the Instance Billing Method parameter to Pay-By-CLCU, you can set the Internet Data Transfer Fee parameter only to By traffic.
NoteFor an internal-facing CLB instance, only By traffic is displayed. However, you are not charged for the data transfer.
Resource Group
The resource group to which the CLB instance belongs.
Quantity
The number of CLB instances that you want to purchase.
On the Confirm Order page, confirm the configurations of the CLB instance, select I have read and agree to Server Load Balancer Agreement of Service, and then complete the payment as prompted.
Enable or disable a CLB instance
You can enable or disable a CLB instance based on your business requirements. If a CLB instance is disabled, the CLB instance does not receive or forward requests.
Log on to the CLB console.
In the top navigation bar, select the region in which the CLB instance is deployed.
On the Instances page, find the CLB instance that you want to manage and choose or in the Actions column.
To enable or disable multiple CLB instances at a time, select the CLB instances that you want to enable or disable and click Start or Stop below the instance list.
Release a CLB instance
You can release pay-as-you-go CLB instances immediately or at a scheduled time.
You cannot release CLB instances that have deletion protection enabled. If you want to release a CLB instance that has deletion protection enabled, you must first click Disable Deletion Protection on the Instance Details tab.
If a custom domain name is resolved to the IP address of your CLB instance, we recommend that you resolve the domain name to the IP address of another CLB instance before you release the current instance. This helps prevent service interruptions.
Log on to the CLB console.
In the top navigation bar, select the region in which the CLB instance is deployed.
On the Instances page, find the instance that you want to release and choose .
To release multiple CLB instances at a time, select the CLB instances that you want to release and click Release Settings below the instance list.
In the Release Settings panel, configure the parameters and click Next.
Parameter
Description
Release
Specify how you want to release the CLB instance. Valid values:
Release
Scheduled Release
Release Time
If you select Scheduled Release, you must configure this parameter.
The system releases the CLB instance at 30-minute and hour marks. However, the billing of the CLB instance stops at the specified release time. For example, if you set the release time to 09:28:00, May 19, 2022, the billing of the CLB instance stops at 09:28:00 on May 19, 2022 but the system releases the CLB instance at 09:30:00 on May 19, 2022.
Confirm the information and click OK. In the Security Verification dialog box, enter the verification code that you received and click OK. The CLB instance is released.
Manage tags
You can add tags to CLB instances and then manage the CLB instances by tag.
Each tag is a key-value pair. Take note of the following limits before you use tags to manage CLB instances:
Tags must be added to CLB instances.
The key of each tag added to a CLB instance must be unique. If you add a new tag that uses the same key as an existing tag, the new tag overwrites the existing tag.
Tags cannot be used across regions. For example, tags that are created in the China (Hangzhou) region are not displayed in the China (Shanghai) region.
Add a tag
- Log on to the CLB console.
In the top navigation bar, select the region in which the CLB instance is deployed.
On the Instances page, find the instance that you want to manage and modify the tag.
If no tag is added to the CLB instance, add a tag first. Move the pointer over the
icon in the Tags column and click Edit.
If a tag is added to the CLB instance, move the pointer over the
icon in the Tags column and click Edit.
In the Configure Tags dialog box, enter a key-value pair or select an existing key-value pair from the drop-down list.
The Resource Management console allows you to manage all tags for your cloud resources. You can click Tag Management to go to the Resource Management console and create tags. For more information, see Add a custom tag.
Click OK.
Filter CLB 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.
Then, CLB instances that match the specified key-value pair are displayed.
Optional. You can click Clear Filter Condition above the instance list to clear the filter conditions.
Remove tags
You can remove tags from only one CLB instance at a time.
On the Instances page, find the CLB instance that you want to manage, move the pointer over the
icon in the Tags column, and then click Edit.
In the Configure Tags dialog box, find the tag that you want to remove and click the
icon next to the tag. Then, click OK.
After you remove a tag from a cloud resource, the system automatically deletes the tag within 24 hours if the tag is not added to other resources.
What to do next
Configure a listener to listen for connection requests and forward the requests to backend servers based on a specific scheduling algorithm.