Help Center/ Data Warehouse Service/ User Guide/ DWS Cluster Management/ Managing DWS Cluster Connections/ Binding and Unbinding Load Balancers for a DWS Cluster
Updated on 2026-07-08 GMT+08:00

Binding and Unbinding Load Balancers for a DWS Cluster

Overview

If the private IP address or EIP of a CN is used to connect to a cluster, the failure of this CN will lead to cluster connection failure. If a private or public domain name is used for connection, the DNS service randomly selects a private IP address or EIP for each client. This cannot balance loads or avoid single-CN failures. ELB is used to solve these problems.

An ELB distributes access traffic to multiple ECSs for traffic control based on forwarding policies. It improves the fault tolerance capability of application programs. For details, see the Elastic Load Balance User Guide.

With ELB health checks, CN requests of a cluster can be quickly forwarded to normal CNs. If a CN is faulty, the workload can be immediately shifted to a healthy node, minimizing cluster access faults. Currently, ELBs can be bound in the same VPC or across VPCs.

Notes and Constraints

  • This feature is supported only in cluster version 8.1.1.200 or later.
  • To ensure load balancing and high availability and prevent service interruption, ensure created clusters are bound to an ELB.
  • You need to authorize DWS to access user resources. The system creates DWS AgencyAccess and deletes the agency with the highest permission to improve account security. This operation does not affect the service cluster. Only the function permissions on the management plane are changed. For details, see Allowing DWS to Manage Resources.
  • The constraints for creating a load balancer are as follows:
    • When creating a load balancer, determine its specifications based on your service access traffic. You are advised to select the maximum specifications. On the DWS console, you can bind the load balancer to a cluster but cannot change the specifications of the load balancer.
    • You only need to create a load balancer if you want to use ELB. DWS automatically creates the required ELB listeners and backend server groups.
    • When creating a load balancer, ensure that the listener does not use the same port as the database. Otherwise, the load balancer cannot be bound to clusters.
    • If you want to access the ELB cluster using a public network IP address or domain name, bind an EIP or domain name to the cluster on the ELB console.
    • ELB does not support cross-database access.
  • The constraints for binding a load balancer are as follows:
    • Only dedicated load balancers can be bound to DWS.

      Load balancing is not supported in regions where the dedicated load balancer is not available. Go to the ELB console to check whether dedicated load balancers are supported.

    • To bind a load balancer to a DWS cluster, ensure that the load balancer is in the same region, VPC, and enterprise project as the cluster.
    • The load balancer to be bound must use TCP and have a private IP address.
    • When you bind a load balancer to a cluster, the ROUND_ROBIN policy is set by default. In addition, the health check interval is set to 10 seconds, the timeout duration is set to 50 seconds, and the number of maximum retries is set to 3. Exercise caution when you modify these load balancer parameters.
    • You can bind a dedicated load balancer to a cluster in another VPC.
    • You can bind only a dedicated load balancer to a cluster across VPCs.
    • Before you bind a load balancer to a cluster across VPCs, ensure that the subnet segment of the cluster VPC is different from that of the VPC to which the load balancer belongs.
    • IPv4 load balancers can only be bound to IPv4 clusters. IPv6 dual-stack load balancers can only be bound to IPv6 dual-stack clusters. Cross-protocol binding is not supported.

Associating ELB

  1. Log in to the DWS console.
  2. Choose Cluster > Cluster List. All clusters are displayed by default.
  3. In the cluster list, click the name of the target cluster to go to the Cluster Information page.
  4. In the Connection area, click Bind Load Balancer and select a load balancer. If there is no load balancer, create one on the ELB console. Then refresh the Cluster Information page and bind the load balancer to the cluster.

    By default, the load balancer in the VPC of the cluster is selected. If you select Bind to ELB in another VPC, the list of load balancers in other VPCs will be displayed for you to choose from. Before binding a load balancer to your cluster across VPCs, ensure the cluster VPC has been connected to the load balancer VPC. For details, see Prerequisites for Binding an ELB to a Cluster Across VPCs.

  5. After the request is delivered, go back to the Clusters page. Task information Associating ELB of the cluster is displayed. The process takes some time.
  6. Log in to the ELB management console, choose Elastic Load Balance > Load Balancers, click the name of the bound load balancer, switch to the Backend Server Groups tab, and check whether the cluster CNs are associated with the load balancer. If the health check result indicates that the ELB backend nodes are deleted, ignore the problem. For details, see Viewing a Backend Server Group.

  1. In the Basic Information area of the Cluster Information page, check the ELB Address, which is used for connecting to the cluster.

Prerequisites for Binding an ELB to a Cluster Across VPCs

Enabling ELB for a cross-VPC backend server

  1. Log in to the ELB console.
  2. In the ELB list, click the name of a dedicated ELB to go to its details page.

  3. On the Summary page, enable IP as a Backend, confirm the information, and click OK.

  4. Check the VPC and subnet segment.

Connecting the cluster VPC and the load balancer VPC (by using VPC peering as an example)

  1. Log in to the DWS console.
  2. Choose Cluster > Cluster List. All clusters are displayed by default.
  3. In the cluster list, click the name of a cluster to go to the cluster details page. Check the VPC and subnet segment of the cluster.

  4. In the Service List, choose Virtual Private Cloud. In the navigation pane on the left, choose My VPCs. Locate the VPC for which you want to create a VPC peering connection.
  5. Choose VPC Peering Connections. In the upper right corner of the page, click Create VPC Peering Connection.
  6. On the displayed page, set Local VPC to the cluster VPC, and set Peer VPC to the VPC of the ELB. Confirm the settings and click OK.

  7. Click Add Route to add the route information.
  8. Click the name of the created VPC peering connection. On the displayed page, click the Local Routes tab, click Route Tables, and add the route table of the cluster VPC.

  9. In the local route table, set Destination to the subnet CIDR block of the ELB VPC, set Next Hop Type to VPC peering connection, and set Next Hop to the created VPC peering connection. Click OK.

  10. Go to the basic information page of the created VPC peering connection, click the Peer Routes tab, click Route Tables, and add the route table of the ELB VPC.

  11. In the peer route table, set Destination to the subnet CIDR block of the cluster VPC, set Next Hop Type to VPC peering connection, and set Next Hop to the created VPC peering connection. Click OK.

  12. After the cluster is created, the network between the VPC where the cluster resides and the VPC where the load balancer resides is connected. For details, see section Binding an ELB.

Disassociating ELB

When you unbind a load balancer from a cluster, related cluster information is cleared on DWS but the load balancer is not deleted. Delete the load balancer in time to prevent unnecessary costs.

  1. Log in to the DWS console.
  2. Choose Cluster > Cluster List. All clusters are displayed by default.
  3. In the cluster list, click the name of the target cluster to go to the Cluster Information page.
  4. In the Connection area, click Dissociate ELB to dissociate the load balancer from the cluster.
  5. After the request is delivered, go back to the Clusters page. Task information Dissociating ELB of the cluster is displayed. The process takes some time.
  6. Log in to the ELB management console, click the name of the dissociated ELB, switch to the Backend Server Groups tab, and check whether the cluster CNs are deleted.