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 endpoint in the endpoint group based on the routing type of the listener. This topic describes how to create and manage endpoint groups of intelligent routing listeners.

Prerequisites

  • A standard Global Accelerator (GA) instance is created. For more information, see Create and manage standard GA instances.
  • A basic bandwidth plan is purchased and associated with the standard GA instance. For more information, see Purchase and manage basic bandwidth plans.
  • You have deployed an application that serves as the endpoint of the standard GA instance. The application is used to receive requests that are forwarded from GA. For more information about the backend service types that are supported by GA, see Endpoints.

Background information

After you create an intelligent routing listener for a GA instance, the GA instance automatically selects a nearby and healthy endpoint group and forwards client requests to the optimal endpoint 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 endpoint groups for each TCP and UDP listener. If you want to create 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.

    Each endpoint group must be deployed in a different region. You can set a traffic distribution ratio for each endpoint group. The traffic distribution ratio specifies the proportion of traffic that is distributed to an endpoint group. For more information, see Distribute traffic across endpoint groups in different scenarios.

  • HTTP or HTTPS listeners

    By default, you can create one default endpoint group and 10 virtual endpoint groups for each HTTP and HTTPS listener. If you want to create more 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.

    • The default endpoint group is 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 Global Accelerator (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, select Intelligent Routing as the routing type, configure the listener protocol and port, and then 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 and manage intelligent routing listeners.
  5. On the Configure Endpoint Group wizard page, set the following parameters.
    Parameter Description
    Endpoint Group Name Enter a name for the endpoint group.
    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. For more information about how to set traffic distribution ratios, see Distribute traffic across endpoint groups in different scenarios.
    Backend Service Select whether backend services are deployed on Alibaba Cloud.
    • Alibaba Cloud: specifies that backend services are deployed on Alibaba Cloud.
    • Off Alibaba Cloud: specifies that backend services are not deployed on Alibaba Cloud.
    Preserve Client IP Specify whether to reserve 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, set 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 cannot specify ECS instances in VPCs, internal-facing CLB instances, and internal-facing ALB instances as endpoints for standard GA instances. If you want to specify them as endpoints, submit a ticket.
      • The IP addresses of endpoints associated with each GA instance must be globally unique and cannot be duplicates of other GA instances.
      • If no service-linked role exists when you specify Elastic Compute Service (ECS) instances, Classic Load Balancer (CLB) instances, Application Load Balancer (ALB) instances, or Object Storage Service (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.
      Important 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 is not the same port over which the endpoint provides services, you must set this parameter.
    • Listener Port: Enter the listener port.
    • Endpoint Port: Enter the port over which the endpoint provides services.

    If the listener port is the same port over which the endpoint provides services, ignore this parameter. GA automatically forwards 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 information described in Step 5.
    Note
    • You can add multiple endpoint groups only for TCP and UDP listeners.
    • By default, you can add two 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, find the listener that you want to manage and click the number in the Virtual Endpoint Group 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
Note You can configure and modify virtual endpoint groups only for HTTP and HTTPS listeners. For more information about virtual endpoint groups, see Overview.
  1. On the Listeners tab, find the listener that you want to manage and click the endpoint group ID in the Default Endpoint Group 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.

Set the traffic distribution ratio for an endpoint group You can set the proportion of traffic that is distributed to different endpoint groups.
Note You can set traffic distribution ratios only for TCP and UDP listeners. For more information about how to set traffic distribution ratios, see Distribute traffic across endpoint groups in different scenarios.
  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.
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.
Note If a listener is associated with only one endpoint group and you delete the endpoint group, the listener becomes unavailable.
  1. On the Listeners tab, find the listener that you want to delete and click the endpoint group ID in the Default Endpoint Group 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.
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 delete and click the endpoint group ID in the Default Endpoint Group 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