tencent cloud

Feedback

Managing Real Servers

Last updated: 2024-01-04 14:34:05
    CLB routes requests to real server instances that are running normally. This document describes how to add or delete real servers as needed or when you use CLB for the first time.

    Prerequisites

    You have created a CLB instance and configured a listener. For more information, see Getting Started with CLB.

    Directions

    Adding a real server to CLB

    Note:
    If a CLB instance is associated with an auto scaling group, CVMs in the group will be automatically added to the real servers of CLB. When a CVM instance is removed from the auto scaling group, it will be automatically deleted from the real servers of CLB.
    For details on how to add real servers using the API, see RegisterInstancesWithLoadBalancer.
    If you have a bill-by-CVM account and select a non-BGP ISP (China Mobile/China Unicom/China Telecom), you can only bind bill-by-traffic and bill-by-bandwidth package CVM instances. For more information about account and ISP types, see Checking Account Type and Product Attribute Selection.
    1. Log in to the CLB Console.
    2. On the Instance Management page, click Configure Listener on the right of a CLB instance.
    3. On the listener configuration page, select a listener to bind to the backend CVM.
    HTTP/HTTPS listener
    3.1.1 In the HTTP/HTTPS Listener section, click + on the left of the listener you select.
    
    
    3.1.2 Click + on the left of the domain name displayed.
    
    
    3.1.3 Select the URL displayed and click Bind.
    
    
    TCP/UDP/TCP SSL listener In the list on the left of the TCP/UDP/TCP SSL listener section, select a listener to bind with the backend CVM.
    
    
    4. Bind the CLB instance with a real server.
    Method 1: In the Bind with backend service dialog, click CVM, select one or more CVM instances, enter the forwarding port and weight, and click Confirm. For more information on ports, please see Server Common Port.
    Note:
    The pop-up window only displays available CVMs that are not isolated nor expired, in the same region, in the same network environment, and have peak bandwidth greater than 0.
    When the CLB instance is bound with multiple real servers, it use the hash algorithm to forward traffic.
    The larger the weight is, the more the requests are forwarded. Value range is 0-100 (default: 10). If it is set to 0, the real server stops receiving new requests. If session persistence is enabled, the requests from the real server may be not evenly distributed. For more details, see Algorithms and Weight Configuration.
    
    Method 2: If the CVM instances that need to be bound in batches have the same preset port value, in the pop-up dialog click CVM, enter the port value, select the corresponding CVM instances, set the weights, and click OK to bind them in batches. For more details on ports, see Server Common Port.
    

    Modifying real server weights for CLB

    The real server weight determines the number of CVM requests to be forwarded. When binding a real server, you need to preset its weight. The following shows an example of how to change the real server weight when a HTTP/HTTPS listener is used (which is also applied to a TCP/UDP/TCP SSL listener).
    Note:
    For details on how to modify the real server weight with the API, see ModifyLoadBalancerBackends.
    For more information on weight of the load balancing real server, refer to Cloud Load Balancer Round-robin Method.
    1. Log in to the CLB Console.
    2. On the Instance Management page, click Configure Listener on the right of a CLB instance.
    3. In the list on the left of the HTTP/HTTPS listener section, click the expand icon to show the instance and listener rules, and select a URL.
    
    
    4. In the server list on the right of the HTTP/HTTPS listener section, modify the corresponding server weight.
    Note:
    The larger the weight is, the more the requests are forwarded. Value range is 0-100 (default: 10). If it is set to 0, the real server stops receiving new requests. If session persistence is enabled, the requests from the real server may be not evenly distributed. For more details, see Algorithms and Weight Configuration.
    Method 1: Modify weight of a single backend CVM
    4.1.1 Locate the CVM instance you want to edit and click the
    
    icon on the left of the weight.
    
    4.1.2 In the pop-up window, enter a new weight and click Submit.
    Method 2: Modify weights of multiple backend CVMs
    Note:
    After you perform batch modification, the backend CVMs will use the same weight.
    4.1.1 Click checkboxes in front of the CVM instances you want to edit, and click Modify Weight.
    
    4.1.2 In the pop-up window, enter a new weight and click Submit.

    Modifying real server ports for CLB

    You can modify real server ports in the CLB console. The following shows an example of how to change the real server port when a HTTP/HTTPS listener is used (which is also applied to a TCP/UDP/TCP SSL listener).
    Note:
    For details on how to modify the real server port with the API, see ModifyTargetPort.
    1. Log in to the CLB Console.
    2. On the Instance Management page, click Configure Listener on the right of a CLB instance.
    3. In the list on the left of the HTTP/HTTPS listener section, click the expand icon to show the instance and listener rules, and select a URL.
    
    4. In the list on the right of the HTTP/HTTPS listener section, modify the corresponding server port. For more details on how to select ports, see Server Common Port.
    Method 1: Modify port of a single backend CVM
    4.1.1 Locate the CVM instance you want to edit and click the
    
    icon on the left of the port.
    
    4.1.2 In the pop-up window, enter a new port value and click Submit.
    Method 2: Modify ports of multiple backend CVMs
    Note:
    After you perform batch modification, the backend CVMs will use the same port.
    4.1 Click checkboxes in front of the CVM instances you want to edit, and click Modify Port.
    
    4.2 In the pop-up window, enter a new port value and click Submit.

    Unbinding real servers from CLB

    You can unbind bound real servers in the CLB console. The following shows an example of how to unbind the real server when a HTTP/HTTPS listener is used (which is also applied to a TCP/UDP/TCP SSL listener).
    Note:
    Unbinding a real server will unbind the CLB instance from the CVM instance, and CLB will immediately stop forwarding requests to it.
    Unbinding a real server will not affect the lifecycle of your CVM instance, which can also be added to the real server cluster again.
    For details on how to unbind real servers with the API, see DeregisterTargets.
    1. Log in to the CLB Console.
    2. On the Instance Management page, click Configure Listener on the right of a CLB instance.
    3. In the list on the left of the HTTP/HTTPS listener section, click the expand icon to show the instance and listener rules, and select a URL.
    
    4. In the list on right of the HTTP/HTTPS listener section, unbind the bound real server.
    Method 1: Unbind a single backend CVM
    4.1.1 Select the target CVM instance and click Unbind.
    
    4.1.2 In the pop-up window, check the CVM instance you select and click Submit.
    Method 2: Unbind multiple backend CVMs
    4.1.1 Click checkboxes in front of the CVM instances you want to unbind, and click Unbind.
    
    4.1.2 In the pop-up window, check the CVM instances you select and click Submit.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support