ZDNS Service
Overview
Zenlayer DNS (ZDNS) is a highly available DNS service with global configuration and regional delivery provided by Zenlayer Elastic Compute.
The ZDNS cluster uses a stateless architecture, where each server can independently handle DNS queries. All servers in the cluster advertise the same VIP via BGP. If a node becomes unhealthy, its BGP advertisement is automatically withdrawn, and traffic is routed to other healthy nodes—ensuring high availability.
The ZDNS uses TCP/UDP port 53 by default, with the following resolver addresses:
IPv4:
169.254.169.253IPv6:
fd00:a9fe:a9fd::1
ZDNS supports both private domain resolution and public recursive resolution. The private DNS feature enables service discovery, load balancing, and high availability. You can also use private DNS records to centrally manage various cloud resources within a VPC—such as cloud servers and load balancers—enhancing resource management efficiency and overall service reliability.

Features
High Availability: Single-node failures do not affect overall DNS resolution, as traffic automatically shifts to healthy nodes.
Stateless Architecture: Nodes can be added or removed quickly without global state synchronization.
Horizontal Scalability: Adding new nodes immediately increases the cluster’s processing capacity.
VPC Isolation: Supports authoritative DNS resolution for private domains across different VPCs.
Public Recursive Resolution: Performs public recursive queries for domain names that miss in the local zone.
Private Subdomain Recursive Fallback: When a private authoritative parent domain matches but the subdomain does not, the system automatically falls back to public recursive resolution.
ZDNS Resolution Workflow
Client Configuration The client (VM) should configure the DNS server addresses as follows:
IPv4:
169.254.169.253IPv6:
fd00:a9fe:a9fd::1
Request Ingress When the client sends DNS queries to the above addresses, the requests are routed to the ZDNS cluster in the corresponding region.
Validity Check The ZDNS cluster first validates whether the request is a well-formed DNS packet. Only valid requests proceed to the resolution phase.
Domain Resolution
Miss on private authoritative domains: The query is forwarded to the public internet for recursive resolution, and the final result is returned.
Hit on a VPC private authoritative domain:
Subdomain match: Resolve and return the result directly.
Subdomain miss:
Recursive enabled: Forward to public recursive resolution and return the final answer.
Recursive disabled: Return an empty response.
Response to Client The final resolution result is sent back to the client, delivering a fast and reliable DNS response.
Virtual Machine DNS Configuration
Currently, only manual DNS configuration is supported. Automatic default DNS via DHCP will be available in the future.
IPv4 Instance Default DNS:
169.254.169.253IPv6-only Instance Default DNS:
fd00:a9fe:a9fd::1
CentOS (including CentOS 7/9)
1. Temporary Configuration
Edit /etc/resolv.conf:
Add:
Save and exit. Changes take effect immediately.
2. Persistent Configuration
Edit the network interface configuration file /etc/sysconfig/network-scripts/ifcfg-eth0:
Add:
Example default file:
3. Verification
Run:
Expected output:
Ubuntu (including 20.04/22.04/24.04)
1. Configuration (Recommended: Netplan)
Edit the network config file /etc/sysconfig/network-scripts/ifcfg-eth0:
Add:
Complete example (replace with actual MAC address):
2. Apply Network Changes
3. Verification
Run:
Expected output:
Last updated