Skip to content
Calcrivo

Cloud CDN Calculator

Model Cloud CDN cost and savings from a cache hit ratio, cache fill, lookup requests and invalidations.

Inputs

TiB
%

Cache hit ratio is the single biggest driver of both CDN cost and origin load.

USD/GiB
USD/GiB

Cache misses are served from the origin and billed at the standard egress rate.

USD/GiB

Moving content from your origin into the cache is billed separately from delivery.

millions
USD
invalidations
USD
%

Above 100% means content is re-fetched into several caches, which happens with short time-to-live values.

Monthly Cost with CDN

$5,980.10

Cache Egress Charge

$3,481.60

Origin Egress Charge

$921.60

Cache Fill Charge

$76.80

Lookup and Invalidation Charge

$1,500.10

Cost Serving Everything from Origin

$6,144.00

Monthly Saving

$163.90

Hit Ratio Needed to Break Even

73.2%

Step by step

  1. Values used

    Content delivered to users = 50 TiB; Cache hit ratio = 85 %; CDN egress price per GiB = 0.0800 USD/GiB; Origin egress price per GiB = 0.1200 USD/GiB; Cache fill price per GiB = 0.0100 USD/GiB; Cache lookup requests = 2,000 millions; Lookup price per 10,000 requests = 0.0075 USD; Cache invalidations issued = 20 invalidations; Price per invalidation = 0.0050 USD; Cache fill as a share of misses = 100 %

  2. Cloud CDN

    cost = hit GiB × cache egress price + miss GiB × origin egress price + fill GiB × fill price + lookups ÷ 10,000 × lookup price; saving = all GiB × origin price − that total.

  3. Monthly Cost with CDN

    = 5,980.10

  4. Cache Egress Charge

    = 3,481.60

  5. Origin Egress Charge

    = 921.60

  6. Cache Fill Charge

    = 76.80

  7. Lookup and Invalidation Charge

    = 1,500.10

  8. Cost Serving Everything from Origin

    = 6,144.00

How it works

Cloud CDN is cheaper per GiB than origin egress, but it adds two meters origin serving does not have: cache fill and per-request lookups. The saving is therefore the price gap multiplied by the hit ratio, minus that overhead — and a short time-to-live can push cache fill above 100% of misses because the same object is fetched into many caches. A CDN with a poor hit ratio can cost more than no CDN at all, and hit ratio is driven by cache keys, query strings and time-to-live rather than by anything you buy. Confirm cache egress, fill and lookup prices for the destination continents you serve in the Google Cloud pricing calculator.

Formula

Cloud CDN

cost = hit GiB × cache egress price + miss GiB × origin egress price + fill GiB × fill price + lookups ÷ 10,000 × lookup price; saving = all GiB × origin price − that total.

hit ratio
Share of bytes served from cache instead of the origin
cache fill
Bytes pulled from the origin into a cache, billed on top of delivery
break-even hit ratio
Hit ratio at which the lookup and fill overhead is repaid by the cheaper cache egress rate

Frequently Asked Questions

How is Cloud CDN calculated?

cost = hit GiB × cache egress price + miss GiB × origin egress price + fill GiB × fill price + lookups ÷ 10,000 × lookup price; saving = all GiB × origin price − that total. Cloud CDN is cheaper per GiB than origin egress, but it adds two meters origin serving does not have: cache fill and per-request lookups. The saving is therefore the price gap multiplied by the hit ratio, minus that overhead — and a short time-to-live can push cache fill above 100% of misses because the same object is fetched into many caches.

Why does Cloud CDN matter?

A CDN with a poor hit ratio can cost more than no CDN at all, and hit ratio is driven by cache keys, query strings and time-to-live rather than by anything you buy. Confirm cache egress, fill and lookup prices for the destination continents you serve in the Google Cloud pricing calculator.

What values do I need to enter?

This calculator takes 10 inputs: Content delivered to users, Cache hit ratio, CDN egress price per GiB, Origin egress price per GiB, Cache fill price per GiB, Cache lookup requests, Lookup price per 10,000 requests, Cache invalidations issued, Price per invalidation, Cache fill as a share of misses. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

How do I raise the cache hit ratio?

Strip query parameters that do not change the response from the cache key, set a longer time-to-live with explicit Cache-Control headers, and version asset filenames so you can cache them for a year and invalidate by deploying a new name rather than by purging.

You might also need