Can I serve Images & Videos via Cloudflare CDN from R2 or similar Service like B2?
Hello, I working on a web project which will be serveing alot of Images & Videos to end users.
I thought of using Cloud Storage solutions like R2 from Cloudflare or V2 from backblaze to store and serve them through Cloudflars CDN to save bandwidth costs (egress charges). Simply put, I really don't want to pay for download bandwidth usage.
Backblaze B2 seems more affordable option to me, but will cloudflare CDN allow me to serve Images and videos from B2? What if I dont cache them? Setting them as bypass cache? I don't want to stop proxy through Cloudflare or else it will cost me egress charges.
And if nothing works, what about Cloudflare R2? Can I serve files from R2 through Cloudflare CDN? With cache or without Cache? Does R2 even allow serving Images & Videos to masses? Let's say, I got 500 GB worth of files, being served to thousands.
I want to use Cloudflare CDN so that I can have custom domain on top! Plus rewrite urls so that it won't look like Some Secret Bucket urls.
I really want to save costs since I'm paying out of my own pocket, not some investors.
4 Replies
You can’t use cache when serving from B2 but you can from R2. Yeah R2 allows serving videos and images to whoever. Caching with R2 is great because you don’t pay for reads if a file is cached.
About B2, is it fine if we serve a lot of images & videos through Cloudflare CDN without cache? just proxy through Cloudflare! Plausible on the Free tier?
I'm already considering to use R2 but just want to clarify with these things!
Yeah serving without cache is fine. If you’re serving like 10s of TB per day then you might get an email asking you to upgrade but not required to upgrade
That's quite a bold statement but that sounds amazing!