tencent cloud

Forwarding Policy
Last updated: 2025-06-30 16:50:21
Forwarding Policy
Last updated: 2025-06-30 16:50:21

Overview

Forwarding policy refers to a set of rules by which the Global Accelerator service intelligently distributes traffic to different endpoint groups based on the request content (such as the domain name, URL path, and request header) at the application layer (HTTP/HTTPS). You can create a forwarding policy and bind it to a custom endpoint group to achieve fine-grained traffic control and routing.

Policy Type

The forwarding policy types include default policy and custom policy:
Default policy: Automatically created when a listener is created. It is automatically associated with the default endpoint group and cannot be edited, deleted, or bound to other custom endpoint groups. After the default endpoint group is deleted, the default policy will be deleted by linkage.
Custom policy: Users can define fine-grained routing rules based on the domain name and path. A custom policy can be bound to a custom endpoint group to achieve traffic allocation, but it cannot be bound to the default endpoint group.

Policy Composition

Matching domain name: The domain name that needs to be matched. One forwarding policy corresponds to one domain name match, and a matching URL is added based on the domain name.
URL path: The path that needs to be matched. Multiple forwarding rules can be configured under one domain name, and one forwarding rule corresponds to one URL.
Forwarding action: The corresponding policy action executed by Global Accelerator after the forwarding policy is hit, including "Forward to the custom endpoint group bound to the policy" and "Discard".
Origin-pull host: The domain name identifier carried in the host field of the HTTP header when Global Accelerator initiates a request to the origin server. The host field in an origin-pull request can be modified. If you do not fill it in, the default host will be used.
Origin-pull SNI: The target domain name requested by the origin server that Global Accelerator informs in the handshake stage of HTTPS origin-pull. It can only be modified for an HTTPS forwarding policy.


How It Works

1. Parsing the request
After a Global Accelerator endpoint receives a user request, it parses information such as the HTTP/HTTPS header, URL path, and domain name.
2. Matching the custom forwarding policies one by one in order of priority:
Condition combination: The matching conditions for the forwarding policies include the domain name and the path, both of which need to be met to trigger the action.
3. Executing the action
Match successful: Immediately execute the action (forward to the specified endpoint group or discard) corresponding to the policy.
Match failed: Continue matching other custom policies. If none of them is matched, execute the default policy action eventually and send the request to the default endpoint group.
For example:
A listener is configured with two custom forwarding policies. For custom policy 1, the matching domain name is example1.com, the matching URL is /aaa, and the forwarding action is Forward to custom endpoint group 1. For custom policy 2, the matching domain name is example2.com, the matching URL is /bbb, and the forwarding action is Discard. The matching procedure for this listener is as follows:


Configuring the Forwarding Policy

Prerequisites

You have completed the creation of a Global Accelerator instance and an HTTP&HTTPS listener.

Directions

1. Log in to the Global Acceleration Console.
2. On the instance list page, click the target Instance ID and go to the instance details page.
3. Click the listener ID in the listener tab and go to the listener details page.
4. Click Forwarding Policy to go to the forwarding policy tab, and click Add HTTP Forwarding Policy.
5. In the pop-up window, enter the domain name you want to match.
6. Click Add Forwarding Rule on the right side of the domain name and follow the guidelines in the table below to complete the corresponding configurations.
Configuration Item
Description
Domain Name
The domain name (such as www.example.com) used when the client accesses the acceleration service. Global Accelerator will match the preset forwarding rule based on this domain name.
URL
Forwarding path. It is required, with a length of 1 to 80 characters. The supported character sets are: lowercase letters from a to z, uppercase letters from A to Z, digits from 0 to 9, and symbols such as underscore (_), period (.), hyphen (-), and forward slash (/). Global Accelerator will perform precision matching on the business traffic based on this domain name and URL.
Forwarding Action
After the traffic hits the domain name and URL configured for the forwarding rule, Global Accelerator will execute the corresponding forwarding action.
Forward to: Global Acceleration will forward the hit traffic to the custom endpoint group bound to the rule.
Discard: Global Accelerator will discard the traffic that hits the rule without forwarding it.
Origin-Pull HOST
When Global Accelerator initiates a request to the origin server, the domain name identifier will be carried in the host field of the HTTP header. For traffic that hits the rule, the host field in the origin-pull request can be modified. If you do not fill it in, the default host will be used.
Origin-Pull SNI
When Global Accelerator uses the HTTPS protocol for origin-pull, it uses the SNI to explicitly inform the origin server of the target domain name of the origin-pull request in the TLS handshake stage. Based on this target domain name, the origin server returns the corresponding SSL certificate. For traffic that hits the rule, the SNI field in the origin-pull request can be modified.
Note:
Only HTTPS listeners support using the HTTPS protocol for origin-pull.
Origin-Pull Request Header
The origin-pull request header can be configured in the HTTPS forwarding rules. It is used to customize the HTTP header information carried when Global Accelerator initiates a request to the origin server.

Editing a Forwarding Policy

1. Log in to the Global Acceleration Console.
2. On the instance list page, click the target Instance ID and go to the instance details page.
3. Click the listener ID in the listener tab and go to the listener details page.
4. Click Forwarding Policy to go to the forwarding policy tab.
5. Click Edit Forwarding Rule on the right side of an existing rule to modify it.

Deleting a Forwarding Policy

1. Log in to the Global Acceleration Console.
2. On the instance list page, click the target Instance ID and go to the instance details page.
3. Click the listener ID in the listener tab and go to the listener details page.
4. Click Forwarding Policy to go to the forwarding policy tab.
5. Click Edit Forwarding Rule on the right side of an existing rule to modify it.
Note:
The default forwarding policy cannot be edited or deleted. After the default endpoint group is deleted, the default policy will be deleted by linkage. You can recreate the default endpoint group to recover the default policy.

Documentation


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback