Fundamentals 10 min read

How DNS Works: From Root Servers to Global Load Balancing

DNS translates human‑readable domain names into IP addresses through a hierarchical, distributed system of root, top‑level, and authoritative servers, employing caching and recursive queries, and supports both internal and global load balancing to ensure high availability and low latency for internet users.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
How DNS Works: From Root Servers to Global Load Balancing

DNS Servers

In everyday life you access websites by domain names such as youtube.com or google.com, without needing to remember their numeric IP addresses. A DNS server provides the mapping between domain names and IP addresses.

DNS is critical for every online user; if DNS fails, the entire Internet would become inaccessible.

Because users are worldwide, DNS must be highly available, highly concurrent, and distributed.

It therefore follows a hierarchical tree structure:

Root DNS server : returns the IP address of the top‑level domain DNS server.

Top‑level domain DNS server : returns the IP address of the authoritative DNS server.

Authoritative DNS server : returns the IP address of the target host.

DNS Resolution Process

To improve performance many networks deploy DNS cache servers. The resolution process (example: accessing google.com) is as follows:

The client sends a DNS request and first checks its browser cache for google.com.

The request is then sent to the local DNS server , typically provided by the ISP.

The local DNS server looks in its cache. If the entry is missing, it queries a root DNS server asking for the IP of google.com.

The root DNS server sees the suffix .com and replies with the IP address of the .com top‑level domain DNS server.

The local DNS server contacts the .com top‑level DNS server, which provides the IP of the authoritative DNS server for google.com.

The local DNS server queries the authoritative DNS server , which returns the actual IP address of google.com.

The local DNS server returns the IP to the client and caches the result. DNS resolution is complete.

Below is a diagram summarizing the process:

DNS Load Balancing

Internal Load Balancing

When an application needs to access a database, it should use the database’s domain name rather than a fixed IP address. If the database moves to a new machine, updating the DNS record automatically redirects all applications without code changes.

By configuring a domain name, changing the IP in the DNS server updates all clients, greatly simplifying operations.

Further, multiple applications can share the same domain name and DNS can be set to return different IPs on successive queries, achieving simple load balancing.

Global Load Balancing

To ensure high availability, applications are often deployed across multiple data centers, each with its own IP address. When a user accesses a domain, the DNS can rotate among these IPs; if a data center fails, its IP can be removed from DNS, providing resilience.

Geographically aware routing—e.g., directing New York users to a New York data center—improves user experience and reduces latency. This is the concept of global load balancing .

Consider a scenario with several regions, each containing three availability zones:

Client requests app.metaleap.com, which is sent to the local DNS resolver.

Resolver checks its cache; if absent, it queries the local DNS server.

Local DNS server checks its cache; if absent, it recursively queries the root DNS server for the .com TLD server.

The .com TLD server returns the authoritative DNS server for metaleap.com.

The authoritative server returns the real IP address(s) for app.metaleap.com.

For simple applications that do not need global load balancing, the authoritative server can return one or more IPs, and the client can round‑robin among them.

Complex, cross‑region applications require a dedicated Global Load Balancer (GSLB). In the metaleap.com DNS, a CNAME such as app.vip.metaleap.com points to the GSLB, which applies custom policies to distribute traffic.

The diagram shows two layers of GSLB: one for data centers and one for regions, allowing customers in different locations to access the nearest resources, improving throughput and reducing latency.

Conclusion

DNS acts as the Internet’s address book, using a tree‑structured hierarchy and recursive lookup, with caching to boost performance.

During the domain‑to‑IP mapping, applications can leverage DNS‑based load balancing, ranging from simple round‑robin to sophisticated global strategies that consider address, data‑center, and region.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

NetworkingDNSDomain Name SystemInternet
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.