Fundamentals 8 min read

How CDN Supercharges Web Performance: From DNS to Edge Caches

This article explains the fundamentals of Content Delivery Networks (CDN), detailing how browsers request resources, the role of DNS, the long-haul backbone bottleneck, and how CDN edge servers cache content to reduce latency and bandwidth load, illustrated with real-world examples like ticket‑booking spikes.

Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
How CDN Supercharges Web Performance: From DNS to Edge Caches

Hello, I'm Shu Ge!

Browser Network Request

To understand CDN we first need to know how a browser makes a request. The process includes entering a URL, DNS resolution, receiving the IP address, and then requesting the content from the server.

User enters the website domain in the browser.

Browser queries the local DNS server for domain resolution.

If the local DNS has a cached result, it returns the IP address.

Otherwise the DNS server recursively resolves the domain.

The browser receives the IP address.

The browser requests the content from the server.

The server returns the requested content to the browser.

These steps allow the user to see the page, but steps 6 and 7 involve complex data transmission over the public internet, long‑haul backbone, and the user's local network.

The long‑haul backbone is the most time‑consuming part, traversing data centers, backbone networks, regional networks, and access networks.

When many users request large amounts of data simultaneously (e.g., millions of users buying tickets on 12306), the backbone can become a bottleneck.

What Is a CDN?

CDN stands for Content Delivery Network. It stores data on edge servers close to users, reducing the distance data must travel and decreasing latency.

When a browser requests an image, it first checks the CDN cache server. If the content is cached, it is returned immediately; otherwise the request goes to the origin server.

CDN providers place cache servers in multiple regions (e.g., South China, North China, East China, Southwest) so users can fetch data from the nearest server.

CDN Working Principle

After integrating CDN, the browser’s request flow changes: the domain’s CNAME points to the CDN’s DNS, which returns the IP of a global load‑balancer, which then selects the optimal edge server based on the user’s IP and request.

Browser requests the image URL; DNS resolution delegates to the CDN’s DNS.

CDN DNS returns the IP of a global load‑balancer.

Browser contacts the global load‑balancer.

The global load‑balancer selects a regional load‑balancer based on the user’s IP.

The regional load‑balancer chooses the best CDN cache server (considering load and distance) and returns its IP.

The global load‑balancer returns the cache server IP to the user.

User requests the content from the cache server, which serves it.

Websites only need to point their domain to the CDN provider and upload content to the CDN to achieve acceleration.

Summary

CDN is essentially a network of distributed cache servers that, together with DNS, direct users to the nearest server, reducing backbone traffic and improving user experience.

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.

web performanceCDNnetwork optimizationContent Delivery Network
Xiao Lou's Tech Notes
Written by

Xiao Lou's Tech Notes

Backend technology sharing, architecture design, performance optimization, source code reading, troubleshooting, and pitfall practices

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.