Fundamentals 14 min read

How CDNs Accelerate Web Delivery: Principles, Benefits, and GSLB Strategies

This article explains what a Content Delivery Network (CDN) is, how it works through edge caching and global load balancing, outlines its core functions and service models, and compares DNS‑based, HTTP‑redirect and IP‑spoofing GSLB approaches with their advantages and drawbacks.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
How CDNs Accelerate Web Delivery: Principles, Benefits, and GSLB Strategies

CDN Overview

CDN stands for Content Delivery Network. It is an intelligent virtual network built on top of the existing Internet, deploying edge servers worldwide and using load balancing, content distribution, and scheduling to deliver content from the nearest server, reducing congestion and improving response speed and hit rate.

In short, data is deployed on servers in many locations, and load‑balancing technology directs users to the nearest server.

CDN Principle

The basic principle is to place many cache servers in regions where user traffic concentrates, and use global load balancing to route user requests to the nearest healthy cache server, which then responds directly.

Global load balancing is mainly used for sites that have servers in multiple regions, allowing global users to access the nearest server with a single IP address or domain name for the fastest speed.

The core idea is to avoid Internet bottlenecks that affect transmission speed and stability, delivering content faster and more reliably by routing requests to the nearest node based on traffic, node load, distance, and response time.

CDN functions can be summarized as follows:

Save backbone bandwidth and reduce bandwidth demand.

Provide server‑side acceleration, preventing overload caused by high traffic.

Use web‑cache technology to store frequently accessed pages and objects locally, reducing backbone egress traffic and improving page response time.

Overcome uneven site distribution and lower construction and maintenance costs.

Mitigate "communication storms" and improve network stability.

CDN Service Model

A CDN is a strategically deployed system that includes distributed storage, load balancing, request redirection, and content management. Content management and global traffic management are the core. By judging user proximity and server load, the CDN delivers content efficiently. The cache server, also called a surrogate, sits at the network edge, typically one hop from the user.

The surrogate is a transparent mirror of the content provider's origin server, allowing the CDN provider to represent its customers and deliver the best possible experience to end users who cannot tolerate latency.

Global Load Balancing

Global Server Load Balancing (GSLB) balances load across server groups located in different geographic locations. It enables users worldwide to reach the nearest server using a single IP address or domain name.

Server Group Selection

The core of GSLB is selecting the appropriate server group for a client, based on proximity and load.

Proximity mechanisms consider the physical distance between the user and server group. Two common methods are static configuration (mapping IP ranges to server groups) and dynamic detection (measuring hop count to the target IP).

Load mechanisms compare the load of each server group, considering factors such as maximum connections, average response time, and overall service quality.

DNS‑Based GSLB

When a user accesses a website, the domain name must first be resolved via DNS to obtain an IP address. This often involves multiple DNS servers before the final IP is found.

In a GSLB‑enabled setup, a GSLB device (often a Layer‑4 switch) replaces the DNS server for resolution. The diagram below shows the difference between normal DNS resolution and GSLB‑assisted resolution.

Pros and Cons of DNS‑Based GSLB

Advantages: simple implementation, easy deployment, low cost.

Disadvantages: when the device selects the nearest server based solely on IP address comparison, it may misjudge proximity because it sees only the client’s local DNS server IP, which may not reflect the client’s actual location.

HTTP‑Redirect‑Based GSLB

To address the inaccuracy of DNS‑based selection, HTTP‑redirect GSLB uses HTTP redirection to send users to the most suitable server.

The GSLB device’s IP is registered as the domain’s A record. Users resolve this IP via DNS, send an HTTP request to the GSLB device, which then selects the optimal server and issues an HTTP 302 redirect to the chosen server’s IP. The user follows the redirect to access the final server.

Pros and Cons of HTTP‑Redirect GSLB

Advantages: the redirect provides the user’s real IP, solving the misjudgment problem.

Disadvantages: it only works for HTTP traffic.

IP‑Spoofing (Triangular Transfer) GSLB

For non‑HTTP protocols, IP‑spoofing GSLB (also called triangular transfer) is used.

The GSLB device’s IP is also registered as the domain’s A record. When a request arrives, the GSLB selects the best server and forwards the request. The server’s response source IP is rewritten to the GSLB device’s IP before sending it back, making the user unaware of the intermediate hop. This method works for all protocols (HTTP, FTP, etc.) but adds extra hops, so it is generally used as a supplement to HTTP‑redirect.

Server Group Selection Strategies

Common GSLB strategies include:

1) Geographic or custom regions: divide IP prefixes into regions and direct users from a specific range to a healthy site.

2) IP‑address weight: assign a weight to each IP in DNS responses, influencing traffic distribution.

3) Round‑Trip Time (RTT): measure latency to choose the fastest site. RTT can be measured actively (using DNS queries or ICMP) or passively (observing TCP SYN‑ACK times).

Active RTT may be blocked by security policies and generates extra traffic.

Passive RTT does not generate additional traffic; it measures the time from a client’s SYN to the server’s ACK, reflecting the real user experience and avoiding interference from network security rules.

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.

network optimizationContent Delivery NetworkGSLBGlobal Load Balancing
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.