17
12 Comments

Cloudflare R2: Does it work?

Cloudflare made waves in the tech world when it announced R2, an object storage with zero egress fees.

For over a decade most devs and indie founders have used Amazon S3 for cloud storage. Those who couldn't afford S3 have used Wasabi or Backblaze. Those companies, however, have questionable pricing strategies.

We needed something cheaper that just worked. R2, which Cloudflare launched on September 2022, seemed very promising on these fronts.

So, does Cloudflare R2 work?

Surprisngly, I haven't seen anyone do a comprehensive review on Cloudflare R2.

If you search for it on YouTube, you'll see (almost) no review. Even searching through dev.to gave me only two matches.

So I decided to dive in on my own and see if it really works as advertised.

P.S. All of the images shown in this post are hosted on Cloudflare R2. I eat my own dog food.

Let's try Cloudflare R2

You can access Cloudflare R2 by going into your Cloudflare Dashboard.

img

If you've used Amazon S3, you'll notice a similar terminology: You can create various "buckets." You can then put your files into those buckets.

I've created an "indiehackers" bucket. After you open the bucket, you'll see an "Upload" button:

img

This allows you to upload files (or folders) directly from the interface:

img

After you upload a file, you can open it and you'll get an S3 URL and a public URL:

img

The public URL is exactly what it says... public. You can share those files, embed them if they're images (like I did in this post), etc.

What about geographical regions?

You can choose this setting when creating a bucket. By default, Cloudflare sets your region to Automatic, meaning that it "chooses a bucket location in the closest available region to the create bucket request based on the location of the caller.".

img

Managing R2 as an API

Cloudflare allows you to interact with it from the terminal using Wrangler, a command-line tool for building with Cloudflare products.

For example, the command for creating a bucket is:

wrangler r2 bucket create YOUR_BUCKET_NAME

The command for uploading a file is:

wrangler r2 object put test-bucket/dataset.csv --file=dataset.csv

So far, so good

All of the images I uploaded loaded fast (as you can see from this post). So far, I haven't encountered any "surprising" pricing.

So I can safely say that Cloudflare R2 works as advertised.

The pricing enables new business models

Here's the pricing page for Cloudflare R2:

img

Compare this to the pricing model for S3:

img

Almost $0.1 per gigabyte. Sure you get the first 100GB for free, but you can very easily exceed this limit if you host large files.

Cloudflare sounds like an exciting alternative because you can launch a side project connected to files/images without being startled with a large hosting price.

This is great for serial entrepreneurs.

Let's say you start 5 side projects and hope that one of them gets traction within the next 12 months. You work on and promote all of the projects in parallel and hope that one of them will find a product-market fit.

One year later, one of your side projects takes off. With a service like Cloudflare R2, you won't end up blowing your weekly salary on an unexpected hosting bill. Instead, you can just continue launching.

posted to
Icon for series Product Reviews
Product Reviews
on August 24, 2023
  1. 2

    I'm confused. Is R2 built upon S3?

    I see you uploaded filed to R2 but got an S3 link?

    Help.

  2. 2

    Been using it for the past couple months, super great, no troubles! Especially if you use their DNS service for your domain too. Then connecting a subdomain to your bucket is one click away.

  3. 2

    thanks for writing the review! currently exploring bunny(dot)net as alternative. Here's another list of alternative for s3 in case anyone need it https://finddev.tools/alternative-to/amazon-s3

  4. 2

    We tried to use R2 for some time, but they had horrible problems with file propagation. We had a profile picture uploading endpoint and the profile pictures would sometimes not load for a couple of minutes after uploading. Seems like tons of other people also had this issue.

    This absolutely ruined any chance of us using them.

    We went with DigitalOcean spaces instead which is also quite cheap

  5. 1

    I've been utilizing it for the last few months, and it's been fantastic, and completely trouble-free! What's especially noteworthy is their DNS service for domain management. When you combine this with their platform, connecting a subdomain to your storage bucket becomes a breeze with just a single click.

  6. 1

    Just set it up, pretty cool how it's compatible with the S3 API/SDK, don't have to change much code and having a domain already connected and managed on Cloudflare makes the process of masking the bucket/creating a reverse proxy really easy to do, performance has been great so far as well!

  7. 1

    Last time i check R2 it was necessary to spawn a Worker in front of your Buckets to make data available. Looks like they changed it. When the Worker was necessary you had to pay the Workers egress tho

  8. 1

    Cloudflare R2 is solid! Enhanced security and performance.

  9. 1

    Thanks for doing a detailed review! I was considering switching over to R2 from Backblaze because it seems much more appealing in general.

  10. 1

    This comment was deleted a year ago.

Trending on Indie Hackers
Meme marketing for startups 🔥 User Avatar 11 comments AI is Coming to Fuzen in January! 🚀 User Avatar 1 comment Google Whisk - Generate images using images as prompts, not text prompts User Avatar 1 comment After 19,314 lines of code, i'm shutting down my project User Avatar 1 comment Need feedback for my product. User Avatar 1 comment 40 open-source gems to replace your SaaS subscriptions 🔥 🚀 User Avatar 1 comment