Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Replacing AWS S3+CloudFront with Cloudflare R2?
5 points by janpio on March 20, 2023 | hide | past | favorite | 5 comments
We serve a few hundred TB of data via AWS S3 with Cloudfront in front of it each month, which costs us quite a lot of money for the data transfer. Cloudflare R2 seems to be the perfect alternative, with their S3 compatible API, egress being free [1] and the ability to put a custom domain in front of the bucket - which then activates Cloudflare CDN [2] for optimized latency (which is then equivalent to using Amazon's Cloudfront).

Has someone here done this before and can share their experience?

I am specifically interested in the latency aspect. S3+Cloudflare has been excellent there, and I would love to understand if we would take a significant hit by migrating to Cloudflare R2.

  [1] https://developers.cloudflare.com/r2/pricing/
  [2] https://developers.cloudflare.com/r2/buckets/public-buckets/#custom-domains


I use it for my own small instance of Mastodon (https://s.o2l.ie). Looks like I have about 30GB of data in there... not a massive amount of bandwidth either (looks like around 200Mb over the last 7 days). But, it was easy to set up, and I think my last bill was around 23 cents for the month... AWS calculator is coming in at around $2 per month...


Where is your target audience? US based? Do note that Cloudflare non business / enterprise plans get deprioritized and also get re-routed to certain major ISPs e.g. in Taiwan, Australia, Argentina, etc.

https://www.cdnperf.com there's also this for a point of reference.


The general developer community and their deployments, most of that traffic are binaries (<20MB) that are part of a database client that are downloaded on installation of our Client libraries. So a _lot_ of CI traffic, but also the development machines which follow roughly the general developer distribution around the world (and includes pretty much any country you can think of as far as we know).


Seems like the way to know for sure is to test it. Wouldn't seem like it'd be hard to do that, especially if you have access to Catchpoint or something similar.


Fair.

I started to test manually with https://tools.bunny.net/http-test and https://www.uptrends.com/tools/cdn-performance-check earlier today, a few times per day executing these with the same file hosted on S3+Cloudfront and R2 (with enabled cache via custom domain) - and the results are all over the place.

Sometimes S3+Cloudfront is a bit faster, sometimes Cloudflare, and sometimes either of them are _really_ slower than the other one as well. I don't see any pattern yet, both in comparing the two but also for which locations are affected and so on.

Which might mean it would be roughly the same on average - but I was hoping someone else could help me go beyond this napkin math by sharing there practical experiences.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: