Updated on 2024-11-05 GMT+08:00

Adding a Listener

Scenario

You can add a listener to a global accelerator so that the listener can listen to requests and distribute them to the associated endpoints based on the client affinity and weight you set.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and choose Networking > Global Accelerator.

    The Global Accelerator page is displayed.

  3. Search for the global accelerator by name or ID.
  4. Click the name of the global accelerator to go to the details page.
  5. Click Listeners.
  6. Click Add Listener.
  7. Specify the parameters listed in Table 1.
    Table 1 Parameters required for adding a listener

    Item

    Parameter

    Description

    Basic Configuration

    Name

    Listener name.

    You can enter up to 64 characters. Only letters, digits, and hyphens are allowed.

    Protocol

    The protocol used by the listener to receive requests from clients.

    The protocol can be TCP or UDP.

    Port

    The ports or port ranges used by the listener to receive requests from clients.

    The port number ranges from 1 to 65535. You can enter one or more ports or port ranges separated by commas (,).

    Example: 1-10,11-50,51,52-200

    Client Affinity

    • If you select None, the listener routes requests evenly among the endpoints in the endpoint group.
    • If you select Source IP address, the source IP address of each request is calculated using the consistent hashing algorithm to obtain a unique hash key, and all the endpoints are numbered and mapped to the hash keys. Requests from the same IP address are forwarded to the same endpoint for processing.

    TCP and UDP listeners support only Source IP address.

    Tags

    The identifier of a listener. Each tag consists of a key and a value. You can add up to 20 tags to a listener.

    Description

    Supplementary information about the listener.

    You can enter up to 255 characters.

    Endpoint Groups

    Name

    Name of the endpoint group.

    Each listener can be associated with only one endpoint group in a given region.

    You can enter up to 64 characters. Only letters, digits, and hyphens are allowed.

    Region

    Region where the endpoint group is used.

    Description

    Supplementary information about the endpoint group.

    You can enter up to 255 characters.

    Traffic Dial

    The percentage of traffic directed to the endpoint group.

    If you increase the traffic dial, more requests will be distributed to this endpoint group.

    If you set the traffic dial to 0, no requests will be distributed to this endpoint group.

    The weight ranges from 0 to 100.

    NOTE:

    If a listener has multiple endpoint groups, traffic will be first distributed to the endpoint group with the lowest latency and then to other endpoint groups based on the traffic dial value you set.

    Endpoint

    An endpoint serves as a single point of contact for clients, and Global Accelerator distributes incoming traffic across healthy endpoints.

    Health Check

    Health Check

    Whether to enable health check.

    If you disable health check, requests may be forwarded to unhealthy endpoints.

    Protocol

    The health check protocol can be TCP.

    Default value: TCP.

    Port

    The port used for health check.

    The port number ranges from 1 to 65535.

    Advanced Settings

    Interval (s)

    The maximum time between two consecutive health checks, in seconds.

    The interval ranges from 1 to 60.

    Timeout (s)

    The maximum time required for waiting for a response to a health check request, in seconds.

    The timeout ranges from 1 to 60.

    Maximum Retries

    The maximum number of health check retries allowed.

    The value ranges from 1 to 10.

  8. Click OK.