tencent cloud

Global Accelerator 2.0

DokumentasiGlobal Accelerator 2.0

Configuring UDP and TCP Listeners

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-11-25 18:21:47
Diterjemahkan & Diperiksa oleh AI
This document describes how to configure TCP and UDP listeners for a GA2.0 instance, and configure the corresponding endpoint groups.

Prerequisites

The GA2.0 instance has been created.

Operation Steps

Creating a Listener

1. Log in to the GA2.0 console.
2. On the standard instance list page, click the target instance ID and go to the instance details page.
3. Click Add Listener on the Listener tab.
4. Configure a listener.
Configuration Type
Configuration Item
Description
Basic Configuration
Listener Name
Must start with a letter or Chinese character, contain 2 to 128 characters, and support digits, periods (.), hyphens (-), and underscores (_).
Routing Type
Intelligent routing: Select the nearest endpoint group based on latency for forwarding.
Protocol
You can select TCP, UDP, HTTP, and HTTPS.
TCP: A connection-oriented protocol that provides reliable transmission (through acknowledgment/retransmission mechanisms) and ensures data order. It is suitable for scenarios that require high reliability, such as web browsing (HTTP/HTTPS), file transfer (FTP), and email (SMTP).
UDP: A connectionless protocol that provides unreliable transmission and low latency. It is suitable for scenarios that are sensitive to speed and tolerant of packet loss, such as real-time audio and video (for example, VoIP), online gaming, and DNS queries.
Port
The supported port range is 1–65499.
Port range configuration is supported, and a listener can be configured with only one port range. This feature is in the grayscale phase. To use it, please submit a ticket.
Advanced Configuration
Obtain Client Source IP
TCP: After it is enabled, the client's real IP address can be obtained through ProxyProtocol, ProxyProtocol V2, or TOA. For origin server configuration, refer to Obtaining the Real User IP Address.
UDP: The client's real IP address can be obtained through the ProxyProtocol V2 proxy protocol.
Attention:
After Proxy Protocol is enabled, the origin server (backend server) must adapt to and parse the Proxy Protocol accordingly. Otherwise, client access will fail. Before enabling this feature, make sure that Proxy Protocol support is enabled on the origin server.
Session Persistence
Enabled: Users' requests from the same IP address are forwarded to the same origin server.
Disabled: Users' requests from the same IP address may not be forwarded to the same origin server.
Idle Connection Timeout Period
Specify the idle connection timeout period. If no data interaction occurs during the timeout period, GA2.0 terminates the current connection and establish a new connection when the next request arrives. The value range varies depending on the listening protocol.
TCP listening: The value range is 10–900 (in seconds), and the default value is 900 (in seconds).
UDP listening: The value range is 10–20 (in seconds), and the default value is 20 (in seconds).
5. Configure an endpoint group.
When creating a listener, you can create the default endpoint group for it to receive the traffic forwarded by the listener to the backend. When configuring the endpoint group, you need to add endpoints to it and enable health check as needed.
Note:
The node group configured when a listener is first created is the default endpoint group. For a TCP or UDP listener, you can only create one default endpoint group, but a custom endpoint group cannot be created.
Configuration Type
Configuration Item
Description
Endpoint Group
Endpoint Group Name
It starts with an uppercase or lowercase letter.
It supports 2 to 128 characters in length.
It supports digits, periods (.), hyphens (-), and underscores (_).
Region
The region of the endpoint group. GA2.0 forwards traffic from the acceleration region to the region of the endpoint group.
Attention:
If the acceleration region and the region of the endpoint group are the same, it might cause poor acceleration.
Backend Service Type
You can select two backend service types: public network and private network.
Public network: You can select custom domain names or custom public IP addresses.
Private network: You can select custom private IP addresses, ENIs, CLBs, and COS.
Backend Service
Weight
The endpoint weight. GA2.0 distributes business traffic to real servers based on the endpoint weight you configure.
Default value: 100.
Configuration range: 0-100. If it is set to 0, no traffic is forwarded to this endpoint.
Port Mapping
Used to resolve the scenario where the listener port is inconsistent with the origin-pull port. You can configure up to 30 port mappings.
The listener port must be the same as the port configured for the current listener, or within the port range.
Endpoint port: The port on which the endpoint provides services. The port range is 1–65499.
Health Check
Enabled: GA2.0 checks the availability of the backend origin server based on the configured health check parameters.
Disabled: GA2.0 does not perform health check probes on the origin server.
Protocol Check
The network protocol used by GA2.0 to check whether the real server is available.
TCP: TCP and custom detection are supported.
TCP: GA2.0 uses TCP to check whether the real server is available.
Custom detection: You can manually configure the check requests and returned check results of health checks to check the real server.
UDP: Ping and custom detection are supported.
PING: GA2.0 uses ping to check whether the real server is available.
Custom detection: You can manually configure the check requests and returned check results of health checks to check the real server.
Response Timeout Period
The maximum time that GA2.0 waits for the server to respond after sending a health check request to the real server. If no response is received after the timeout period ends, this check is determined as failed.
Default value: 2 (in seconds).
Configurable range: 2–60 (in seconds).
Health Check Interval
The time interval between two health checks.
Default value: 30 (in seconds).
Configurable range: 5–300 (in seconds).
Unhealthy Threshold
After the number of consecutive health check failures reaches the threshold, the real server is marked as unhealthy and removed from the traffic distribution pool.
Default value: 3 (in counts).
Configurable range: 1–10 (in counts).
Healthy Threshold
After the number of consecutive health check successes reaches the threshold, an unhealthy server is re-marked as healthy and its traffic distribution is restored.
Default value: 3 (in counts).
Configurable range: 1–10 (in counts).

Endpoint Group Backend Service Types and Backend Service Configuration

Note:
The GA 2.0 private network origin-pull feature uses the cross-account ENI solution. It requires at least 8 private IP addresses from your VPC Subnet to be mounted to the GA 2.0 cluster. Therefore, when selecting a Subnet instance, ensure that the Subnet instance has sufficient private IP addresses reserved. The private network origin-pull feature is available only for new GA 2.0 instances. To enable it for existing GA 2.0 instances, submit a ticket.
Backend Service Type
Backend Service
Public network
Custom public IP address.
Only public IP addresses can be configured. Private IP addresses and on-premises IP addresses cannot be configured.
Custom domain name.
Configure the domain name for the endpoint group to perform origin-pull to the origin server.
Private network
Custom private IP address.
Select the VPC instance for origin-pull. The VPC instance must be in the same region as the endpoint group.
Select a Subnet instance in the VPC, and ensure that the Subnet has at least 8 private IP addresses.
Enter the private IP address for origin-pull, and ensure that the IP address is routable to the Subnet instance.
ENI
Select an ENI instance. Ensure that the subnet where the ENI instance resides has at least 8 private IP addresses.
Select an IP address.
Load balancing
Select a CLB instance. Only origin-pull to private network CLB is supported. Ensure that the subnet where the private network CLB instance resides has at least 8 private IP addresses.
Select an IP address.
Object storage
Select a Subnet instance, and ensure that the subnet has at least 8 private IP addresses.
Select a COS instance.

Allowing GA 2.0 Origin-Pull IPs on the Origin Server

Attention:
After user requests are accelerated by GA 2.0, the request IP address seen by the origin server is the origin-pull IP address of GA 2.0. If an allowlist policy is configured on the origin server, you need to allow the origin-pull IP address of GA 2.0 on the origin server. If no allowlist is configured on the origin server, you can skip this step.
1. Log in to the GA2.0 console.
2. On the instance list page, click the target instance ID and go to the instance details page.
3. Click Listener and go to the listener list page.
4. Click the target listener ID to go to the listener details page.
5. Click the endpoint group. On the list page, you can view the egress public IP address of the endpoint group or the egress private IP address of the endpoint group.
6. On the origin server, allow access requests from the above IP addresses.

Editing a Listener

1. Log in to the GA2.0 console.
2. On the instance list page, click the target instance ID and go to the instance details page.
3. Click Listener and go to the listener list page.
4. Click the target instance ID or Instance Details in the Operation column to go to the listener instance details page.
5. In the Operation column of an existing listener, click the Configuration Management drop-down list and click Manage Endpoint Group to go to the endpoint group list page and manage the endpoint groups.

Deleting a Listener

1. Log in to the GA2.0 console.
2. On the instance list page, click the target instance ID and go to the instance details page.
3. Click Listener and go to the listener list page.
4. Click Delete on the right side of the listener.
5. In the pop-up window, click OK to complete the deletion.
Attention:
After you delete a listener, the binding relationships between all listeners and endpoint groups within the group are released. Your service can no longer be accelerated, and the deleted configuration cannot be restored or accessed. Please fully confirm the impact before proceeding with the deletion.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan