CDN Hit Ratio Calculator

Calculate CDN cache hit ratio and origin offload percentage. Measure how effectively your CDN serves content from edge locations.

$
$
CDN Hit Ratio
95.00%
Rating: Excellent โ€” well-optimized cache
Miss Ratio
5.00%
25.0 GB/mo sent to origin
Total Requests
1,000,000
11.6 avg requests/sec
Origin Multiplier
20ร—
Traffic increase origin would handle without CDN
Monthly Bandwidth Cost
$6.75
CDN: $4.75 + Origin: $2.00
Monthly Savings vs All-Origin
$33.25
$399.00/year saved vs serving all from origin
Without-CDN Cost
$40.00
Estimated monthly cost if all traffic went to origin
Daily Cache Invalidations
1.0
Based on TTL of 24h โ€” lower TTL means more origin fetches
Hit Ratio
95% โ€” Excellent

Cost Comparison by Hit Ratio

ScenarioMonthly CostMonthly SavingsAnnual Savings
70% hit ratio$15.50$24.50$294.00
80% hit ratio$12.00$28.00$336.00
90% hit ratio$8.50$31.50$378.00
95% hit ratio$6.75$33.25$399.00
99% hit ratio$5.35$34.65$415.80
Planning notes, formulas, and examples

About the CDN Hit Ratio Calculator

CDN hit ratio measures the percentage of requests served from CDN edge locations versus forwarded to your origin server. A high CDN hit ratio means most users receive content from a nearby edge, resulting in faster load times and lower origin server load.

This calculator computes CDN hit ratio from edge-served and origin-served request counts, showing the offload percentage and estimated origin traffic reduction. Optimizing CDN hit ratio can reduce origin bandwidth costs by 80โ€“95% while improving global performance.

CDN providers like Cloudflare, AWS CloudFront, Akamai, and Fastly all report hit ratio metrics. This calculator helps you interpret those numbers and set optimization targets for your CDN configuration.

When This Page Helps

CDN costs are based on edge traffic, while origin costs are based on origin traffic. A high CDN hit ratio reduces origin infrastructure requirements and costs while improving user experience. This calculator quantifies your CDN effectiveness.

How to Use the Inputs

  1. Get CDN-served and origin-served request counts from your CDN dashboard.
  2. Enter the number of requests served by CDN edge nodes.
  3. Enter the number of requests forwarded to origin.
  4. Review the CDN hit ratio and origin offload percentage.
  5. Target 90%+ CDN hit ratio for predominantly static sites.
  6. Investigate origin requests to find optimization opportunities.
Formula used
CDN Hit Ratio = CDN Served / (CDN Served + Origin Served) ร— 100. Origin Offload = CDN Hit Ratio. Origin Traffic = Total ร— (1 โˆ’ Hit Ratio).

Example Calculation

Result: 95.00% CDN hit ratio, 95% origin offload

950,000 of 1,000,000 requests served from CDN edges yields a 95% hit ratio. Your origin only handles 50,000 requests (5% of traffic). If the CDN were removed, origin traffic would increase 20x.

Tips & Best Practices

  • Set appropriate Cache-Control headers to maximize CDN cacheability.
  • Use cache keys wisely โ€” avoid unnecessary query parameters that fragment the cache.
  • Configure CDN to cache 404 and redirect responses to reduce origin load.
  • Use CDN cache purge strategically rather than setting very short TTLs.
  • Monitor hit ratio by content type: static assets should be 95%+, API responses vary.
  • Serve images and videos through CDN with long TTLs for best hit ratios.

CDN Architecture

CDNs distribute content across globally distributed edge locations (Points of Presence). When a user requests content, the CDN routes the request to the nearest edge. If the edge has the content cached (hit), it serves it directly. If not (miss), it fetches from origin, caches it, then serves the response.

Optimizing for Edge Caching

Maximize CDN hit ratio by: using content-addressed URLs for static assets (hash in filename), setting long TTLs (1 year for versioned assets), normalizing cache keys, enabling brotli/gzip compression at the edge, and implementing stale-while-revalidate patterns.

Cost Implications

CDN pricing is based on edge traffic volume. Origin traffic has separate costs (server compute, bandwidth). A 5% improvement in CDN hit ratio from 90% to 95% cuts origin traffic in half, potentially halving origin bandwidth costs.

Multi-CDN Strategy

Large-scale sites use multiple CDNs for redundancy and global coverage. Each CDN's hit ratio should be monitored independently. Tools like Cedexis or NS1 can route traffic to the optimal CDN based on real-time performance data.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • For static content (images, CSS, JS): 95%+ is expected. For dynamic HTML: 70โ€“90% depending on cacheability. For API responses: 50โ€“80% if using edge caching. An overall site hit ratio of 85%+ is good.