tencent cloud

Global Application Acceleration Platform

Configuring UDP and TCP Listeners

Download
Focus Mode
Font Size
Last updated: 2025-06-30 16:50:21

Listener Overview

After creating a Global Accelerator instance, you need to configure a listener for the instance. The listener is responsible for listening to client requests and distributing traffic to backend endpoints.
The following needs to be configured for a Global Accelerator listener:
1. The listening protocol and listening port. The listening port of the listener, also known as the frontend port, is used to receive requests and forward them to the backend server.
2. The listening policies, such as the load balancing policy and session persistence.
3. An added endpoint group. You need to create an endpoint group and add endpoints to it.

Supported Protocol Types

Global Accelerator supports listening to layer-4 and layer-7 requests from clients and distributes these requests to backend endpoints, which then handle the requests. The difference between a layer-4 and a layer-7 listener primarily lies in whether a layer-4 protocol or a layer-7 protocol is used to forward traffic when a user request arrives. For example, layer-4 forwarding is performed on requests with layer-4 protocols such as TCP and UDP, and layer-7 forwarding is performed on requests with layer-7 protocols such as HTTP and HTTPS.
Layer-4 Protocol: Transport layer protocol, which mainly accepts requests through VIP + Port and distributes traffic to the backend server.
Layer-7 Protocol: Application layer protocol, which distributes traffic based on application layer information such as URL and HTTP header.
Tencent Cloud Global Accelerator supports forwarding requests with the following protocols:
TCP (transport layer)
UDP (transport layer)
HTTP (application layer)
HTTPS (application layer)
Protocol Category
Protocol
Description
Use Cases
Layer-4 protocol
TCP
A connection-oriented and reliable transport layer protocol.
The source and terminal of the transmission need to perform a three-way handshake to establish a connection before transmitting the data.
Support session persistence based on the client IP address (the source IP address).
Support obtaining the client source IP address.
It is suitable for cases with high requirements on reliability and data accuracy but low requirements on transmission speed, such as file transfer, email sending and receiving, remote log-in, etc.
UDP
A connectionless transport layer protocol.
The source and terminal of the transmission do not establish a connection and do not need to maintain the connection status.
Each UDP connection can only be point-to-point.
Support one-to-one, one-to-many, many-to-one and many-to-many interactive communications.
Support session persistence based on the client IP address (the source IP address).
It is suitable for cases with high requirements on transmission efficiency and relatively low requirements on accuracy, such as instant messaging and online videos.
Layer-7 protocol
HTTP
An application layer protocol.
Support forwarding based on the domain name and URL of a request.
Applications that require identification of the request content, for example, Web applications and App services. For more information, see Configuring HTTP and HTTPS Listeners.
HTTPS
An encrypted application layer protocol.
Support forwarding based on the domain name and URL of a request.
With the unified certificate management service, you can upload and replace a certificate in the Global Accelerator console.
Support one-way authentication and two-way authentication.
HTTP applications that require encrypted transmission. For more information, see Configuring HTTP and HTTPS Listeners.

Supported Port Range

Port Type
Description
Limit
Listening port (frontend port)
The listening port is the port used for Global Accelerator to receive requests and forward them to endpoints. The range of ports you can configure is from 1 to 64999.
For one Global Accelerator instance:
A listening port of the UDP protocol category can be duplicated with a listening port of the TCP protocol category. For example, you can create the listener TCP: 80 and the listener UDP: 80 at the same time.
Listening ports of the same protocol category cannot be duplicated. TCP, TCP SSL, HTTP, and HTTPS are all in the TCP category. For example, you cannot create the listener TCP: 80 and the listener HTTP: 80 at the same time.
Endpoint port (backend port)
The endpoint port can be configured for a layer-7 listener. It is the port through which the backend server provides services, and it receives and handles traffic from Global Accelerator.
The range of endpoint ports you can configure is from 1 to 64999.
For one Global Accelerator instance:
Service ports of different listening protocols can be duplicated. For example, the listener HTTP: 80 and the listener HTTPS: 443 can be bound to the same port of a backend server at the same time.
Health check port
The health check port is used for Global Accelerator to send probe requests to the backend server to confirm whether the server is running normally. If the port responds normally, the server is considered healthy. The range of health check ports you can configure is from 1 to 64999.
-
You need to create a listener for a Global Accelerator instance to listen to user requests and forward traffic to backend endpoints. Global Accelerator (GA) supports the TCP, UDP, HTTP, and HTTPS protocols. This section describes how to configure and operate TCP and UDP listeners.

Operation Guide

Prerequisites

You have completed the creation of a Global Accelerator instance.

Creating Listeners

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 Add Listener on the listener tab.
4. Configure a listener.
Configuration Type
Configuration Item
Description
Basic Configuration
Listener name
Start with an uppercase or lowercase letter or a Chinese character.
Support 2 to 128 characters in length.
Support digits, periods (.), hyphens (-), and underscores (_).
Protocol
Support selecting TCP, UDP, HTTP, and HTTPS.
Transmission Control Protocol (TCP): It is connection-oriented, with reliable data transmission (the confirmation/retransmission mechanism), and ensures data sequence. It is suitable for scenarios with high-reliability requirements, such as web page browsing (HTTP/HTTPS), file transfer (FTP), and email (SMTP).
User Datagram Protocol (UDP): It is connectionless, with unreliable transmission and low latency. It is suitable for scenarios that are sensitive to speed and allow packet loss, such as real-time communication (such as VoIP), online games, and DNS queries.
Port
The supported port range is from 1 to 64999.
Advanced Configuration
Obtaining the client source IP address
TCP protocol: After it is enabled, the client's real IP address can be obtained through the Proxy Protocol.
UDP protocol: The client source IP address cannot be obtained.
Session persistence
Enabled: Users' requests from the same IP address will be forwarded to the same origin server.
Disabled: There is no guarantee that users' requests from the same IP address will be forwarded to the same origin server.
Idle connection timeout
Specify the idle connection timeout value. If there is no data interaction during the timeout period, GA will terminate the current connection and establish a new connection when the next request arrives. The value range varies depending on the listening protocol.
Default value: 10s.
Configuration range: from 10s to 900s.
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, and cannot create any custom endpoint group.
Configuration Type
Configuration Item
Description
Endpoint Group
Node group name
Start with an uppercase or lowercase letter or a Chinese character.
Support 2 to 128 characters in length.
Support digits, periods (.), hyphens (-), and underscores (_).
Region
The region of the endpoint group. Global Accelerator will forward traffic from the acceleration region to the region of the endpoint group.
Note:
If the acceleration region and the region of the endpoint group are the same, it might cause poor acceleration.
Backend service type
An endpoint is the backend origin server that eventually provides services. The endpoint type can be a custom domain name or a custom IP address.
Backend service
The backend origin server that eventually provides services. You can add up to 4 endpoints to an endpoint group. You can enter custom IP addresses or custom domain names. For example:
10.1.1.1
192.168.0.0
1.1.1.1
example.com
Weight
Endpoint weight. Global Accelerator will distribute business traffic to backend servers according to the endpoint weight you configure.
Default value: 100.
Configuration range: from 1 to 100.
Health check
Enabled: Global Accelerator will check the availability of the backend origin server according to the configured health check parameters.
Disabled: Global Accelerator will not perform health checks or detection on the origin server.
Protocol check
The network protocol used for Global Accelerator to check whether the backend server is available.
TCP: Support TCP and custom detection.
TCP: Global Accelerator uses the TCP protocol to check whether the backend server is available.
Custom detection: Manually configure the check requests and returned check results of health checks to check the backend server.
UDP: Support Ping and custom detection.
Ping: Global Accelerator uses the Ping protocol to check whether the backend server is available.
Custom detection: Manually configure the check requests and returned check results of health checks to check the backend server.
Response timeout
The maximum time that Global Accelerator waits for the server to respond after sending a health check request to the backend server. If no response is received after the timeout, this check is determined as failed.
Default value: 2s.
Configuration range: From 2s to 60s.
Health check interval
The time interval between two health checks.
Default value: 30s.
Configuration range: From 5s to 300s.
Unhealthy threshold
After the number of consecutive health check failures reaches this threshold, the backend server will be marked as unhealthy and removed from the traffic distribution pool.
Default value: 3 times.
Configuration range: From 1 to 10 times.
Health threshold
After the number of consecutive health check successes reaches this threshold, an unhealthy server will be re-marked as healthy and its traffic distribution will be recovered.
Default value: 3 times.
Configuration range: From 1 to 10 times.

Editing a Listener

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 Listener and go to the listener list page.
4. Click Instance ID or Instance Details in the operation column to go to the listener instance details page.
5. In the Configuration Management drop-down list in the operation column of an existing listener, click Manage Endpoint Groups, and go to the endpoint group list page to manage the endpoint groups.

Deleting a Listener

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 Listener and go to the listener list page.
4. Click Deletion on the right of the listener.
5. Click Confirm in the pop-up dialog box and complete the deletion.
Note:
After a listener is deleted, all endpoint groups bound to it will be released, and businesses will no longer be accelerated. Also, the listener cannot be recovered or accessed after it is deleted. Fully confirm the impact before proceeding.




Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback