Can i get price estimate for image hosting.

I have 1.2TB of images that I want to host, my current data transfer out is about 13TB per month, and a total of 38M requests are triggered monthly, if I host the same on Cloudflare, what are the cost will incur, can I get total price breakdown?
17 Replies
Chaika
Chaika5mo ago
Depends on if you want to use Cloudflare Images or Cloudflare R2. R2 is generic object storage, cheaper then Images, and with a custom domain you can enable caching and you won't even be charged for cache hits. Images makes its easy to create variants (i.e mobile optimized images which are smaller, etc), and has some other Images-specific features. https://developers.cloudflare.com/images/pricing/ <- Image Pricing is there. It's per images stored and images delivered https://developers.cloudflare.com/r2/pricing/ <- R2 pricing is there. It's per storage and Class A (uploads, new images), and Class B (GetObjects, getting images, etc) If you don't need any of Images features, R2 is going to probably way be cheaper. You could as well use R2 + Image Resizing/Image Transformation (which is part of Images, but you'd only pay per unique resizes per month, and then for R2 Storage), if you did need to resize as well. Eitherway no bandwidth/data transfer costs
amishranpariya
amishranpariya5mo ago
I do not need image transformations, what are the costs i need to look for R2 ?
w3bcode
w3bcode5mo ago
IIRC, You can use Images with no storage and only use transformation feature with R2. Which costs around $1 for 2000 images. For costs comparison and calculation you can see the pricing page, as price for storage, class A operation and class B operation are different If I may ask, what is your current bill to host this many images and requests ? And where are you hosting them ?
amishranpariya
amishranpariya5mo ago
Is there any way to use Cloudflare as CDN, but the actual images are stored in the AWS S3 bucket? If yes, then what cost does Cloudflare incur in that setup?
Chaika
Chaika5mo ago
Pricing · Cloudflare R2 docs
R2 charges based on the total volume of data stored, along with two classes of operations on that data:
amishranpariya
amishranpariya5mo ago
I use AWS S3 + Cloudfront, which costs me $1200-$1500 monthly, looking for a cheaper alternative.
Chaika
Chaika5mo ago
Can't do just Images with non-Enterprise CDN. They want you to use one of their products to host the files (R2, Images, etc) or Enterprise
Unless you are an Enterprise customer, Cloudflare offers specific Paid Services (e.g., the Developer Platform, Images, and Stream) that you must use in order to serve video and other large files via the CDN. Cloudflare reserves the right to disable or limit your access to or use of the CDN, or to limit your End Users’ access to certain of your resources through the CDN, if you use or are suspected of using the CDN without such Paid Services to serve video or a disproportionate percentage of pictures, audio files, or other large files. We will use reasonable efforts to provide you with notice of such action.
<https://www.cloudflare.com/en-gb/service-specific-terms-application-services/#content-delivery-network-terms. Non-Enterprise CDN is more just for websites, another way to view it There's calculators for R2 as well: https://r2-calculator.cloudflare.com/ https://pricing.ceru.dev/r2 0.015 (GB-month) * 1200 GBs = $18/month 0.36 (per million Class Bs) * (38 million images served - 10 million (included for free) = $10.08/month or so
amishranpariya
amishranpariya5mo ago
What are the tradeoffs I will experience when choosing R2/Images compared to S3+Cloudfront? in terms of latency, availability, and such factors?
Chaika
Chaika5mo ago
it'd just be R2, you don't need Cloudflare Images in terms of tradeoffs, R2 is S3-Compatiable so it should be pretty easy to switch. R2 is less mature though. It's built on Cloudflare's own technology (Durable Objects + underlying Storage)
amishranpariya
amishranpariya5mo ago
I have transformed image use cases as well and also thinking of making solutions to easily adapt these transformation requirements in the future.
Chaika
Chaika5mo ago
Image Resizing/Transformation can be a bit expensive. You can use it with your images in R2 and everything, you'd pay $0.50 per 1k unique transformations per month i.e you request one image to be resized to width=1335, height=77, that's one unique transformation, you could do that one billion times that month with that same image and those same paramters and you wouldn't be charged a cent more. You want height=76? Another unique depends on how many unique resizings you'd want, and how many source images you have/would resize. You didn't say how many, so I can only guess
amishranpariya
amishranpariya5mo ago
We are scaling at a huge factor, right now we have 1250M objects, out of which we want to only migrate 1.5M objects to Cloudflare, but seeing the expensive transformation cost, we won't be moving towards Cloudflare for the rest of the data any time soon. For now, 1.5M/1.2TB data is fine. the main concern here is that we have very diverse images requests, the unique request will be much higher than the same request
Chaika
Chaika5mo ago
yea.. that billing doesn't work well with that
Chaika
Chaika5mo ago
I only calculated the Class Bs in my original, uploading new images will be Class As/PutObject and cost you something as well. The calculator here can help you with that: https://pricing.ceru.dev/r2 , or you can just manually calculate it off the pricing table. You get a million class As free per month, and still way cheaper with no egress though. R2 does really well as hot storage.
Cloudflare Workers™ pricing calculator
Estimate your next bill, see the price difference. Unofficial calculator for Cloudflare Workers Unbound, Cloudflare R2, and KV.
amishranpariya
amishranpariya5mo ago
The R2 solution will work for now, Thanks a lot @Chaika for the Quick help. @Chaika is there any need of Workers in this whole process?
Chaika
Chaika5mo ago
no, they would only increase costs R2 Custom Domain + Cache (use Cache Rule or Page Rule to force caching/for longer if possible, any cache hits are free) = just Class B costs for serving images Worker + R2 Binding + Cache = Worker would always be invocated/executed, plus Class B Costs if cache is missed Although under the hood R2 is a ton of Workers internally, S3 Compat API is all Workers powered. Metadata of each bucket is in a Durable Object (stateful worker, kind of). R2 Custom Domain is also powered by a Worker, etc. You don't pay for those of course, just a cool fact, part of the magic keeping it scalable and fast.
amishranpariya
amishranpariya5mo ago
Good to know
Want results from more Discord servers?
Add your server
More Posts