tencent cloud

Cloud Streaming Services

Release Notes and Announcements
Announcements
User Guide
Product Introduction
Overview
CSS Products
Concepts
Features
Use Cases
Strengths
Use Limits
Purchase Guide
Billing Overview
Basic Service Fee
Value-Added Service Fee
Prepaid plan
Purchase Process
Changing Billing Modes
Refund Policy
Viewing Bills
Renewal
Processing for Overdue Payments
Billing FAQs
Live Video Broadcasting (LVB)
Overview
Use Cases
Getting Started
SDK Integration
Live Event Broadcasting (LEB)
Overview
LEB Versus LVB
Use Cases
Getting Started
SDK Integration
Live Video Caster
Overview
Application Scenarios
Feature Area Introduction
Managing Live Video Caster
General Cloud Director
Configuring Program Lists and Automated Broadcasting
Console Guide
Console Overview
Overview
Domain Management
Stream Management
Package Management
AI Features
Feature Configuration
Relay
Billing Usage Statistics
Monitoring
Toolkit
OOTB live
CAM-Based Access Control
Feature Guide
Push and Playback
Features
Practices in Typical Scenarios
Cloud Native Recording
Live Streaming Security
Global CSS Service
Callback Notifications
User Guides for Common Third-Party Tools
SDK Guide
0. SDK Integration Guide
1. Stream Push
2. Playback
3. Advanced Features
API Documentation
History
Introduction
API Category
Making API Requests
Live Pad APIs
Live Stream Mix APIs
Time Shifting APIs
Monitoring Data Query APIs
Billing Data Query APIs
Live Transcoding APIs
Delayed Playback Management APIs
Domain Name Management APIs
Watermark Management APIs
Certificate Management APIs
Stream Pulling APIs
Recording Management APIs
Live Callback APIs
Screencapturing and Porn Detection APIs
Authentication Management APIs
Live Stream Management APIs
Data Types
Error Codes
Ops Guide
Video Stuttering
Troubleshooting Push Failure
Troubleshooting Playback Failure
CLS Assists in Live Stream Troubleshooting
Troubleshooting High Latency
Troubleshooting Poor Quality of Pulled Video
Authorizing CSS to Store Screenshots in a COS Bucket
Troubleshooting
Live Stream Mixing Error `InvalidParameter.OtherError`
About Pushing
Generating Push URLs
PC Push
Playing Method
Web Player
Live Streaming Quiz
FAQs
Service Region
Live Streaming Basics
Push and Playback
CSS Billing
Global CSS Service
Live Recording
On-Cloud Stream Mix
Domain Configuration
Related to Live Video Caster
Compatibility with Apple ATS
Difference Between Stream Interruption and Stream Suspension
SLA
CSS Service Level Agreement
CSS Policy
Privacy Policy
Data Processing And Security Agreement
Glossary

HTTPDNS Routing

PDF
Focus Mode
Font Size
Last updated: 2025-01-13 15:02:40

Overview

CSS routes global push and playback traffic based on DNS resolution by default. This is a common and simple method. However, DNS resolution errors and cross-network traffic occurrences are common due to the complexity of global network environments. We recommend you use Tencent Cloud’s HTTPDNS to optimize traffic routing for live streaming.
An ISP's local DNS egress performs NAT based on an authoritative DNS destination IP address or forwards the resolving request to other DNS servers. This makes it difficult for the authoritative DNS server to correctly identify the IP address of the ISP's local DNS, resulting in resolution errors and cross-network traffic. Tencent Cloud’s HTTPDNS service is powered by leading DNS cluster technologies and supports multi-ISP routing and custom routes.For more details, please refer to HTTPDNS.
Note:
This document shows you how to use HTTPDNS to optimize traffic routing for live streaming across the world. For details about the HTTPDNS API used, see Querying with HTTP Request Methods.

Preparations

1. Activate HTTPDNS. For detailed directions, see Activating HTTPDNS.
2. Go to the Development Configuration page to view the authorization ID and DES key.




Routing Push Traffic Using HTTPDNS

Requesting a push IP address

Use an HTTP GET request in the format of http://119.29.29.98/d?dn={$push_domain DES-encrypted string}&ip={$ip DES-encrypted string}&id=$id to request a push IP address from HTTPDNS.
push_domain indicates the push domain, which must be encrypted using the DES algorithm. You can view the key on the HTTPDNS Development Configuration page. For details, see AES/DES Encryption/Decryption.
ip indicates the public egress IP address of the requester. This field determines the region and ISP of the IP address to which traffic is routed. It also needs to be encrypted using the DES algorithm.
id indicates the authorization ID, which uniquely identifies a user.

Decrypting the IP address

The data obtained from HTTPDNS is DES-encrypted. Decrypt it to get the IP address (server_ip). For details, see AES/DES Encryption/Decryption.

Splicing the push URL

The format of a push URL is rtmp://server_ip/live/streamname?txTime=xxx&txSecret=xxx&txHost=domain. server_ip is the push IP address obtained in the previous step. txHost (important) is the domain you use for push.

Routing Playback Traffic Using HTTPDNS

Requesting the playback IP address

Use an HTTP GET request in the format of http://119.29.29.98/d?dn={$domain DES-encrypted string}&ip={$ip DES-encrypted string}&id=$id to request the playback IP address from HTTPDNS.
Field
Description
play_domain
The playback domain. The value of this field must be encrypted using the DES algorithm. You can view the key on the HTTPDNS Development Configuration page. For details, see AES/DES Encryption/Decryption.
ip
The public egress IP address of the requester. This field determines the region and ISP of the IP address to which traffic is routed. It also needs to be encrypted using the DES algorithm.
id
The authorization ID, which uniquely identifies a user.

Decrypting the IP address

The data obtained from HTTPDNS is DES-encrypted. Decrypt it to get the IP address (server_ip). For details, see AES/DES Encryption/Decryption.

Splicing the playback URL

HTTP: The formats of HTTP playback URLs for FLV and HLS are as follows (server_ip is the playback IP address obtained in the previous step and play_domain is the playback domain):
http://server_ip/play_domain/live/streamname.flv?xxxxxxxxxx
http://server_ip/play_domain/live/ streamname.m3u8?xxxxxxxxxx
http://server_ip/play_domain/live/ streamname -123.ts?xxxxxxxxxx
RTMP: The format of an RTMP playback URL is as follows (server_ip is the playback IP address obtained in the previous step and play_domain is the playback domain):
rtmp://server_ip/play_domain/live/ streamname?xxxxxxxxxx
Note:
There is a small likelihood of HTTPDNS request errors. If your request times out or the result returned is not an IP address or is empty, please perform resolution at the local DNS server.
Since IP does not support HTTPS, this solution is not currently supported for optimized scheduling.


Help and Support

Was this page helpful?

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

Feedback