Efficient file delivery is a balancing act between performance, cost, and control. Whether you're distributing MP3s, high-resolution images, or short video clips, knowing when to use Backblaze B2, a local server, or a CDN like Cloudflare can drastically improve your system's scalability and cost-effectiveness.
Why Bandwidth, CPU, and RAM Matter in File Delivery
While bandwidth is the most visible cost when using cloud providers, local server resources like CPU and RAM play a critical role in performance:
Bandwidth: Determines how much data you can send. Even on "unlimited" plans, hosts may throttle speeds or enforce soft caps after several terabytes. Serving large files or high traffic can saturate your bandwidth.
CPU Usage: Affects how efficiently your server can respond to concurrent requests. Serving static files is usually lightweight, but dynamic processing (e.g., encryption, on-the-fly compression, authentication) increases CPU load.
RAM Usage: If you use non-streamed file serving (like file_get_contents() in PHP), large files may fully load into memory. This can consume significant RAM and cause slowdowns or crashes under heavy load. Efficient strategy is to use streaming responses (e.g., Laravel’s response()->stream() or NGINX X-Accel-Redirect) to avoid memory overload and lower CPU usage. Cache headers can also reduce repeated processing.
Understanding Egress
"Egress" refers to the data that leaves your storage or server — essentially, it's the outbound traffic sent to users when they download or stream your files. Cloud providers often charge based on egress, not just storage. This is especially important to track when dealing with large files (like MP3s or videos) or frequent downloads.
For example:
A 5 MB MP3 downloaded 100,000 times equals ~500 GB of egress.
A 20 MB short video downloaded 10,000 times also equals ~200 GB of egress.
Egress is often the main cost driver in file delivery at scale.
Backblaze B2: Affordable Scalability for Storage and Bandwidth
Backblaze B2 is a cloud storage solution known for its low costs and clear pricing.
Provider
Storage Cost (per GB)
Egress Cost (per GB)
1 TB Storage + 1 TB Egress (Approx)
Backblaze B2
$0.005
$0.01
~$10.24
Amazon S3
$0.023
$0.09
~$113.00
Azure Blob
$0.020
$0.087
~$107.00
Google Cloud
$0.020
$0.12 (first 1 TB)
~$140.00
Note: Prices are approximations and may vary based on region and usage tier.
Backblaze B2's model is simple and cheaper as unbelievable:
Storage: $0.005 per GB per month
Egress (outgoing traffic): $0.01 per GB after the first free tier
Free tier: 10 GB storage + 1 GB outbound per day (30GB per month)
When to use Backblaze B2:
When you have a large library of static files (e.g. MP3s, images, videos) that don't change often.
When you want cheap storage with pay-as-you-go pricing.
When you need a reliable backup or origin storage for a CDN.
Example:
Say you have 15 GB of MP3 files. You'll pay $0.025 per month for storage (because 10 GB are free, actually you're paying for 5GB) and enjoy 45 GB of free outbound traffic (egress x3). If each MP3 is 5 MB, you can deliver up to 9,000 downloads monthly for just $0.025.
At scale: 1 TB of egress costs around $10 (if your storage is 15 GB), which equals about 200,000 downloads/play/stream of 5 MB files.
Let's say the concurrent services:
Provider
Egress Charges
Notes
Amazon S3
✅ Yes
Charges $0.09/GB after a small free tier (often only for the first 1 GB or usage from AWS services). Egress is a major cost factor when using S3 at scale.
Wasabi
❌ No*
No egress fees as long as your monthly egress is less than your average storage (1:1 ratio). This makes Wasabi very cost-predictable and ideal for high-download scenarios.
When using Wasabi: You pay a flat monthly rate (minimum $6.99 for 1 TB storage), but you get unlimited downloads, as long as you don't regularly exceed your storage in outbound traffic. So:
Store 15 GB → costs $6.99 (minimum billing for 1 TB)
Serve up to 15 GB/day (~450 GB/month) or more without paying egress fees
Is Wasabi's "Free Egress" Really Worth It? (without egress)
At first glance, Wasabi looks appealing — no egress fees, flat-rate pricing, and 1 TB of storage for around $6.99/month. But when you look more closely at how their egress policy actually works, the value starts to break down — especially for low-storage, high-download use cases like media delivery.
Let’s say you’re storing 15 GB of MP3 files, and each file is about 5 MB. That means you can host about 3,000 songs. In a month, if users download all those files daily, you're delivering 15 GB of data per day, which totals about 450 GB/month. That might sound fine under Wasabi's "free egress" rule, but here's the catch: Wasabi only allows free egress up to the amount of your average stored data per month.
Below you can see comparison table and concrete examples to how the "non-egress" is not worth it.
Premium content
Log in to continue
Local Server: Control and Speed with Caution
Hosting files on your own VPS or dedicated server gives you complete control. You may even have “unlimited” bandwidth, which is great—but only up to the provider's fair use threshold.
When to use a local server?
When your user base is small to medium and geographically close to the server.
When you have good bandwidth, e.g., unlimited or multi-TB allowances.
When you want to cache popular files locally and reduce cloud storage bills.
Example:
With a VPS hosting 25 GB of image and audio content and 5 TB/month bandwidth, you can serve around 1 million downloads of 5 MB files, assuming everything is optimized. Use Laravel’s response()->stream() to avoid memory bloat and log statistics per file to manage delivery strategy dynamically. But do you have 5TB Bandwidth? Ask your hosting company!
Tip: Use your local server as the primary source and fall back to Backblaze if files aren’t available or traffic surges.
Cloudflare: The Smart CDN Middle Layer
Cloudflare acts as a middle layer between users and your storage. On free plans, it may not cache large binary files like MP3s or videos by default. However, Pro plans ($25/month) offer more aggressive caching policies.
When to use Cloudflare:
When your site experiences global traffic and performance matters.
When you want to offload repeated requests from your origin (Backblaze or local).
When you expect traffic bursts and want protection against overage charges.
Example:
Say your music site has a few popular MP3s getting 100,000 plays per month. With Cloudflare caching them, only the first few requests reach Backblaze. The rest are served from Cloudflare’s edge servers. That saves you hundreds of gigabytes in egress charges.
Cloudflare Caching Example for MP3 Hosting
Metric
Without Cloudflare CDN
With Cloudflare CDN (95% Cache Hit)
Total MP3 files
5,000
5,000
Plays per month
100,000
100,000
MP3 size
5 MB
5 MB
Total traffic generated
~488 GB
~488 GB
Traffic served from Backblaze B2
~488 GB (100% of traffic)
~24.4 GB (5% of traffic)
Traffic served from Cloudflare
0
~463.6 GB (95% of traffic)
Backblaze B2 Egress Cost (@ $0.01)
~$4.88
~$0.24
CDN Savings
$0
~$4.64/month
Note: Backblaze storage cost for 5,000 MP3s (~25 GB) is just $0.125/month
Tip: Combine Cloudflare with Backblaze by setting B2 as origin and controlling cache behavior via headers or page rules. Or use it with your own server to cache frequently accessed videos and images.
Integrate Hybrid Hosting Strategy For Delivering Files
Begin with a local server for maximum control and minimal startup costs. It gives you flexibility and avoids premature spending while traffic is still manageable. Use Backblaze B2 for offloading your storage-heavy content like MP3s, videos, or large downloads. It's extremely cost-effective for both backup and as a primary origin when paired with a CDN. Upgrade to Cloudflare Pro when your traffic grows and caching high-bandwidth content (like MP3s or videos) could offset egress costs. With a 95% cache hit rate, even hundreds of gigabytes of monthly traffic can be reduced to a few GB hitting your origin.
🎁 Bonus Tips for Efficiency
Use consistent file naming to simplify sync between local and cloud storage.
Track download counts to identify your most-accessed files — and consider serving them locally to reduce cloud egress.
Implement smart redirects based on real-time load or per-file access history (e.g., serve popular files locally, fallback to CDN/cloud for the rest).