Understanding Bandwidth and CDN Costs
Content Delivery Networks (CDNs) have become essential infrastructure for modern websites and applications. Whether you're running a small blog or a large-scale e-commerce platform, understanding bandwidth costs and CDN pricing can help you optimize your infrastructure spending while delivering fast, reliable content to users worldwide.
What is Bandwidth?
Bandwidth refers to the amount of data transferred between your server (or CDN) and your users. It's typically measured in gigabytes (GB) or terabytes (TB) per month. Every time a user visits your website, they download HTML, CSS, JavaScript, images, videos, and other assets - all of which consume bandwidth.
Calculating Your Bandwidth Needs
To estimate your monthly bandwidth, consider these factors:
- Monthly visitors: The total number of unique visitors
- Page views per visit: How many pages each visitor views on average
- Average page size: The total size of all assets loaded per page
- Repeat visits: Browser caching reduces bandwidth for returning visitors
The basic formula is:
Monthly Bandwidth = Visitors x Page Views x Average Page Size
What is a CDN?
A Content Delivery Network is a distributed network of servers that cache and deliver content from locations geographically closer to your users. Instead of every request going to your origin server, CDN edge servers handle most traffic, resulting in:
- Faster page load times
- Reduced origin server load
- Lower bandwidth costs at origin
- Better handling of traffic spikes
- Improved global availability
- DDoS protection
Major CDN Providers Compared
Cloudflare
Cloudflare offers a unique pricing model with unlimited bandwidth on all plans, making it extremely cost-effective for high-traffic websites.
| Plan | Price/Month | Features |
|---|---|---|
| Free | $0 | Unlimited bandwidth, basic DDoS protection, shared SSL |
| Pro | $20 | WAF, image optimization, mobile optimization |
| Business | $200 | Custom SSL, advanced DDoS, 100% uptime SLA |
| Enterprise | Custom | Dedicated support, advanced features, custom solutions |
AWS CloudFront
Amazon CloudFront uses a pay-as-you-go model based on data transfer and HTTP requests. Pricing varies by region.
| Data Transfer (First 10TB) | North America/Europe | Asia Pacific | South America |
|---|---|---|---|
| Per GB | $0.085 | $0.114 | $0.110 |
| HTTP Requests (per 10,000) | $0.0075 | $0.0090 | $0.0160 |
| HTTPS Requests (per 10,000) | $0.0100 | $0.0120 | $0.0220 |
Fastly
Fastly is known for real-time analytics and instant cache purging, popular with media companies and high-traffic sites.
| Region | Price per GB | Requests (per 10,000) |
|---|---|---|
| North America | $0.08 | $0.0075 |
| Europe | $0.08 | $0.0075 |
| Asia Pacific | $0.12 | $0.0090 |
| South America | $0.19 | $0.0160 |
Other Notable CDN Providers
- Akamai: Enterprise-focused, extensive global network, custom pricing
- KeyCDN: Budget-friendly at $0.04/GB, good for smaller sites
- Bunny CDN: Very affordable at $0.01/GB for some regions
- StackPath: Security-focused with integrated WAF
Understanding Cache Hit Rates
Cache hit rate is the percentage of requests served from CDN cache versus origin server. A higher cache hit rate means:
- Lower origin bandwidth costs
- Faster response times
- Reduced origin server load
Typical Cache Hit Rates by Content Type
| Content Type | Typical Cache Hit Rate | Recommended TTL |
|---|---|---|
| Static Images | 95-99% | 1 year |
| CSS/JavaScript | 90-98% | 1 year (with versioning) |
| HTML Pages | 60-85% | 5 minutes - 1 hour |
| API Responses | 40-70% | Varies by endpoint |
| Video Content | 85-95% | 1 week - 1 year |
Optimization Strategies
1. Optimize Asset Delivery
- Compress images using WebP or AVIF formats (30-50% smaller)
- Minify CSS and JavaScript files
- Enable Brotli or Gzip compression
- Use lazy loading for below-the-fold images
2. Maximize Cache Efficiency
- Set appropriate Cache-Control headers
- Use versioned URLs for static assets
- Implement stale-while-revalidate for dynamic content
- Configure cache rules for different content types
3. Reduce Request Count
- Combine multiple CSS/JS files where practical
- Use CSS sprites for small images
- Implement HTTP/2 for multiplexed connections
- Preload critical resources
4. Geographic Optimization
- Analyze traffic patterns by region
- Consider multi-CDN strategies for global reach
- Use regional origin servers for dynamic content
Bandwidth Cost Factors
Peak vs Average Traffic
Most CDNs bill based on total transfer, but some have peak bandwidth pricing. Plan for traffic spikes during marketing campaigns, viral content, or seasonal events.
Origin Egress Costs
Don't forget the cost of data transfer from your origin server to the CDN. Cloud providers like AWS, GCP, and Azure charge for egress bandwidth:
- AWS: $0.09/GB (first 10TB)
- GCP: $0.12/GB (Americas/Europe)
- Azure: $0.087/GB (first 10TB)
HTTPS Overhead
HTTPS requests typically cost more than HTTP (10-30% premium on request pricing). However, HTTPS is essential for security and SEO.
Choosing the Right CDN
For Small to Medium Sites
If your monthly bandwidth is under 1TB, consider:
- Cloudflare Free: Unlimited bandwidth, excellent for most sites
- Bunny CDN: Pay-per-use, extremely affordable
- KeyCDN: Simple pricing, good performance
For High-Traffic Sites
For sites with 10TB+ monthly bandwidth:
- Cloudflare Pro/Business: Flat pricing becomes very economical
- AWS CloudFront: Volume discounts, AWS integration
- Fastly: Real-time purging, edge computing
For Enterprise
For mission-critical applications:
- Akamai: Largest network, enterprise SLAs
- Cloudflare Enterprise: Dedicated support, custom solutions
- Multi-CDN: Combine providers for redundancy
Conclusion
Bandwidth and CDN costs can significantly impact your infrastructure budget, especially as your site grows. By understanding how bandwidth is calculated, comparing CDN providers, and implementing optimization strategies, you can deliver fast content to users worldwide while managing costs effectively.
Use our Bandwidth & CDN Cost Calculator above to estimate your monthly costs and compare providers. Remember that actual costs may vary based on traffic patterns, contract negotiations, and specific feature requirements.
