Menu

CDN: What Is a Content Delivery Network?

5 min read Mis à jour le 05 Apr 2026

Définition

A CDN (Content Delivery Network) is a geographically distributed network of servers that caches and delivers web content (images, CSS, JavaScript, videos) from the server closest to the user, reducing latency and speeding up page loading.

What is a CDN?

A CDN (Content Delivery Network) is a system of servers distributed across numerous geographic locations around the world. These servers, called Points of Presence (PoPs) or edge servers, store cached copies of your website's content. When a user accesses your site, content is served from the PoP closest to their location, rather than from your origin server potentially located thousands of kilometres away.

Without a CDN, a user in Tokyo accessing a site hosted in Brussels must wait for each request to make the complete round trip via submarine cables and intermediate routers. With a CDN, static files (images, CSS stylesheets, JavaScript scripts, fonts) are served from an edge server in Tokyo, reducing latency from several hundred milliseconds to a few dozen.

At KERN-IT, we systematically use a CDN for our clients' websites and web applications. For a Wagtail or Django site, static assets — CSS compiled by Tailwind, JavaScript, images, fonts — are distributed via a CDN, while dynamic pages are generated by the origin server. This architecture combines performance with content freshness.

Why a CDN Matters

A CDN is no longer a luxury reserved for large sites: it is an essential component of any performant web architecture, with direct impact on user experience, SEO, and security.

  • Performance and speed: by reducing the physical distance between server and user, a CDN significantly decreases page load time. For a Wagtail site with high-resolution images, the difference is dramatic: Time to First Byte (TTFB) can drop from 800ms to under 50ms for static assets.
  • Direct SEO impact: Google uses Core Web Vitals as a ranking factor. Largest Contentful Paint (LCP) and First Input Delay (FID) are directly improved by a CDN. A faster site ranks better in search results.
  • Reduced server load: by serving static files from the CDN, your origin server only handles dynamic requests. This allows handling traffic spikes without oversizing infrastructure.
  • Enhanced availability: if a PoP goes down, traffic is automatically rerouted to the nearest functioning PoP. This inherent redundancy improves overall site availability.
  • DDoS protection: modern CDNs integrate protection mechanisms against distributed denial-of-service attacks, absorbing malicious traffic across their global network before it reaches your server.

How It Works

A CDN operates on the principle of geographically distributed caching. When a user first accesses a file (e.g., an image), the CDN retrieves it from the origin server (origin pull) and stores it in the cache of the nearest PoP. All subsequent requests for the same file are served directly from the PoP cache, without hitting the origin server.

CDN configuration is primarily done through HTTP cache headers. The Cache-Control header defines the cache duration (TTL). For static assets with hashed filenames (like those generated by Django compressor), a long TTL (one year) is optimal because the filename changes with every modification. For dynamic content, short TTLs or the no-cache directive ensure freshness.

DNS resolution plays a central role: the CDN domain is configured as a CNAME pointing to the CDN network. When the browser resolves the domain, the CDN's anycast DNS returns the IP address of the nearest PoP, ensuring optimal routing without user intervention.

Concrete Example

For a Wagtail CMS site developed by KERN-IT for an international Belgian client, we implemented a complete CDN architecture. The site, hosted on a Linux server in Brussels with Nginx and Gunicorn, generates dynamic pages in Django. Static assets — Tailwind-generated CSS files, compressed JavaScript, optimised images, and FKGrotesk fonts — are served via CloudFront (AWS) or Cloudflare depending on the context.

The result: European visitors experience full page load in under 1.5 seconds, and North American or Asian visitors in under 2.5 seconds. Without the CDN, the latter waited over 4 seconds. The Lighthouse performance score went from 72 to 95, with LCP under 1.2 seconds. The CDN bill amounts to less than 20 euros per month for 100,000 monthly visitors.

Implementation

  1. Choose a CDN provider: Cloudflare (free for basic features), AWS CloudFront, Azure CDN, or Google Cloud CDN. For most projects, Cloudflare offers the best features-to-price ratio.
  2. Configure DNS: point your domain or a subdomain (cdn.yoursite.com) to the CDN. With Cloudflare, simply change the domain's nameservers. With CloudFront, create a distribution and configure the CNAME.
  3. Configure cache headers: in Nginx or Django, set appropriate Cache-Control headers. Static assets with hash: max-age=31536000, immutable. Dynamic pages: no-cache or short TTL.
  4. Optimise assets: compress images (WebP, AVIF), minify CSS and JavaScript, enable Brotli or Gzip compression on the CDN. Use django-compressor to generate hashed files.
  5. Configure HTTPS: enable the SSL certificate on the CDN. Most CDNs offer free certificates. Configure "Full (Strict)" mode to encrypt traffic end-to-end.
  6. Test and monitor: use tools like GTmetrix, WebPageTest, or Lighthouse to measure the CDN's impact. Monitor the cache hit ratio (target: > 90%) in the CDN dashboard.

Associated Technologies and Tools

  • Cloudflare: free CDN with DDoS protection, WAF, and automatic optimisation.
  • AWS CloudFront: CDN integrated with the AWS ecosystem, ideal with S3 for static assets.
  • Nginx: often configured as a local cache in front of Gunicorn, complementing the CDN.
  • django-compressor: compression and hashing of Django static assets for optimal CDN caching.
  • Core Web Vitals: Google metrics directly improved by CDN usage.

Conclusion

A CDN is a minimal investment with maximum impact on web performance. By distributing static content from servers close to users, it reduces latency, improves Core Web Vitals, offloads the origin server, and enhances site availability. At KERN-IT, we systematically integrate a CDN into the architecture of our clients' sites and applications. For a Wagtail or Django site deployed with Nginx and Gunicorn, the CDN is the natural complement that transforms the user experience, especially for international audiences.

Conseil Pro

Configure your Django static assets with hashed filenames (via django-compressor or ManifestStaticFilesStorage) and a one-year Cache-Control. The hash in the filename ensures browsers automatically fetch the new version after each deployment, while benefiting from maximum CDN caching the rest of the time.

Un projet en tête ?

Discutons de comment nous pouvons vous aider à concrétiser vos idées.