How SDNS works
The following flowchart shows how software-defined DNS (SDNS) works.
HTTPDNS serves as a recursive DNS server. However, in many scenarios, users need to set mappings between domain names and IP addresses. Such mappings cannot be implemented by means of traditional authoritative DNS semantics. SDNS is well-positioned to meet such requirements.
SDNS allows you to implement the mappings between parameters with specific characteristics and IP addresses.
Procedure
Step 1: Create Function Compute resources
You must activate Function Compute and develop custom resolution functions. After the functions are developed, publish your service and functions and generate a version or alias. For more information, see Create a function in Function Compute.
Custom resolution functions must be developed and debugged in the Function Compute console. To ensure that SDNS runs securely, the default LATEST version option cannot be selected when you configure SDNS. Specify a service version or function version that is officially published in Function Compute.
Step 2: Grant permissions on Function Compute resources to the service-linked role of HTTPDNS
To call Function Compute to implement SDNS in HTTPDNS, you must grant access permissions on Function Compute to the service-linked role of HTTPDNS in the HTTPDNS console. For more information about the service-linked role, see Service-linked role of HTTPDNS.
Step 3: Add a domain name for custom resolution in the HTTPDNS console
Only one Function Compute service can be configured for each domain name for which you want to enable custom resolution. A Function Compute service can serve multiple domain names for which you want to enable custom resolution.
Step 4: Enable the custom resolution feature for the domain name
After you add a domain name for custom resolution, the custom resolution feature is disabled by default. Enable the custom resolution feature for the domain name.
For more information about how to add a domain name for custom resolution and enable the custom resolution feature, see Add a domain name for custom resolution.