Ask HN: Replacing AWS S3+CloudFront with Cloudflare R2?
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
5 comments
[ 2.9 ms ] story [ 26.5 ms ] threadI 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.
https://www.cdnperf.com there's also this for a point of reference.