I love Cloudflare, it has many features that I need, like caching, routing, serving the static page, etc etc, and the best is all of those features that came with the free tier!

From all features that I love, now Cloudflare has a new object storage service, called R2 which stands for “Really Requestable” (currently still in the public beta stage). When I see the R2 menu in the Cloudflare dashboard, the first I thought was, is it good and worth trying? Am I really need to migrate my storage and save $5 every month?

To be clear, I have a similar service for serving static assets for my project, that lives in DigitalOcean Spaces, which has a monthly cost of about $5 and the R2 is free for the first 10GB every month, then since my storage in DigitalOcean no more than 10GB, switching could be easy and good to go I guess.


fig: migration

Both of them have a similar feature that S3-compatible object storage, my project code could just change the base URL and some credentials regarding the new service. After some research (because the R2 is still in the Beta stage) the major difference from DigitalOcean Space is that R2 need to manually create the service to make the file exposed in public. The service itself is using Cloudflare Worker, on the next post will explain how to serve the R2 as a public.

Comparison Storage Cost 1

Provider Storage Cost for 250GB Pros Cons
Cloudflare R2 $0.015 / GB = $3.75 per month Free for 10 GB / month Need to create worker to serve public (Beta)
Amazon S3 (Jakarta) $0.025 / GB = $6.25 per month Free for 5 GB / month It has a complex pricing schema
DigitalOcean Spaces $5 per month Flat pricing, montly price include 1TB outbound transfer Usage less than 250GB could be more pricy

If you have a plan to migrate your service to R2, please consider not all S3 APIs are currently supported by R2, for the complete list of S3 API compatibility, please take a look at this page.

  1. Data I took from the official page of each provider. ↩︎