Each listener uses endpoint groups to distribute traffic. For a custom routing listener, traffic is routed to specific endpoints within these groups.
Prerequisites
-
A standard GA instance is created.
-
For subscription-based GA instances, you must have purchased and associated a basic bandwidth plan.
You have deployed your applications as backend services for Global Accelerator. For custom routing listeners, the backend service type must be a vSwitch. For more information, see Endpoints.
You must have permission to use custom routing listeners. This feature is in invitational preview. To use it, contact your account manager. After your request is approved, you can select custom routing as the routing type for your listeners.
To ensure proper connectivity between the GA instance and your backend services, the access control policies of the backend services, such as security group rules, must allow traffic from the CIDR block of the vSwitch. You must also ensure that the vSwitch has at least eight idle private IP addresses.
Background information
After you configure a custom routing listener, the Global Accelerator instance creates a mapping table. This table is based on the listener's port range, the port mapping of the destination endpoint group, and the endpoint's subnet information. GA uses this table to deterministically route traffic to either all IP addresses within the specified vSwitch or to specific IP addresses and destination ports.
Custom routing listeners support only the TCP and UDP protocols. Each listener supports a maximum of 10 endpoint groups, and this quota cannot be increased.
Add an endpoint group
Log on to the GA console.
-
On the Instances page, find the GA instance that you want to manage and click Configure Listener in the Actions column.
-
On the Listeners tab, click Add Listener.
Skip this step if you are adding the first listener or if the Global Accelerator instance has no listeners.
On the Configure Listener & Protocol page, select Custom Routing as the routing type, configure the listener, and then click Next.
For more information, see Add and manage custom routing listeners.
On the Configure Endpoint Group page, configure the endpoint group and its endpoints.
An endpoint group defines the mapping between the listener port range and the backend service port range and protocol. An endpoint specifies the backend destination subnet and its traffic handling policy.
Configure the endpoint group.
On the Configure Endpoint Group page, configure the endpoint group based on the following information.
Parameter
Description
Endpoint Group Name
Enter a name for the endpoint group.
Region
Select the Alibaba Cloud region where the endpoint group is deployed.
Port Mapping Range and Protocol
Select an entry mode to define the port and protocol mappings from the listener to the backend services in the endpoint group.
List Mode: Enter the Port Range and Protocol. For Protocol, you can select TCP, UDP, or both.
Click Add to enter multiple mappings.
Use this mode to add up to 20 mappings at a time.
Batch Mode: Enter the port ranges and protocols according to the formatting instructions, or download the template, fill it out, and upload the file.
Use this mode to add up to 100 mappings at a time.
The total number of ports in the endpoint group multiplied by the total number of IP addresses in all vSwitch endpoints must be less than or equal to the total number of ports specified for the listener. The formula is:
(Total number of ports in the endpoint group) × (Total number of IP addresses in all vSwitch endpoints) ≤ (Number of listener ports).Configure endpoints.
In the Endpoint section, click Add Endpoint. In the Add Endpoint dialog box, configure the endpoint based on the following information, and then click OK.
Parameter
Description
Backend Service Type
Only vSwitch is supported.
Backend Service
Select the vSwitch to which you want to forward traffic.
Subnet Traffic
Select a subnet traffic access policy.
Allow All Traffic: All inbound traffic is forwarded to the specified backend service through Global Accelerator.
Deny All Traffic (Default): No inbound traffic is forwarded to the specified backend service through Global Accelerator.
Allow traffic for specific vSwitch IP addresses and ports: Specify the Access Policy that can receive traffic. Traffic destinations are the IP addresses and ports of ECS instances.
Optional: Click + Add Endpoint Group to configure another endpoint group.
-
In the Cross-border Acceleration Settings section, read the Compliance Commitments Regarding Cross-border Data Transfers and select Agree to the Preceding Compliance Agreement.
This step is required only if cross-border acceleration is not enabled for your GA instance and your service configuration involves cross-border acceleration between the Chinese mainland and other regions.
Click Next.
-
Review the configuration.
On the Configuration Review wizard page, verify the listener and endpoint configurations, and then click Submit.
To modify configurations, click Edit in the corresponding section to return to the previous page.
A new listener takes about 3 minutes to become active. Configuration changes take about 1 minute to apply.
More operations
Actions | Description |
Modify an endpoint group |
|
Add an endpoint |
|
Modify an endpoint |
|
Delete an endpoint |
|
Delete an endpoint group |
|
API reference
CreateCustomRoutingEndpointGroups: Creates one or more endpoint groups for a custom routing listener.
UpdateCustomRoutingEndpointGroupAttribute: Modifies the name and description of an endpoint group for a custom routing listener.
DeleteCustomRoutingEndpointGroups: Deletes one or more endpoint groups for a custom routing listener.
CreateCustomRoutingEndpointGroupDestinations: Creates port mappings for an endpoint group of a custom routing listener.
UpdateCustomRoutingEndpointGroupDestinations: Modifies the port mappings of an endpoint group for a custom routing listener.
DeleteCustomRoutingEndpointGroupDestinations: Deletes the port mappings of an endpoint group for a custom routing listener.
CreateCustomRoutingEndpoints: Creates endpoints in an endpoint group.
UpdateCustomRoutingEndpoints: Modifies the endpoints of a custom routing listener.
DeleteCustomRoutingEndpoints: Deletes the endpoints of a custom routing listener.
CreateCustomRoutingEndpointTrafficPolicies: Creates traffic destinations for an endpoint.
UpdateCustomRoutingEndpointTrafficPolicies: Modifies the traffic destinations for the endpoints of a custom routing listener.
DeleteCustomRoutingEndpointTrafficPolicies: Deletes traffic destinations from an endpoint.
ListCustomRoutingPortMappings: Queries the generated port mapping table for a custom routing listener.
ListCustomRoutingPortMappingsByDestination: Queries the port mapping table for a specific backend instance of a custom routing listener.