All Products
Search
Document Center

Global Accelerator:Add and manage intelligent routing listeners

Last Updated:Feb 21, 2024

After you create an intelligent routing listener for a Global Accelerator instance, the GA instance automatically selects a nearby and healthy endpoint group and forwards client requests to the optimal endpoint in the endpoint group.

Prerequisites

  • A standard Global Accelerator instance is created. For more information, see Create and manage standard GA instances.

  • An SSL certificate is purchased and a certificate signing request is submitted to the certificate authority (CA) if you want to configure HTTPS listeners. For more information, see Purchase an SSL certificate and Submit a certificate application.

  • A basic bandwidth plan is purchased and associated with the GA instance whose bandwidth metering method is pay-by-bandwidth.

Add a TCP or UDP listener

  1. Configure the listener and the protocol.

    1. Log on to the GA 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 Add Listener.

      Note

      If this is the first time that you add a listener or if no listener is created for the specified Global Accelerator instance, skip this step.

    4. In the Configure Listener & Protocol step, configure the parameters described in the following table and click Next.

      Parameter

      Description

      Listener Name

      Enter a name for the listener.

      Routing Type

      Select a routing type. In this example, Intelligent Routing is selected.

      • Intelligent Routing: automatically selects a nearby and healthy endpoint group based on network latency and forwards client requests to the optimal endpoint in the endpoint group.

      • Custom Routing: generates a port mapping table based on the listener port range, the port ranges of the destination endpoint groups, and the IP addresses of endpoints (vSwitches). This way, traffic is routed to specific IP addresses and ports of specified vSwitches. For more information about how to configure a custom routing listener, see Add and manage custom routing listeners.

        Note

        Custom routing listeners are in invitational preview. To use custom routing listeners, submit an application to your account manager. After your application is approved, you can use custom routing listeners.

      Protocol

      Select a protocol for the listener. Valid values:

      • TCP

        • TCP is a connection-oriented protocol that provides high reliability. Before you transmit data, you must establish a stable connection with the peer.

        • Session persistence is based on source IP addresses.

        • Source IP addresses are visible at the network layer.

        • Data is transmitted at a slow rate.

      • UDP

        • UDP is unreliable and not connection-oriented. Three-way handshakes are not required before UDP packets are transmitted. UDP does not support fault tolerance or retransmission.

        • Data is transmitted at a high rate.

      Port Number

      Specify a port for the listener to receive and forward requests to endpoints. Valid values: 1 to 65499.

      You can specify up to 30 ports for each listener.

      Separate multiple listener ports with commas (,). For example, you can enter 80,90,8080.

      If you want to specify a port range, use a hyphen (-). Example: 80-85.

      Note
      • If you add listeners that use the same protocol to a Global Accelerator instance, you must configure different ports for the listeners.

      • You can specify more than 300 consecutive listener ports for a listener in specific regions. For more information, see Advanced listeners.

      Client Affinity

      Specify whether to enable client affinity.

      • If you select Source IP Address from the drop-down list, client affinity is enabled. After client affinity is enabled, requests from a specific client IP address are forwarded to the same endpoint.

      • If you select Disabled from the drop-down list, client affinity is disabled. After client affinity is disabled, requests from a specific client IP address may be forwarded to different endpoints.

      Idle Connection Timeout Period

      The timeout period of an idle connection. If no data is transmitted during the timeout period, GA closes the current connection. When a new request is received, GA establishes a new connection.

      The valid values vary based on the listener protocol:

      • Valid values for TCP listeners: 10 to 900. Default value: 900. Unit: seconds.

      • Valid values for UDP listeners: 10 to 20. Default value: 20. Unit: seconds.

      Note

      If your standard GA instance does not support configuring the timeout period of idle connections for intelligent routing listeners, the instance may be using an earlier version. To configure the timeout period of idle connections for intelligent routing listeners, contact your account manager to upgrade your GA instance.

  2. Configure endpoints.

    Each listener is associated with an endpoint group. 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, traffic is distributed to the optimal endpoint in the associated endpoint group.

    In the Configure Endpoint Group step, configure the parameters described in the following table and click Next.

    This topic describes only how to configure endpoints and endpoint groups. For information about health checks, see Create a default endpoint group. For more information about endpoints and endpoint groups, see Overview.

    Parameter

    Description

    Endpoint Group Name

    Enter a name for the endpoint group.

    Region

    Select the region where you want to deploy the endpoint group.

    Configuration

    Client requests are routed to endpoints. To add an endpoint, configure the following parameters:

    • Backend Service Type: If your backend server is deployed on Alibaba Cloud, you can select Alibaba Cloud Public IP Address, ECS, ENI, CLB, ALB, NLB, or OSS. If your backend server is not deployed on Alibaba Cloud, you can select Custom IP Address or Custom Domain Name.

      Note
      • If your standard GA instance does not support using ALB instances, ECS instances in VPCs, CLB instances in VPCs, NLB instances, or ENIs as endpoints, your instance may be using an earlier version. Contact your account manager to upgrade your GA instance.

      • The endpoint group IP addresses of a GA instance are unique and are not shared with other GA instances.

      • If no service-linked roles exist when you specify Elastic Compute Service (ECS) instances, elastic network interfaces (ENIs), Classic Load Balancer (CLB) instances, Application Load Balancer (ALB) instances, Network Load Balancer (NLB) instances, or Object Storage Service (OSS) buckets as endpoints, the system automatically creates the corresponding service-linked role. For more information, see AliyunServiceRoleForGaVpcEndpoint, AliyunServiceRoleForGaAlb, AliyunServiceRoleForGaOss, and AliyunServiceRoleForGaNlb.

    • Backend Service: enter the IP address, domain name, or instance ID of the backend server.

    • Weight: specify a weight for the endpoint. Valid values: 0 to 255. GA routes network traffic to endpoints based on the weights of the endpoints.

      Warning

      If you set the weight of an endpoint to 0, Global Accelerator stops distributing network traffic to the endpoint. Proceed with caution.

    You can click + Add Endpoint to add more endpoints. You can create up to 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 GA quotas.

    Preserve Client IP

    Specify whether to preserve client IP addresses.

    If you enable this feature, the backend server can obtain client IP addresses. For more information, see Preserve client IP addresses.

    Traffic Distribution Ratio

    Specify a traffic distribution ratio for the endpoint group.

    Valid values: 0 to 100.

    Note
    • You can set the Traffic Distribution Ratio parameter only when you create an endpoint group for a TCP or UDP listener. For more information about how to specify traffic distribution ratios, see Distribute traffic across endpoint groups in different scenarios.

    • A value of 0 specifies that no traffic is forwarded to the endpoint group. A value of 100 specifies that all traffic is forwarded to the endpoint group.

    Cross-border Acceleration Settings

    Read Compliance Commitments Regarding Cross-border Data Transfers and select Agree to the Preceding Compliance Agreement.

    This parameter takes effect only when cross-border acceleration is disabled for your GA instance and the selected endpoint group and existing acceleration regions are deployed across borders. For example, the endpoint group resides in a region in the Chinese mainland and the acceleration regions are located outside the Chinese mainland, such as the China (Hong Kong), China (Macao), and China (Taiwan) regions.

    After the configuration is complete, the Transmission Network Type parameter of the GA instance is automatically set to BGP (Multi-ISP) Pro. For more information, see Pay-by-data-transfer.

  3. Confirm the configurations.

    In the Confirm step, confirm the configurations of the listener and endpoints, and then click Submit.

    If you want to modify settings, click Modify in the corresponding section. Then, you are redirected to the configuration page.

    Note

    If this is the first time you add a listener, the listener takes effect after 3 minutes. If you modify the configurations of a listener, the new configurations take effect after 1 minute.

Add an HTTP or HTTPS listener

  1. Configure the listener and the protocol.

    1. Log on to the GA 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 Add Listener.

      Note

      If this is the first time that you add a listener or if no listener is created for the specified Global Accelerator instance, skip this step.

    4. In the Configure Listener & Protocol step, configure the parameters described in the following table and click Next.

      Parameter

      Description

      Listener Name

      Enter a name for the listener.

      Routing Type

      Select a routing type. In this example, Intelligent Routing is selected.

      • Intelligent Routing: automatically selects a nearby and healthy endpoint group based on network latency and forwards client requests to the optimal endpoint in the endpoint group.

      • Custom Routing: generates a port mapping table based on the listener port range, the port ranges of the destination endpoint groups, and the IP addresses of endpoints (vSwitches). This way, traffic is routed to specific IP addresses and ports of specified vSwitches. For more information about how to configure a custom routing listener, see Add and manage custom routing listeners.

        Note

        Custom routing listeners are in invitational preview. To use custom routing listeners, submit an application to your account manager. After your application is approved, you can use custom routing listeners.

      Protocol

      Select a network transmission protocol for the listener. Valid values:

      • HTTPS: HTTPS has the following features:

        • A connection-oriented protocol that provides high reliability. Before you transmit data, you must establish a stable connection with the peer.

        • You can bind SSL certificates to servers. This ensures the high reliability of data.

        • Data transmission is encrypted.

      • HTTP: HTTP has the following features:

        • A connection-oriented protocol that provides high reliability. Before you transmit data, you must establish a stable connection with the peer.

        • Data is transmitted at a high rate.

        • Data transmission is not encrypted.

      Port Number

      Specify a port for the listener to receive and forward requests to endpoints. Valid values: 1 to 65499.

      You can configure only one listener port for each HTTP or HTTPS listener.

      Client Affinity

      Specify whether to enable client affinity.

      • If you select Source IP Address from the drop-down list, client affinity is enabled. After client affinity is enabled, requests from a specific client IP address are forwarded to the same endpoint.

      • If you select Disabled from the drop-down list, client affinity is disabled. After client affinity is disabled, requests from a specific client IP address may be forwarded to different endpoints.

      Idle Connection Timeout Period

      The timeout period of an idle connection. If no request is received during the timeout period, GA closes the current connection. When a new request is received, GA establishes a new connection.

      Valid values: 1 to 60. Default value: 15. Unit: seconds. To specify a longer timeout period for pay-as-you-go GA instances, go to Quota Center.

      Note

      If your standard GA instance does not support configuring the timeout period of idle connections for intelligent routing listeners, the instance may be using an earlier version. To configure the timeout period of idle connections for intelligent routing listeners, contact your account manager to upgrade your GA instance.

      Connection Request Timeout

      The timeout period of a request. If the backend server does not respond within the timeout period, GA returns the HTTP 504 error code to the client.

      Valid values: 1 to 180. Default value: 60. Unit: seconds. You can specify a longer timeout period for pay-as-you-go GA instances. To increase the quota, go to Quota Center.

      Note

      If your standard GA instance does not support configuring the request timeout period for intelligent routing listeners, the instance may be using an earlier version. To configure the request timeout period for intelligent routing listeners, contact your account manager to upgrade your GA instance.

      Custom HTTP Headers

      Select the HTTP headers that you want to add.

      • Obtain the GA instance ID by using the GA-ID header

      • Obtain the information about the acceleration region by using the GA-AP header

      • Obtain the listening protocol of the GA instance by using the GA-X-Forward-Proto header

      • Obtain the listening port of the GA instance by using the GA-X-Forward-Port header

      • Obtain client IP addresses by using the X-Real-IP header

  2. In the Configure SSL Certificate step, configure an SSL certificate and click Next.

    You must configure an SSL certificate only when you add an HTTPS listener. SSL certificates ensure that data transmission over GA is encrypted.

    1. In the Server Certificate step, select the SSL certificate that you purchased.

      Note

      If the required service-linked role does not exist when you configure a server certificate for a Global Accelerator instance, the system automatically creates the service-linked role. For more information, see AliyunServiceRoleForGaSsl.

    2. Click Advanced Settings to the right of Modify and select a Transport Layer Security (TLS) security policy from the TLS Security Policies drop-down list.

      For more information about TLS security policies, see TLS security policies.

  3. Configure endpoints.

    Each listener is associated with an endpoint group. 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, traffic is distributed to the optimal endpoint in the associated endpoint group.

    In the Configure Endpoint Group step, configure the parameters described in the following table and click Next.

    This topic describes only how to configure endpoints and endpoint groups. For information about health checks, see Create a default endpoint group. For more information about endpoints and endpoint groups, see Overview.

    Parameter

    Description

    Endpoint Group Name

    Enter a name for the endpoint group.

    Region

    Select the region where you want to deploy the endpoint group.

    Configuration

    Client requests are routed to endpoints. To add an endpoint, configure the following parameters:

    • Backend Service Type: If your backend server is deployed on Alibaba Cloud, you can select Alibaba Cloud Public IP Address, ECS, ENI, CLB, ALB, NLB, or OSS. If your backend server is not deployed on Alibaba Cloud, you can select Custom IP Address or Custom Domain Name.

      Note
      • If your standard GA instance does not support using ALB instances, ECS instances in VPCs, CLB instances in VPCs, NLB instances, or ENIs as endpoints, your instance may be using an earlier version. Contact your account manager to upgrade your GA instance.

      • The endpoint group IP addresses of a GA instance are unique and are not shared with other GA instances.

      • If no service-linked roles exist when you specify Elastic Compute Service (ECS) instances, elastic network interfaces (ENIs), Classic Load Balancer (CLB) instances, Application Load Balancer (ALB) instances, Network Load Balancer (NLB) instances, or Object Storage Service (OSS) buckets as endpoints, the system automatically creates the corresponding service-linked role. For more information, see AliyunServiceRoleForGaVpcEndpoint, AliyunServiceRoleForGaAlb, AliyunServiceRoleForGaOss, and AliyunServiceRoleForGaNlb.

    • Backend Service: enter the IP address, domain name, or instance ID of the backend server.

    • Weight: specify a weight for the endpoint. Valid values: 0 to 255. GA routes network traffic to endpoints based on the weights of the endpoints.

      Warning

      If you set the weight of an endpoint to 0, Global Accelerator stops distributing network traffic to the endpoint. Proceed with caution.

    You can click + Add Endpoint to add more endpoints. You can create up to 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 GA quotas.

    Preserve Client IP

    Specify whether to preserve client IP addresses.

    By default, client IP address preservation is enabled for HTTP and HTTPS listeners. GA preserves the IP address of a client in the X-Forwarded-For HTTP header. For more information, see Preserve client IP addresses.

    Backend Service Protocol

    Select the protocol that the backend server uses. Valid values:

    • HTTP (default)

    • HTTPS

    Note
    • If the listener protocol is HTTP, this parameter is automatically set to HTTP and cannot be modified.

    • You can configure the Backend Service Protocol parameter only when you configure an endpoint group for an HTTP or HTTPS listener.

    Port Mapping

    If the listener port and the port that is used by the endpoint to provide services are different, you must add a port mapping.

    • Listener Port enter the listener port.

    • Endpoint Port enter the port over which the endpoint provides services.

    If the listener port and the port that is used by the endpoint to provide services are the same, you do not need to add a port mapping. Global Accelerator automatically forwards client requests to the listener port of the endpoint.

    Note

    You can configure the Port Mapping parameter only when you configure an endpoint group for an HTTP or HTTPS listener.

    Cross-border Acceleration Settings

    Read Compliance Commitments Regarding Cross-border Data Transfers and select Agree to the Preceding Compliance Agreement.

    This parameter takes effect only when cross-border acceleration is disabled for your GA instance and the selected endpoint group and existing acceleration regions are deployed across borders. For example, the endpoint group resides in a region in the Chinese mainland and the acceleration regions are located outside the Chinese mainland, such as the China (Hong Kong), China (Macao), and China (Taiwan) regions.

    After the configuration is complete, the Transmission Network Type parameter of the GA instance is automatically set to BGP (Multi-ISP) Pro. For more information, see Pay-by-data-transfer.

  4. Confirm the configurations.

    In the Confirm step, confirm the configurations of the listener and endpoints, and then click Submit.

    If you want to modify settings, click Modify in the corresponding section. Then, you are redirected to the configuration page.

    Note

    If this is the first time you add a listener, the listener takes effect after 3 minutes. If you modify the configurations of a listener, the new configurations take effect after 1 minute.

More operations

Operation

Description

Modify a listener

You can modify a listener to meet your business requirements. The configurations that you can modify include the basic settings, protocol, SSL certificate, and endpoint group of the listener. The routing type of a listener cannot be modified.

  1. On the Listeners tab, find the listener that you want to modify and click Modify in the Actions column.

  2. On the Edit Listener page, modify the basic settings, protocol, SSL certificate, or endpoint group of the listener and then click Next.

    For more information about the basic settings, protocol, SSL certificate, and endpoint group of a listener, see Add a TCP or UDP listener and Add an HTTP or HTTPS listener.

Delete a listener

You can delete a listener. After a listener is deleted, the endpoint group that is associated with the listener is also deleted.

  1. On the Listeners tab, find the listener that you want to delete and click Delete in the Actions column.

  2. In the Delete Listener message, click OK.

Configure a virtual endpoint group and a forwarding rule for a listener

After you create an intelligent routing listener, you can configure a virtual endpoint group and a forwarding rule for the listener. After the configuration is complete, the listener can forward the requests that meet the forwarding conditions to the default endpoint group or a virtual endpoint group based on the forwarding rule. This way, a GA instance can accelerate access to multiple endpoints at the same time. For more information, see the following topics:

References