Guide

Two numbers decide what a CDN costs you. One is the egress price, what you pay for each GB delivered. The other is the hit ratio, the share of traffic served from cache. Every miss costs origin compute, origin bandwidth and latency, so hit ratio is the lever that moves the bill.

Concept

Request hit ratio counts requests served from cache. Byte hit ratio counts bytes. Bandwidth is billed by bytes, so byte hit ratio drives the transfer cost.

The big idea

A miss is the expensive event. A hit costs the CDN's delivery price. A miss also costs the origin's compute and its outbound transfer.

Hit ratio and miss rate are opposites, so improvements near the top of the range look small but are large in effect. Going from 80% to 95% looks like 15 points. The miss rate actually falls from 20% to 5%, which is four times fewer origin requests.

Some clouds don't charge for transfer from their own origin to their own CDN. There, a better hit ratio shows up as a smaller origin fleet and lower latency rather than a smaller transfer bill. Check the pricing model before you argue about cost in a design review.

Walking through it

Egress to the internet costs roughly $0.05 to $0.09 per GB at list price, as of 2025 to 2026. CDN delivery is usually cheaper at volume, and committed contracts cut it further.

Take a media site that delivers 500 TB a month through its CDN, with origin egress at $0.09 per GB, or $90 per TB.

                          80% byte hit ratio    95% byte hit ratio
Bytes served from cache   400 TB                475 TB
Bytes fetched from origin 100 TB                 25 TB
Origin egress cost        100 × $90 = $9,000    25 × $90 = $2,250
Origin peak bandwidth     20% × 40 = 8 Gbps     5% × 40 = 2 Gbps

Going from 95% to 80% costs $6,750 more in origin egress each month. Origin servers scale with the miss rate too, so you can run about a quarter of the origin fleet.

Latency improves the same way. Say a hit takes 20 ms and a miss takes 250 ms.

80%: 0.80 × 20 + 0.20 × 250 = 16 + 50   = 66 ms average
95%: 0.95 × 20 + 0.05 × 250 = 19 + 12.5 = 31.5 ms average

The levers that raise hit ratio are the ones from the earlier pages: an origin shield, normalized cache keys, immutable versioned assets, long TTLs with tag-based purging, and stale-while-revalidate.

Very large streaming companies go further and build their own CDNs. Netflix's Open Connect places its appliances inside ISP networks and fills them overnight with content it expects to be popular the next day. Most bytes never cross the wider internet.

Common mistakes

  • Quoting request hit ratio for cost. A site can serve 98% of requests from cache and still pay for most of its bytes, because the big files miss.
  • Ignoring origin cost. Egress is only part of it. Origin compute and bandwidth scale with misses too.
  • Assuming free transfer. Check whether your cloud charges for origin-to-CDN transfer before you claim savings.

Check yourself

  1. Why does going from 80% to 95% hit ratio cut origin traffic by about four times? The miss rate falls from 20% to 5%, a factor of four.
  2. Which hit ratio should you use to estimate bandwidth cost? Byte hit ratio, because transfer is billed by bytes.

Key takeaways

  • Cost and origin load both scale with the miss rate, not with the hit rate.
  • Going from 80% to 95% hit ratio cut origin traffic by a factor of four in the example.
  • Bandwidth follows byte hit ratio. Request hit ratio can mislead you.
  • Check the cloud's pricing model before you count transfer savings.

Further learning

Next, read about edge compute and security, which covers what else the edge can do.