Why DNS Delays Hurt Mobile Apps and How HTTPDNS Can Fix Them
This article explains how DNS resolution overhead impacts mobile network performance, details the structure and types of DNS, examines common DNS problems such as hijacking and caching, and introduces HTTPDNS and GSLB as solutions to improve reliability and speed.
1. DNS Overview
DNS (Domain Name System) translates domain names to IP addresses and is a critical early step in network communication; delays in DNS resolution, especially over UDP in weak mobile networks, can add hundreds of milliseconds, degrading user experience.
1.1 Understanding DNS
DNS is organized as a hierarchical tree with a root, top‑level domains (TLDs), and subdomains, forming Fully Qualified Domain Names (FQDNs). The system includes authoritative servers, recursive (local) DNS, public DNS services, and forwarding DNS.
1.2 DNS Concepts
Authoritative DNS provides definitive answers for a domain and can delegate authority to other servers. Recursive DNS (local DNS) queries authoritative servers on behalf of clients and caches results until the TTL expires. Public DNS offers open recursive services, while forwarding DNS acts as an intermediary that forwards queries to a recursive resolver.
Common public DNS providers include 114.114.114.114 (China), Alibaba Cloud DNS (233.5.5.5), and Google Public DNS (8.8.8.8).
1.3 DNS Record Types
A record: maps a domain to an IPv4 address.
MX record: directs email to a mail server.
CNAME record: creates an alias for a domain.
NS record: specifies the authoritative name servers for a domain.
TXT record: stores arbitrary text, often for verification.
1.4 DNS Resolution Process
The resolution proceeds from the client’s local DNS to root servers, then to TLD servers, followed by authoritative servers, finally returning the IP address. Example commands ( dig +trace www.baidu.com and nslookup www.baidu.com) illustrate each step.
Client sends a query to the local DNS.
Local DNS contacts root hints to find root servers.
Root servers return TLD server addresses.
Local DNS queries the TLD server for the domain’s authoritative servers.
Authoritative servers provide the final IP address.
Local DNS caches the result and returns it to the client.
2. DNS Problems
Issues include DNS hijacking (malicious alteration of DNS records), stale cache results when authoritative records change, and forwarding DNS that routes queries through suboptimal or restricted networks, all of which can increase latency or cause incorrect routing.
3. Global Server Load Balancing (GSLB)
GSLB distributes traffic across geographically dispersed servers based on load, latency, and link quality, ensuring users are served by the most appropriate server. Intelligent DNS is a GSLB application that makes routing decisions using real‑time metrics.
4. HTTPDNS
4.1 What Is HTTPDNS?
HTTPDNS replaces traditional UDP‑based DNS queries with HTTP requests directly to a DNS service, bypassing the ISP’s local DNS and preventing hijacking.
4.2 Features of HTTPDNS
Prevents domain hijacking by avoiding ISP DNS.
Enables precise user‑to‑server scheduling using the client’s IP.
Reduces connection‑failure rates through smarter server ranking.
When using HTTPDNS, the original domain in the request URL is replaced by the resolved IP, which can cause TLS handshake failures if the certificate’s domain does not match the IP.
4.3 HTTPS Handshake and HTTPDNS
The TLS handshake involves client hello, server certificate exchange, certificate verification, and session key generation. HTTPDNS impacts step 3 (certificate verification) because the host name may no longer match the certificate, leading to handshake failure.
5. Common Questions
5.1 How Does a Host Know the DNS Server’s IP?
Through DHCP configuration or manual settings, the host receives the DNS server address along with other network parameters.
5.2 Why Does DNS Use UDP?
UDP requires only a single request and response packet, minimizing overhead compared to TCP, which needs multiple packets for connection establishment and teardown.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITFLY8 Architecture Home
ITFLY8 Architecture Home - focused on architecture knowledge sharing and exchange, covering project management and product design. Includes large-scale distributed website architecture (high performance, high availability, caching, message queues...), design patterns, architecture patterns, big data, project management (SCRUM, PMP, Prince2), product design, and more.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
