How CDN Caching Works
- Alon Kochba
- Aug 20
- 1 min read
A cache hit happens when a user requests a file (like an image, CSS, or HTML) and the CDN already has a fresh copy stored at the edge. The edge server can return it immediately without contacting your origin, which reduces latency and lowers load on your infrastructure.
A cache miss occurs when the edge server doesn’t have the content yet, or the cached copy has expired or been invalidated. In that case, the CDN fetches the asset from the origin (or an upstream cache), serves it to the user, and typically stores it so the next request is more likely to be a hit.
Edge servers are the CDN’s globally distributed points of presence located close to end users. By terminating requests near the user and caching popular content locally, edge servers improve performance, smooth traffic spikes, and help keep your site responsive even during high demand.
Comments