Course contentsShow
← Cloud and Infrastructure
Lesson 2671 of 2,98958. Caching StrategiesFree lesson

CDN Caching Fundamentals Review

Revisit core CDN caching concepts including edge locations, cache hits/misses, and TTL basics.

CDN Caching Fundamentals Review

You'll learn how CDNs leverage edge locations, cache mechanics, and TTL to dramatically reduce latency and backend load.

What is CDN Caching?

A Content Delivery Network (CDN) caches copies of your content at geographically distributed edge locations (data centers close to end users). When a user requests content, the CDN serves it from the nearest edge rather than your origin server—like having local warehouses instead of shipping everything from a single factory.

Core Concepts

Edge Locations

Physical servers distributed worldwide that store cached copies of your content. A user in Tokyo hits a Tokyo edge location; a user in London hits a London edge.

Cache Hits vs Cache Misses

  • Cache Hit: Content exists in the edge cache and is served immediately (fast!)
  • Cache Miss: Content doesn't exist at the edge, so the CDN fetches it from your origin server, caches it, then serves it (slower first time, fast thereafter)

Time to Live (TTL)

The TTL defines how long cached content remains valid before the CDN checks for updates. A 3600-second TTL means the edge serves the cached version for one hour before requesting a fresh copy from origin. Shorter TTLs mean fresher content but more origin requests; longer TTLs reduce backend load but may serve stale content.

Think of it like: A newsstand (edge) stocks yesterday's papers (cache). The TTL is how often they restock. Short TTL = frequent restocking (current news, more deliveries). Long TTL = infrequent restocking (less delivery cost, but outdated papers).

Key Takeaway:
CDN caching moves content closer to users via edge locations, balancing freshness (TTL) with performance (cache hits) to minimize latency and origin load.