CDN Delivery Network: What It Is and How It Works

CDN Delivery Network: What It Is and How It Works

A CDN delivery network, short for content delivery network, is a group of servers spread across many locations that store copies of your website's files and serve them from the location closest to each visitor. Instead of every request traveling to your origin server, most are answered by a nearby edge server. That cuts load time, reduces the strain on your hosting, and keeps the site up during traffic spikes.

A CDN does not replace your web host. It sits between your visitors and your origin, caches what can be cached, and fetches the rest when it has to. This article covers why a CDN matters, how a request flows through one, what it can and cannot deliver, how to set one up and check that it works, and what changes for online stores.

Nostra AI runs its agents at the edge of more than 300 ecommerce storefronts, so the explanations below come from watching CDN delivery work on real stores. The last section shows where standard CDN delivery stops and where edge delivery built for ecommerce picks up.

Why a CDN delivery network matters

A content delivery network matters because it fixes three problems that hosting alone cannot: distance, origin load, and sudden traffic. Fixing them makes pages faster and the site much harder to knock over.

Shorter distance means faster pages

Data travels at a finite speed, so the farther a visitor is from your server, the longer every round trip takes. A round trip between New York and London takes roughly 60 to 80 ms in practice. A page needs several of those trips before the first byte arrives: one for the TCP connection, one for the TLS handshake with modern TLS, and one for the request itself.

A nearby edge server beside a laptop, and a faraway data center linked by a long cable.

As an illustration, three round trips at 60 to 80 ms add up to 180 to 240 ms of pure travel time. From an edge server 10 ms away, the same three steps take about 30 ms. That gap shows up in Time to First Byte (TTFB), the metric Google's web.dev guidance on TTFB describes, and it flows into Largest Contentful Paint.

A CDN does not make your server faster. It makes the distance to your server shorter.

Less load on your origin server

Every request an edge server answers is a request your origin never sees. The share of requests answered from cache is the cache hit ratio, and it sets how much traffic reaches your origin. Take a site with 1,000,000 requests a day:

Cache hit ratio Requests answered at the edge Requests reaching the origin
0% (no CDN) 0 1,000,000
50% 500,000 500,000
90% 900,000 100,000
95% 950,000 50,000

At 90%, your origin handles one tenth of the traffic. That lowers bandwidth and hosting costs and gives the server room to survive a spike, such as a sale or a viral post.

Availability, security, and search

Because a CDN is distributed, one failed server or data center does not take the site down. Traffic shifts to another location. The edge also takes the first hit from floods of junk requests, and it can hide your origin's address from direct attack.

Search benefits are indirect. Google does not rank a site higher for using a CDN. It does measure speed and Core Web Vitals, and a CDN usually improves both. So yes, CDN delivery is still standard practice, and a large share of web traffic now passes through one.

How a content delivery network works

A CDN answers each request from a cached copy on a nearby edge server, and it goes back to your origin only when it has no valid copy. Everything else, from routing to cache rules, supports that one behavior.

The parts of a CDN

Five components do the work. Each has a distinct job:

Component What it does
Origin server Holds the original content. It is the source of truth.
Edge server Caches copies and serves them to nearby visitors.
Point of presence (PoP) A location with several edge servers handling regional traffic.
Routing layer Sends each visitor to a suitable edge, using DNS or Anycast.
Cache rules Decide what gets cached, for how long, and when it is refreshed.

Following one request

Here is what happens when a visitor opens a page behind a CDN:

Five-step process showing a request moving from DNS to an edge server, with a cache hit or miss.

  1. The visitor's browser asks DNS for your domain. DNS points to the CDN, not your origin.
  2. The CDN's routing layer sends the request to the closest healthy edge location.
  3. On a cache hit, the edge already has a valid copy and serves it immediately.
  4. On a cache miss, the edge fetches the file from your origin, serves it, and stores a copy.
  5. The next visitors nearby get that stored copy.

The first visitor in each region pays the cost of the miss. That is why a new CDN setup looks modest at first and improves as caches fill.

Keeping cached content fresh

Two controls keep copies current. TTL (time to live) sets how long an edge may reuse a copy before checking the origin. A purge removes a copy on demand, which you use after changing a product image or fixing a page. Starting points that work for most sites:

Content Typical TTL
Versioned JS, CSS, fonts Up to 1 year
Images Days to weeks
HTML pages Minutes, or cache and purge on change
Personalized pages, carts, account data Do not cache

Your origin sends these instructions in a response header. A long-lived static file looks like this:

Cache-Control: public, max-age=31536000, immutable

Caching is the engine of a CDN. Every cache hit is a trip to your origin that never happens.

What a CDN delivers and what it does not replace

A CDN delivers static files best, speeds up dynamic content within limits, and never replaces your web host. Knowing that boundary keeps you from expecting too much, or too little, from it.

Static and dynamic content

Static content is the natural fit: images, CSS, JavaScript, fonts, documents, software downloads, and video segments. These files look the same for every visitor, so one cached copy serves thousands. A CDN content delivery network also carries streaming media and large downloads such as installers and game patches.

Dynamic content is harder. Carts, logged-in pages, and API responses differ per user, so they cannot be cached blindly. A CDN still helps by routing over optimized connections, reusing TLS sessions, and caching selected responses under strict rules.

CDN versus hosting and DNS

Hosting stores your site. A CDN speeds up access to it. The two work together:

Web hosting CDN
Role Stores and runs your site Caches and delivers it near visitors
Position Final destination (origin) Middle layer between visitor and origin
Location Usually one or a few regions Hundreds of locations
Effect on traffic Handles every request it receives Absorbs repeat requests so the origin sees fewer

DNS is a different tool again. It translates a domain name into an IP address. A CDN uses DNS to steer visitors, but DNS alone delivers no content.

Hosting keeps the original. A CDN keeps the nearby copies.

How to add a CDN to your site and check it works

Adding a CDN takes five steps: audit your traffic, choose a provider, route your domain through it, set cache rules, and verify the result. Most sites finish the basics in a day.

The five setup steps

  1. Audit first. Record your current TTFB and LCP from real-user data and note where visitors are located. You need a baseline to prove the CDN helped.
  2. Choose a provider. Weigh coverage in your key markets, caching control, dynamic acceleration, security features, analytics, and support.
  3. Route traffic. Point your domain at the CDN with a CNAME record or by changing nameservers, as your provider instructs.
  4. Set cache rules. Cache static assets for a long time, keep personalized paths out of cache, and decide how you will purge.
  5. Verify and monitor. Watch cache hit ratio, TTFB by region, error rate, and origin traffic for two weeks.

Picking a provider

Cloudflare, Akamai, Fastly, and Amazon CloudFront are widely used examples, and cloud hosts often bundle their own. Test performance in the regions your customers actually live in, not just the provider's total location count. Some providers offer free tiers, but expect limits on features, support, or traffic.

Checking whether a site uses a CDN

Open your browser's developer tools, load the page, and read the response headers in the Network tab. You can also run this in a terminal:

curl -I https://www.example.com

Look for headers such as cf-cache-status, x-cache, via, or x-served-by. A value like HIT means the edge answered from cache. A DNS lookup that returns a CDN provider's hostname is another sign.

Test the CDN where your customers are. A big network map means little if your key markets are thin.

CDN delivery for ecommerce storefronts

Standard CDN delivery covers images and scripts, but on a store the HTML document is often the slowest and least cached part. Edge delivery for ecommerce extends caching to that HTML so the first byte arrives sooner.

Why store HTML is the hard part

Product, collection, and home pages are mostly identical across visitors, yet they sit next to carts, prices, and logged-in states. Cache them carelessly and a shopper sees someone else's content. That is why many stores leave HTML uncached and take a slow TTFB on every page view, even with a CDN in front.

A laptop with a store product page, a shopping cart, a padlock, and a small server rack.

How Dash handles it

Dash, Nostra AI's Edge Delivery agent, caches a store's HTML at the edge across more than 310 edge locations. It profiles pages and tests optimizations in a sandbox before touching live traffic. Deployment is a DNS-level change with no code changes, no downtime, and no engineering lift. A store goes live in a day and is fully tuned in about two weeks.

Results vary by store, but a live A/B test for Popflex showed TTFB down 25.8% and conversion rate up 7.49%. Across its 300+ brands, Nostra AI reports up to 47% faster load times.

On a store, caching images is the easy win. Caching the HTML safely is where the speed is.

Where to go from here

A CDN delivery network puts cached copies of your content on servers near your visitors. The result is shorter distances, fewer requests to your origin, and a site that holds up under load. Set it up in five steps, tune TTLs by content type, and verify with response headers and regional TTFB.

Once a CDN or edge layer sits in front of your origin, every request passes through it. That makes it the right place to stop unwanted traffic too. If bots distort your analytics or waste ad spend, see how Edge Protect filters bad bots in real time before they reach your storefront.