← Lessons

quiz vs the machine

Platinum1720

Networking

The CDN Edge Cache Hit

How a content delivery network serves content from a nearby edge node.

5 min read · advanced · beat Platinum to climb

Closer is faster

A content delivery network places cache servers, called edge nodes, in many locations near users. Serving a file from a nearby edge avoids a long round trip to the distant origin, cutting latency dramatically.

Hit and miss

When a request reaches the nearest edge, two outcomes are possible:

  • On a cache hit the edge already holds a fresh copy and returns it immediately.
  • On a cache miss the edge fetches from the origin, returns the result, and stores it for the next request.

Freshness follows cache control headers and TTLs much like DNS. The first user to request an object in a region pays the miss penalty, and everyone after them benefits from the hit until the object expires or is evicted.

Beyond a single hit

CDNs raise the hit ratio with tactics like tiered caching, where a regional parent shields the origin, and request coalescing, where many simultaneous misses for the same object trigger only one origin fetch. A high hit ratio is the main lever for both speed and origin protection.

Key idea

A CDN serves cache hits from a nearby edge node, fetching from origin only on a miss, and a high hit ratio drives both low latency and origin offload.

Check yourself

Answer to earn rating on the learn ladder.

1. What happens on a CDN cache hit?

2. How does request coalescing protect the origin?