Pcornel
Web Infrastructure

Content Delivery Networks

Cheat sheet · https://pcornel.dk/topic.php?topic=6268

Back to the Topic

Answer

A content delivery network (CDN) is a distributed set of edge servers that terminate client connections close to users, cache responses, and forward the rest to your origin.

Remember

The CDN is now part of your HTTP path: it has its own cache rules, timeouts, TLS certificates and logs. The origin sees CDN IPs — use the provider's client-IP header and trust it only from CDN ranges. Lock the origin so it cannot be reached around the CDN.

First checks

  • dig +short <host> / dig +short CNAME <host> — does the name point at the CDN?
  • curl -sSI https://<host>/ — CDN headers: Age, Cache-Status or provider cache header, Via, Server.
  • curl -sSI --resolve <host>:443:<origin-ip> https://<host>/ — origin response without the CDN.
  • Provider dashboard: cache hit ratio, origin errors (5xx), purge history.

Verify in this order

client → DNS (CNAME/anycast) → nearest edge POP (TLS, WAF) → edge cache → optional origin shield → origin (TLS) → response cached per rules → client

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6268

Confirmation

Confirm action

Continue?