You need to enable JavaScript to run this app.
TrafficRoute DNS Suite

TrafficRoute DNS Suite

Copy page
Download PDF
Use HTTP API
HTTP API integration solution overview
Copy page
Download PDF
HTTP API integration solution overview
This document describes how to achieve the lowest DNS resolution latency and ensure the security of your business when integrating VolcanoEngine HTTPDNS via HTTP API. HTTPDNS recommends using the default integration solution. You can also try alternative integration solutions by using an Anycast IP address or a dynamic IP address to call the HTTP API.​
tip​
We recommend that you use the client SDK. If you are unable to integrate the client SDK due to practical constraints, you can use the HTTP API.​
Default integration solution​
Use httpdns.volcengineapi.com as the request domain name and call the resolve one or more domain names API.​
Downgrade strategy​
To obtain the resolution result when it cannot be retrieved through the domain name, use the Local DNS server.​
Alternative integration solutions​
Solution 1: Call the HTTP API via an Anycast IP address​
Use an Anycast IP address to initiate a direct request to call the Resolve one or more domain names API.​
tip​
The Anycast IP address access feature is currently in public beta and is not yet available to the public. You can submit a ticket to contact us and obtain an Anycast IP address.​
Downgrade strategy​
To prepare the following fallback strategies when resolution results cannot be obtained through the Anycast IP address:​
  • If you still cannot obtain resolution results via the domain name, you need to obtain them via the Local DNS server.​
Alternative integration solution 2: call HTTP API via dynamic IP address​
You can refer to the following steps to integrate the HTTP API.​
Step 1: Obtain the optimal HTTPDNS server IP address​
tip​
The Obtain the optimal HTTPDNS server IP address API is in public beta and is currently disabled by default. To experience this feature, you can submit a ticket to contact us to enable this API.​
Call the Get Best HTTPDNS Server IP Address API to retrieve the optimal HTTPDNS server IP address.​
​
GET https://httpdns.volcengineapi.com/svc_meta?account_id={account_id}&sign={sign}&svc_meta_ts={svc_meta_ts}&timestamp={timestamp}​
​
The HTTPDNS server will return the following results.​
​
{​
"svc_meta": {​
"main_domains": [​
"1.1.1.1",​
"2.2.2.2",​
"3.3.3.3"​
],​
"backup_domains": [​
"4.4.4.4"​
]​
},​
"ts": 1676777261000,​
"update_interval_min": 30​
}​
​
Step 2: Send a direct connection request to the IP address to resolve the domain name​
To call the resolve one or more domain names API via the IP direct connection request, send polling requests in the following order to the IP addresses returned by the obtain the optimal HTTPDNS server IP address API.​
  1. First, you need to attempt to send requests one by one to the primary IP addresses in main_domains. Start from the first IP address and end at the last IP address. It is recommended that each IP address be tried twice. You can determine the number of attempts based on actual needs.​
  1. If none of the primary IP addresses in main_domains return a resolution result, try the backup IP addresses in backup_domains. Start from the first backup IP address and end at the last backup IP address.​
​
GET https://{ip_address}/resolve?domain={domain}&account_id={account_id}&sign={sign}&timestamp={timestamp}&type={type}&ip={ip}&appid={appid}​
​
To obtain the parsing result, refer to the ips parameter in the return value after parsing succeeds.​
​
{​
"cip": "1.1.1.1",​
"host": "www.example.com", ​
"ips": [ ​
"1.1.1.1", ​
"2.2.2.2",​
"3.3.3.3",​
"4.4.4.4",​
"5.5.5.5",​
"6.6.6.6"​
],​
"ttl": 52 ​
​
}​
​
Downgrade strategy​
If none of the IP addresses can correctly return parsing results, you need to prepare the following fallback strategies:​
  • To obtain the parsing result when it cannot be retrieved through the domain name, use the Local DNS server.​
Important notes for integration​
Manage cached DNS records​
You can also reduce the number of requests sent to the HTTPDNS server by caching DNS records. DNS records will expire. When DNS records expire, you need to call the Resolve one or more domain names API to obtain new DNS records and refresh your cache.​
The client SDK has already implemented comprehensive DNS record expiration management and cache management. You can refer to How it works.​
Periodically obtain the latest HTTPDNS server IP address​
If you use dynamic IP addresses, it is recommended that you regularly obtain the latest server IP address according to the update_interval_min parameter (in minutes) returned by the Get the optimal HTTPDNS server IP address method.​
Last updated: 2025.11.04 21:04:12