Overview of the HTTP API integration solution

更新时间:
复制 MD 格式

HTTPDNS employs multi-IP endpoints and soft scheduling to prevent DNS hijacking and ensure high availability, even if service IPs are blocked, under DDoS attacks, or in the event of an extreme natural disaster. The official SDKs already implement this pattern. If you do not want to integrate an SDK, you can use the HTTP API to resolve domain names directly.

Process for using the HTTP API

Call the HTTPDNS scheduling API to dynamically obtain a list of service endpoints, and then access an endpoint to resolve a domain name to an IP address:

  1. Obtain a service endpoint for resolution

    HTTPDNS deploys multiple service clusters worldwide, each with an IP address serving as a service endpoint. To help you access the nearest endpoint while maintaining high availability, HTTPDNS provides a mechanism for acquiring and maintaining available service endpoints.

  2. Use the domain name resolution API to resolve domain names

    After you obtain the service endpoints, call the domain name resolution API to resolve domain names. The API supports batch resolution, parameter encryption, and request signing.

Using of the resolution result

After you obtain the resolution result, use the returned IP addresses in your business network requests. The way to handle resolution results with direct IP connections is the same as when you use the HTTPDNS SDK on each platform. For more information, see the following topics:

  1. Use the resolution result from HTTPDNS on Android

  2. Use the resolution result from HTTPDNS on iOS

  3. HarmonyOS uses HTTPDNS resolution results

Use optimization

For recommendations on using HTTPDNS through the HTTP API in a stable and efficient manner, see Best practices.