Updated on 2022-12-05 GMT+08:00

(Optional) Creating a Load Balance Channel

Overview

A load balance channel allows ROMA Connect to access backend services deployed on a specified server in load balancing mode. ROMA Connect can access ECSs on the same cloud service platform as well as your own private servers.

For example, six ECSs have been deployed in a VPC, and a load balance channel has been created to reach ECS 01 and ECS 04. ROMA Connect can access these two ECSs through the load balance channel.

Figure 1 Accessing the ECSs in a load balance channel

Prerequisites

The network between ROMA Connect and the servers in the load balance channel is normal.

Procedure

  1. Log in to the ROMA Connect console. On the Instances page, click View Console next to a specific instance.
  2. In the navigation pane, choose API Connect > API Management. On the Load Balance Channels tab page, click Create.
  3. On the Create Load Balance Channel page, configure basic information and health check information and click Next.
    Table 1 Parameters in Basic Information and Health Check Configuration

    Parameter

    Description

    Name

    Enter a load balance channel name. It is recommended that you enter a name based on naming rules to facilitate search.

    Port

    Enter the access port number of the ECS in the load balance channel.

    Member Type

    Select the member type of the ECS in the load balance channel. The member type cannot be changed after the load balance channel is created.

    • Instance: Add a load balance channel member by selecting an ECS.
    • IP address: Add a load balance channel member by entering an IP address.

    Distribution Algorithm

    Select the distribution algorithm for backend service requests. The load balance channel determines the ECS to which the request is to be sent based on the distribution algorithm.

    Protocol

    Select the protocol used for the health check. The value can be TCP, HTTP, or HTTPS.

    Path

    This parameter is mandatory only if Protocol is set to HTTP or HTTPS.

    Enter the health check URL.

    Method

    This parameter is mandatory only if Protocol is set to HTTP or HTTPS.

    Select the HTTP request method used for the health check. The value can be GET or HEAD.

    Advanced Settings

    Health Check Port

    Enter the destination port of the health check. By default, the port number configured for the load balance channel is used.

    Healthy Threshold

    Number of consecutive successful checks required for an ECS to be considered healthy. For example, if Healthy Threshold is set to 2, ROMA Connect considers the ECS status as healthy when the check is successful for two consecutive times.

    Unhealthy Threshold

    Number of consecutive failed checks required for an ECS to be considered unhealthy. For example, if Unhealthy Threshold is set to 5, ROMA Connect considers the ECS status as abnormal when the check fails for five consecutive times.

    Timeout Interval

    Enter the response timeout duration of a health check, in the unit of seconds. If no response is received within the specified duration, the health check fails.

    Interval (s)

    Enter the interval between consecutive checks.

    Response Codes

    This parameter is mandatory only if Protocol is set to HTTP or HTTPS.

    When the server returns a specified HTTP response code, the server considers the response as successful. Multiple response codes can be specified at the same time.

  4. Add ECSs or backend server addresses to the load balance channel based on the value of Member Type set for the load balance channel.
    • Adding an ECS
      1. Click Select ECS.
      2. In the Select ECS dialog box, select a subnet, select the ECS to be added, and click OK.
    • Adding a backend server address
      1. Click Add Backend Server Address.
      2. On the page displayed, configure backend server information.
        Table 2 Backend server information

        Parameter

        Description

        Backend Server Address

        Enter the IP address of the backend server.

        Weight

        This parameter is mandatory only if WRR or WLC is selected for Distribution Algorithm of the load balance channel.

        Enter the weight of the backend server. A larger weight indicates that more requests will be forwarded to the backend server.

  5. Click Finish.