Skip to main content

Edge Cache Hit Rate Estimator

Calculate CDN edge cache hit rates with TTL analysis and optimization recommendations. Enter values for instant results with step-by-step formulas.

Formula

Hit Rate = Base Rate ร— Asset Coverage ร— TTL Factor + Cacheability Bonus

Base rate (85% industry average) is adjusted by cache size coverage of unique assets, TTL effectiveness (normalized to 1 hour), and percentage of cacheable content.

Worked Examples

Example 1: E-commerce Product Images

Problem:CDN serving 10M monthly requests for 50,000 product images. 80% cacheable, 2-hour TTL, 50GB edge cache, 150ms origin.

Solution:Cacheable: 10M ร— 80% = 8M requests\nCache size: 50GB / 50KB avg = 1M assets (covers all)\nTTL factor: 120min/60 = 1.0 (optimal)\n\nBase hit rate: 85% ร— 1.0 ร— 1.0 = 85%\nWith cacheability bonus: 85% + 8% = 93%\n\nCache hits: 8M ร— 93% = 7.44M\nCache misses: 560K\nBypass: 2M\n\nLatency: (7.44Mร—20 + 2.56Mร—150)/10M = 53ms avg\nOrigin load reduction: 74.4%

Result:93% hit rate | 53ms avg latency | 74% origin reduction

Example 2: News Site Articles

Problem:Media site: 5M daily requests, 10,000 articles, 60% cacheable (40% personalized), 15-min TTL for freshness, 5GB cache.

Solution:Cacheable: 5M ร— 60% = 3M requests\nCache capacity: 5GB / 100KB = 50K articles (covers all)\nTTL factor: 15/60 = 0.25 (short TTL hurts)\n\nBase hit rate: 85% ร— 1.0 ร— 0.25 = 21.25%\nWith cacheability: 21.25% + 6% = 27.25%\n\nThis is LOW due to short TTL.\n\nRecommendation: Use stale-while-revalidate\nWith SWR (simulated 4hr effective): 85% ร— 1.0 ร— 1.0 = 85%+\n\nTrade-off: freshness vs performance

Result:27% hit rate (too low) | Implement SWR for 85%+ | Balance freshness

Example 3: SaaS Static Assets

Problem:SaaS app: 50M monthly requests, 2,000 JS/CSS/font files, 95% cacheable, 7-day TTL, 20GB cache, immutable versioning.

Solution:Cacheable: 50M ร— 95% = 47.5M requests\nCache capacity: 20GB / 200KB = 100K files (50ร— coverage)\nTTL: 7 days >> 1 hour, factor = 1.0\n\nBase hit rate: 85% ร— 1.0 ร— 1.0 = 85%\nWith high cacheability: 85% + 9.5% = 94.5%\nWith immutable versioning: +3% = 97.5%\n\nCache hits: 47.5M ร— 97.5% = 46.3M\nBypass: 2.5M\n\nBandwidth saved: 46.3M ร— 200KB = 9.26TB/month\nCost savings: ~$463/month at $0.00001/origin request

Result:97.5% hit rate | 9.26TB bandwidth saved | $463/mo savings

Frequently Asked Questions

What is cache hit rate?

Cache hit rate is the percentage of requests served from cache versus origin. A 90% hit rate means 90 of 100 requests are served from edge cache without contacting origin servers. Higher rates mean faster responses and lower origin load.

What is a good edge cache hit rate?

Industry benchmarks: 90%+ is excellent, 80-90% is good, 60-80% is fair, below 60% needs optimization. CDNs like Cloudflare report average hit rates of 85-95% for optimized sites. Static sites can achieve 99%+.

How does TTL affect cache hit rate?

Longer TTLs increase hit rates by keeping content cached longer. Short TTLs (minutes) suit dynamic content but reduce hits. Static assets should use long TTLs (days/weeks). Balance freshness vs performance based on content type.

What content should be cached at the edge?

Cache: static assets (JS, CSS, images, fonts), API responses that rarely change, HTML for static pages. Don't cache: personalized content, real-time data, authenticated responses, POST requests, content with Set-Cookie headers.

References