To associate a listener with an endpoint group, you can specify the region to which you want to distribute network traffic. Then, the system distributes network traffic to the optimal endpoint in the endpoint group.

Prerequisites

A Global Accelerator (GA) instance is created. For more information, see Create a GA instance.

Background information

Each endpoint group is associated with a specific region. You can associate an endpoint group with a listener by specifying the region to which you want to distribute network traffic. After you associate an endpoint group with a listener, the system distributes network traffic to the optimal endpoints in the endpoint group.

Listeners that use different protocols support different types of endpoint groups:
  • TCP or UDP listeners

    By default, you can create two default endpoint groups for each TCP or UDP listener. If you want to create more default endpoint groups, go to the Quota Management page and increase the quota of gaplus_quota_epgs_per_listener. For more information, see Manage quotas.

    You must deploy default endpoint groups in different regions. You can set a traffic distribution ratio for each default endpoint group. The traffic distribution ratio specifies the proportion of traffic that is distributed to a default endpoint group.

  • HTTP or HTTPS listeners

    By default, you can create one default endpoint group and one virtual endpoint group for each HTTP or HTTPS listener. If you want to create multiple virtual endpoint groups, go to the Quota Management page and increase the quota of gaplus_quota_vepg_per_listener. For more information, see Manage quotas.

    • A default endpoint group refers to the endpoint group that you configure when you create an HTTP or HTTPS listener.
    • A virtual endpoint group refers to the endpoint group that you can create on the Endpoint Group page after you create a listener.

      After you create a virtual endpoint group for an HTTP or HTTPS listener, you can create a forwarding rule and associate the forwarding rule with the virtual endpoint group. Then, the HTTP or HTTPS listener forwards requests with different destination domain names or paths to the default or virtual endpoint group based on the forwarding rule. This way, you can use one GA instance to accelerate multiple domain names or paths. For more information about how to create a forwarding rule, see Create and manage forwarding rules.

Create a default endpoint group

  1. Log on to the Global Accelerator console.
  2. On the Instances page, find the GA instance that you want to manage and click Configure Listeners in the Actions column.
  3. On the Listener tab, click Add Listener.
    Note If this is your first time you create an endpoint group, skip this step.
  4. On the Configure Listener & Protocol wizard page, set the required parameters, and click Next.
    If you want to create an endpoint group for an HTTPS listener, you must also configure SSL certificates. For more information, see Add a listener.
  5. On the Configure Endpoint Group wizard page, set the following parameters.
    Parameter Description
    Endpoint Group Name Enter a name for the endpoint group.

    The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

    Region Select the region where you want to deploy the endpoint group.
    Traffic Distribution Ratio Set the traffic distribution ratio for the endpoint group. Unit: %.

    Valid values: 0 to 100.

    Note You can set Traffic Distribution Ratio only when you create an endpoint group for a TCP or UDP listener.
    Backend Service Specify whether backend servers are deployed on Alibaba Cloud.
    • Alibaba Cloud: Backend servers are deployed on Alibaba Cloud.
    • Off Alibaba Cloud: Backend servers are not deployed on Alibaba Cloud.
    Preserve Client IP Specify whether to preserve client IP addresses.

    After you enable this feature, backend servers can retrieve client IP addresses. For more information, see Preserve client IP addresses.

    Endpoint Endpoints are destinations of client requests. To add an endpoint, specify the following parameters:
    • Backend Service Type: If your backend service is deployed on Alibaba Cloud, you can select Alibaba Cloud Public IP Address, ECS, CLB, ALB, or OSS. If your backend service is not deployed on Alibaba Cloud, you can select Custom IP Address or Custom Domain Name.
      Note
      • You can specify ECS, CLB, and ALB instances as endpoints only if your Alibaba Cloud account is included in the whitelist. If you want to specify ECS, CLB, or ALB instances as endpoints for your GA instances, submit a ticket to upgrade the GA instances.
      • The IP addresses of endpoint groups associated with each GA instance must be globally unique and not conflict with those of other GA instances.
      • If no service-linked role exists when you specify ECS instances, CLB instances, ALB instances, or OSS buckets as endpoints, the system automatically creates the corresponding service-linked role. For more information, see AliyunServiceRoleForGaVpcEndpoint, AliyunServiceRoleForGaAlb, and AliyunServiceRoleForGaOss.
    • Backend Service: Enter the IP address, domain name, or instance ID of the backend server.
    • Weight: Set a weight for the endpoint. Valid values: 0 to 255. GA distributes network traffic to endpoints based on their weights.
      Notice If the weight of an endpoint is set to 0, GA stops distributing network traffic to the endpoint. Proceed with caution.

    You can click + Add Endpoint to add more endpoints. You can create at most four endpoints in each endpoint group. If you want to add more endpoints, go to the Quota Management page and increase the quota. For more information, see Manage quotas.

    Backend Service Protocol Select the protocol that is used by the backend service. Valid values:
    • HTTP (default)
    • HTTPS
    Note
    • If the listener protocol is HTTP, this parameter is set to HTTP by default and cannot be modified.
    • You can set Backend Service Protocol only when you configure an endpoint group for an HTTP or HTTPS listener.
    Port Mapping If the listener port and the port that the endpoint uses to provide services are not the same, you must add a mapping between the ports.
    • Listener Port: Enter the listener port.
    • Endpoint Port: Enter the port that the endpoint uses to provide services.

    If the listener port and the port that the endpoint uses to provide services are the same, you do not need to add the port mapping. GA automatically distributes client requests to the listener port of the endpoint.

    Note You can set Port Mapping only when you configure an endpoint group for an HTTP or HTTPS listener.
    Health Check Specify whether to enable or disable the health check feature.

    After you enable this feature, you can use health checks to check the status of endpoints. For more information about the health check feature, see Enable and manage health checks.

    Note If your GA instance uses UDP listeners, you can enable the health check feature for an endpoint only if the endpoint is associated with a TCP, HTTP, or HTTPS service. Otherwise, the endpoint is marked as unhealthy.
    Health Check Protocol Select the protocol that you want to use for health checks. Valid values: TCP, HTTP, and HTTPS.
    • A TCP health check probes whether a server port is healthy at the network layer by sending SYN packets to the port.
    • An HTTP health check probes whether an endpoint is healthy by simulating HTTP GET requests sent from a browser.
    Port Set the port of the endpoint to which probe packets are sent for health checks.

    Valid values: 1 to 65535.

    Health Check Interval Set the interval between two consecutive health checks. Unit: seconds.

    Valid values: 1 to 50. Default value: 2.

    URI Specify the URI for health checks.

    The URI must be 1 to 80 characters in length and start with a forward slash (/). The URI can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI can also contain the following extended characters: _ ; ~ ! ( ) * [ ] @ $ ^ : ' , +.

    By default, GA sends a GET request to the default homepage of the backend service. If you do not want to use the default homepage for health checks, you can manually specify a URI.

    Note This parameter is supported only for HTTP and HTTPS health checks.
    Healthy Threshold The number of consecutive health check failures that must occur before a healthy endpoint is considered unhealthy, or the number of consecutive health check successes that must occur before an unhealthy endpoint is considered healthy.

    Valid values: 2 to 10. Default value: 3.

  6. Optional:Click + Add Endpoint Group to add multiple endpoint groups based on the preceding information.
    Note
    • You can add multiple endpoint groups only for TCP and UDP listeners.
    • By default, you can add two default endpoint groups for a TCP or UDP listener. If you want to add more endpoint groups, go to the Quota Management page and increase the quota of gaplus_quota_epgs_per_listener. For more information, see Manage quotas.
  7. Click Next.
  8. On the Confirm wizard page, check the configurations and click Submit.
    To modify a specific setting, click Modify in the corresponding section.

Create a virtual endpoint group

Before you create a virtual endpoint group, take note of the following limits:
  • You can create a virtual endpoint group only for an HTTP or HTTPS listener.
  • Before you can create a virtual endpoint group, you must create a default endpoint group.
  1. Log on to the Global Accelerator console.
  2. On the Instances page, find the GA instance that you want to manage and click Configure Listeners in the Actions column.
  3. On the Listeners tab, click the endpoint group ID or number in the Default Endpoint Group ID/Name column.
  4. On the Endpoint Group tab, click Add Virtual Endpoint Group in the Virtual Endpoint Group section.
  5. In the Create Virtual Endpoint Group dialog box, set the parameters and click Create.
    For more information, see Create a default endpoint group.

What to do next

Operation Description
Modify an endpoint group
  1. On the Listeners tab, find the listener that you want to manage and click the endpoint group ID or number in the Default Endpoint Group ID/Name column.
  2. On the Endpoint Group tab, find the default endpoint group or virtual endpoint group that you want to modify and click Modify in the Actions column.
  3. In the Modify Default Endpoint Group or Modify Virtual Endpoint Group dialog box, modify the name and endpoint configuration, and then click Save.

    For more information about the configurations of the default endpoint group, see Create a default endpoint group.

    Note You can configure and modify virtual endpoint groups only for HTTP and HTTPS listeners. For more information about virtual endpoint groups, see Overview.
Set the traffic distribution ratio for an endpoint group You can set the proportion of traffic that is distributed to different endpoint groups.
  1. On the Listeners tab, find the listener and click Edit Endpoint Group in the Actions column.
  2. On the Configure Endpoint Group wizard page, find the endpoint group that you want to manage, set the traffic distribution ratio, and then click Next.

    Valid values of the traffic distribution ratio: 0 to 100. Unit: %.

  3. Confirm the information of the endpoint group and click Submit.
Note You can set traffic distribution ratios only for TCP and UDP listeners.
Set the weight of an endpoint You can set the weight of an endpoint. The weight specifies the proportion of traffic that GA distributes to an endpoint in the endpoint group.

GA calculates the sum of all endpoint weights in an endpoint group. Then, traffic is forwarded to endpoints based on the proportions of their weights. For example, if you want to distribute 1/3 of the network traffic to Endpoint 1 and 2/3 of the network traffic to Endpoint 2, you can set the weight of Endpoint 1 to 1 and the weight of Endpoint 2 to 2. To disable GA from distributing network traffic to an endpoint, set the weight of the endpoint to 0.

  1. On the Listeners tab, find the listener that you want to manage and click the endpoint group ID or number in the Default Endpoint Group ID/Name column.
  2. On the Endpoint Group tab, find the endpoint group that contains the endpoint for which you want to set the weight and click Modify in the Actions column.
  3. In the Modify Default Endpoint Group or Modify Virtual Endpoint Group dialog box, find and set the weight of the endpoint in the Endpoint section and click Save.

    Valid values of the weight: 0 to 255.

Delete an endpoint group You can delete an endpoint group that you no longer need. After you delete an endpoint group, GA stops forwarding requests to the endpoint group.
  1. On the Listeners tab, find the listener that you want to manage and click the endpoint group ID or number in the Default Endpoint Group ID/Name column.
  2. On the Endpoint Group tab, find the default endpoint group or virtual endpoint group that you want to delete and click Delete in the Actions column.
  3. In the message that appears, click OK.
Note If a listener is associated with only one endpoint group and you delete the endpoint group, the listener becomes unavailable.
Delete an endpoint You can delete an endpoint that you no longer need. After you delete an endpoint, GA stops forwarding requests to the endpoint. If an endpoint group contains only one endpoint, you cannot delete the endpoint.
  1. On the Listeners tab, find the listener that you want to manage and click the endpoint group ID or number in the Default Endpoint Group ID/Name column.
  2. On the Endpoint Group tab, find the default endpoint group or virtual endpoint group to which the endpoint that you want to delete belongs and click Modify in the Actions column.
  3. In the Modify Default Endpoint Group or Modify Virtual Endpoint Group dialog box, find the endpoint in the Endpoint section, click Delete in the Actions column, and then click Save.

References