Calculate CDN cache hit ratio and origin offload percentage. Measure how effectively your CDN serves content from edge locations.
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.
Integrating this calculation into monitoring and reporting workflows ensures that engineering decisions are grounded in real data rather than assumptions about system behavior. Precise measurement of this value supports informed infrastructure decisions and helps engineering teams optimize system architecture for both performance and cost efficiency.
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. Data-driven tracking enables evidence-based infrastructure decisions, reducing the risk of over-provisioning costs or under-provisioning that leads to performance bottlenecks.
CDN Hit Ratio = CDN Served / (CDN Served + Origin Served) × 100. Origin Offload = CDN Hit Ratio. Origin Traffic = Total × (1 − Hit Ratio).
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.
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.
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.
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.
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.
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.
Common causes: Cache-Control headers set to no-cache, query strings creating unique cache keys, vary headers fragmenting the cache, short TTLs, low traffic (cache entries expire before reuse), and dynamic content that cannot be cached. Consulting relevant industry guidelines or professional resources can provide additional context tailored to your specific circumstances and constraints.
Set long Cache-Control max-age for static assets (1 year with content hashing). Normalize cache keys by removing unnecessary query parameters. Enable stale-while-revalidate. Preload popular content to warm edge caches.
Origin shielding adds a CDN-managed cache layer between edge POPs and your origin. Instead of every edge POP hitting origin on a miss, they hit the shield POP first. This can increase the effective hit ratio for the origin by 10–20%.
Indirectly. Higher CDN hit ratio means faster page loads (content served from nearby edge), which improves Core Web Vitals scores. Google uses page speed as a ranking signal, so CDN optimization can improve search rankings.
Continuously, with alerting on significant drops. A sudden drop in CDN hit ratio may indicate misconfigured headers after a deploy, cache purge issues, or traffic pattern changes. Include CDN hit ratio in your deployment verification checklist.