An Introduction to Content Delivery Networks (CDN) and Global Server Load Balancing (GSLB)
This article explains the fundamentals of Content Delivery Networks (CDN), their architecture, key functions, and principles, and then details Global Server Load Balancing (GSLB) techniques—including DNS‑based, HTTP‑redirect, and IP‑spoofing methods—along with server‑selection strategies and their advantages and drawbacks.
CDN (Content Delivery Network) is an intelligent virtual network built on top of the existing Internet infrastructure, using geographically distributed edge servers and a central platform for load balancing, content distribution, and scheduling, allowing users to retrieve content from nearby servers, reducing congestion and improving response speed and hit rate.
The core idea of CDN is to cache content on edge servers and direct user requests to the nearest healthy cache server via global load‑balancing, so the cache server directly responds to the user.
Global load balancing enables a single IP or domain to route users to the nearest server, improving access speed for worldwide users.
CDN aims to avoid network bottlenecks, delivering content faster and more stably by dynamically directing requests to the optimal node based on traffic, load, distance, and response time.
Key CDN functions include saving backbone bandwidth, accelerating server‑side performance, reducing site construction and maintenance costs, overcoming uneven site distribution, and improving network stability.
CDN service model consists of distributed storage, load balancing, request redirection, and content management, with the latter and global traffic management being core components; edge proxy caches act as a single‑hop source for users.
Global Server Load Balancing (GSLB) balances traffic among server groups located in different regions, selecting the optimal group based on proximity and load.
Server‑group selection considers physical distance (proximity) and current load, using static IP‑to‑group mappings or dynamic measurements such as round‑trip time (RTT).
Common GSLB implementations are DNS‑based, HTTP‑redirect, and IP‑spoofing (triangular routing). DNS‑based GSLB is simple and low‑cost but may misjudge user location because it sees the resolver’s IP, not the user’s.
HTTP‑redirect GSLB solves the DNS misjudgment by redirecting the user’s HTTP request to the best server, allowing accurate IP detection, but works only for HTTP traffic.
IP‑spoofing GSLB extends redirection to all protocols (HTTP, FTP, etc.) by rewriting the source IP of the server’s response to the GSLB device’s IP, though it adds an extra hop and slightly higher latency.
Server‑group selection strategies include geographic or custom IP‑prefix zones, IP‑address weighting, and RTT‑based selection (active or passive). Active RTT measures via DNS queries or ICMP, which may be blocked; passive RTT measures the time from SYN to ACK, reflecting real user experience without extra traffic.
Overall, the article provides a comprehensive overview of CDN architecture, its functional benefits, and various GSLB techniques and selection strategies, highlighting their pros and cons.
Architecture Digest
Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.
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.