EMZETT.
Login

CDN (content delivery network)

In short: A CDN is a worldwide network of servers that deliver copies of files (images, scripts, videos) close to the user.

In more detail: Instead of fetching every file from the origin server, the user gets it from the nearest location. This reduces latency and relieves the origin. It is controlled through cache headers (for example Cache-Control: max-age).

In Depth

  • Cache hit and miss: On the first request the location fetches the file from the origin, afterwards it delivers it itself.
  • Invalidation: New file names with a hash (app.3f9a.js) bypass stale copies.
  • Protection: CDNs absorb many attacks (DDoS, bots).
  • Privacy: A CDN processes IP addresses. Embedded third-party scripts and fonts are relevant to data protection (Google Fonts and data protection).

See also: Nginx and reverse proxy, HTTP caching