Cloud CDN Calculator
Model Cloud CDN cost and savings from a cache hit ratio, cache fill, lookup requests and invalidations.
About Cloud CDN Calculator
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
Worked example
With the default values below, Cloud CDN Calculator returns Monthly Cost with CDN of $5,980.10. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Content delivered to usersaccepts 0–100,000 TiB
- 50 TiB
- Cache hit ratioaccepts 0–100 %
- 85 %
- CDN egress price per GiBaccepts 0–10 USD/GiB
- 0.08 USD/GiB
- Origin egress price per GiBaccepts 0–10 USD/GiB
- 0.12 USD/GiB
- Cache fill price per GiBaccepts 0–10 USD/GiB
- 0.01 USD/GiB
- Cache lookup requestsaccepts 0–10,000,000 millions
- 2,000 millions
- Lookup price per 10,000 requestsaccepts 0–5 USD
- 0.0075 USD
- Cache invalidations issuedaccepts 0–100,000 invalidations
- 20 invalidations
- Price per invalidationaccepts 0–50 USD
- 0.005 USD
- Cache fill as a share of missesaccepts 0–300 %
- 100 %
Results
- 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
- 1Values used
- 2Cloud CDN
- 3Monthly Cost with CDN= 5,980.10
- 4Cache Egress Charge= 3,481.60
- 5Origin Egress Charge= 921.60
- 6Cache Fill Charge= 76.80
- 7Lookup and Invalidation Charge= 1,500.10
- 8Cost Serving Everything from Origin= 6,144.00
Assumptions and limits
- The result is derived only from the 10 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
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.
