A Classic Load Balancer (CLB) instance is attached to your ApsaraDB for ClickHouse cluster by default to provide efficient load balancing for large-scale data processing. After a CLB instance is attached, the cluster can perform automatic failover. The CLB instance performs health checks and distributes traffic to healthy nodes to ensure high availability (HA) for the cluster. Attaching a CLB instance is a paid service. If you do not need this feature, you can release the instance. To ensure service reliability, do not release the CLB instance.
Precautions
By default, a CLB instance is attached to an ApsaraDB for ClickHouse Community-compatible Edition cluster created after December 1, 2021. You are charged for the CLB instance. For more information about billing, see Billing of dependent services.
Releasing a CLB instance:
Before you release a CLB instance, make sure that your Alibaba Cloud account does not have an overdue payment. Otherwise, the release fails and the cluster remains in the Releasing CLB state.
After you release a CLB instance that is attached to an ApsaraDB for ClickHouse Community-compatible Edition cluster, billing for the CLB instance stops in the next hour.
If you release or reattach a CLB instance, the port number used to connect to the cluster over a virtual private cloud (VPC) changes. After you release or reattach the CLB instance, you must change the port number in your application.
NoteYou can view the port number for VPC connections in the Cluster Information section on the Network Information page.
When you attach a CLB instance, the cluster automatically creates a CLB instance. You cannot select a CLB instance that you have already created.
In the Server Load Balancer console, you can find the CLB instance that is attached to your ApsaraDB for ClickHouse cluster using tags to filter. The tag key is
managedbyand the tag value is your ApsaraDB for ClickHouse cluster ID.
The default instance type for a CLB instance created for an ApsaraDB for ClickHouse Community-compatible Edition cluster is
slb.s1.small. For more information about the performance metrics of this instance type, see CLB instances.A CLB instance has a fixed bandwidth limit. You can view the bandwidth value on the Instance Management page in the Server Load Balancer console. The bandwidth limit cannot be increased by upgrading the instance type. If the burst traffic per second exceeds the limit, packet loss may occur. If your read and write requirements are not met, you can read from and write to nodes using direct connections.
Overview
Server Load Balancer (SLB) is a traffic distribution service that forwards inbound traffic to multiple backend Elastic Compute Service (ECS) instances based on forwarding rules. SLB improves the service capability and availability of your applications. For more information about CLB, see What is Classic Load Balancer (CLB)?.
CLB status | Description |
Attached |
|
Released |
|
Release a CLB instance
Make sure that your Alibaba Cloud account does not have an overdue payment.
If your account has an overdue payment, the release fails and the cluster remains in the CLB Being Released state.
You must add funds to your account before you proceed.
Log on to the ApsaraDB for ClickHouse console.
In the upper-left corner of the page, select the region where the target cluster is located.
On the Clusters page, click the Clusters of Community-compatible Edition tab.
Click the ID of the target cluster to go to the Cluster Information page.
In the Network Information section, click Release CLB Instance to the right of VPC Endpoint.
In the dialog box that appears, read the content and click OK.
The CLB instance is released when the cluster status changes from CLB Being Released to Running.
ImportantReleasing a CLB instance changes the port number used to connect to the cluster over a VPC. This causes client connections to the database service to fail. After you release the CLB instance, you must change the port number in your application. You can find the port number for VPC connections in the Network Information section on the Cluster Information page.
Attach a CLB instance
Log on to the ApsaraDB for ClickHouse console.
In the upper-left corner of the page, select the region where the target cluster is located.
On the Clusters page, click the Clusters of Community-compatible Edition tab.
Click the ID of the target cluster to go to the Cluster Information page.
In the Network Information section, click Mount CLB Instance to the right of VPC Endpoint.
In the dialog box that appears, read the content and click OK.
The CLB instance is attached when the cluster status changes from The CLB instance is being mounted to Running.
ImportantAttaching a CLB instance changes the port number used to connect to the cluster over a VPC. This causes client connections to the database service to fail. After you attach the CLB instance, you must change the port number in your application. You can find the port number for VPC connections in the Network Information section on the Cluster Information page.
Read from and write to nodes using direct connections
Query the node IP addresses.
SELECT * FROM system.clusters;View the port mappings.
You must map the port number used for domain name connections to the port number for direct node connections. The mappings are as follows:
CLB port
Node port
9000
3003
3306
3003
8443
3006
9004
3005
8123
3002
Connect to the database using the node IP address and port number.
(Optional) Configure load balancing.
If your instance has multiple replicas or nodes and you do not use a CLB instance for load balancing, you must configure load balancing for the nodes in your application.
Execute write or query operations.
In this mode,
SELECTandINSERToperations are executed on the currently connected node. Data Definition Language (DDL) operations, such asCREATE,DROP, andALTER, are automatically distributed to all nodes as distributed DDL operations.
FAQ
After a CLB is released, the cluster is stuck in the CLB Being Released state.
If the cluster remains in the CLB Being Released state after you release the CLB instance, check your Alibaba Cloud account for an overdue payment. If an overdue payment exists, the release process automatically completes after you add funds to your account.