What R2 Actually Is (And Why It Exists)

R2 User Upload Architecture

Here's the deal: AWS S3 has been bleeding developers dry with egress fees for years. You upload your files for cheap, then get hit with $0.09/GB every time someone downloads them. Your cute little side project that goes viral? Congrats, you're now bankrupt.

R2 fixes this shit. It's S3-compatible storage that doesn't charge egress fees. Ever. Your boto3 code works unchanged, your existing AWS CLI tools work fine, but suddenly your bills don't make you want to cry.

Cloudflare R2 Multi-cloud Architecture

R2 Architecture

How R2 Actually Works

R2 has four main pieces: the gateway that handles auth and routing, a metadata layer that keeps everything in sync using Durable Objects, a cache tier for speed, and the actual storage backend. It's spread across Cloudflare's 330+ data centers, so your files are close to users everywhere.

Performance is solid - Cloudflare claims 20-40% faster than S3, which sounds like marketing bullshit, but I tested it with a few hundred MB of images and yeah, it's noticeably faster. The strong consistency model means you get immediate read-after-write consistency across all regions.

They finally added event notifications - triggers Workers or queues when your objects change. Actually useful for real-time processing instead of polling like a caveman. The new infrequent access storage class cuts costs even further for archival data.

R2's event notification system triggers Workers or queues when objects are created, updated, or deleted, enabling real-time processing workflows.

The Real Cost Difference

Here's where it gets expensive. S3 charges $0.09/GB for egress. R2 charges nothing. Zero. Zilch.

I migrated a client's media storage from S3 to R2 last year. They were spending $1,200/month on AWS egress fees alone. After moving to R2? $18/month total. The client thought I'd made a mistake on the invoice.

Storage costs are similar - R2 is $0.015/GB/month vs S3's $0.023/GB - but that's not where the savings happen. It's the egress fees that murder your budget. Use the R2 pricing calculator to see your potential savings. Most developers using object storage for media delivery save 70-90% on their total storage costs.

The free tier includes 10GB storage monthly, plus 1 million Class A operations and 10 million Class B operations - more generous than AWS S3's free tier.

What You Need to Know Before Migrating

R2 isn't perfect. The S3 compatibility is about 90% - some edge cases with boto3 operations fail silently. Cross-region replication doesn't exist yet. Advanced S3 features like Intelligent Tiering aren't available.

But if you're serving files to users (images, videos, downloads, backups), R2 will save you a fortune. Sure, no egress fees sound great until you realize you're stuck. Want to leave Cloudflare later? You'll pay those egress fees to move your data out. But honestly, after seeing what AWS charges, that future pain seems worth it.

The migration tools work well, though plan for 2-3x longer than estimated because of rate limiting. Super Slurper handles one-time migrations up to 1TB per object (finally), while Sippy provides ongoing incremental sync from S3.

Canva uses R2 for their image storage - makes sense when you're serving millions of user uploads. The S3 compatibility means you can drop it in without rewriting your entire app. MosaicML uses R2 for AI model training data, and Prisma saved 98% on distribution costs. Real companies are using this in production.

R2 vs Major Cloud Storage Providers

Feature

Cloudflare R2

AWS S3

Google Cloud Storage

Azure Blob Storage

Storage Pricing

$0.015/GB/month

$0.023/GB/month (Standard)

$0.020/GB/month (Standard)

$0.0184/GB/month (Hot)

Egress Fees

$0 (Forever)

$0.09/GB

$0.12/GB

$0.087/GB

Class A Operations

$4.50/million

$5.00/million

$5.00/million

$4.25/million

Class B Operations

$0.36/million

$0.40/million

$0.50/million

$0.43/million

API Compatibility

S3-compatible

Native S3

Google Cloud API

Azure Blob API

Free Tier Storage

10 GB/month

5 GB/month

5 GB/month

5 GB/month

Global Edge Locations

330+ data centers

450+ edge locations

200+ edge locations

140+ edge locations

Getting Started and Real-World Use Cases

R2 Migration Architecture

Setting Up R2 (The Actually Important Stuff)

Getting started is pretty straightforward if you already have a Cloudflare account. You can use their web dashboard or the Wrangler CLI - I prefer CLI for anything serious.

R2 buckets can be created in specific regions (North America East, Europe West, Asia Pacific, and the new Oceania region) for compliance requirements. Public buckets let you serve files directly to browsers, private buckets need signed URLs or API token auth.

Pro tip: Start with private buckets. Public buckets are convenient but you lose control over access patterns. Use CORS configuration for browser uploads and custom domains for better SEO.

Where R2 Actually Shines

AI/ML Workloads: No egress fees means you can train models across different GPU providers without getting murdered on data transfer costs. I've seen ML teams save $10K+/month by storing datasets in R2 instead of S3. MosaicML uses R2 for LLM training data with zero vendor lock-in.

Media Delivery: The CDN integration is seamless. Store images/videos in R2, serve them through Cloudflare's edge cache. Performance is solid and costs are predictable. Use Transform Rules for dynamic image optimization and Cache Reserve for persistent caching.

Backup Storage: R2's migration tools (Super Slurper and Sippy) work well for one-time or incremental backups. Super Slurper now supports objects up to 1TB and includes Google Cloud Storage migration. Just don't expect them to be fast - I've seen 50GB transfers take 6 hours instead of the estimated 2. Plan accordingly.

Data Analytics: The R2 Data Catalog (still beta) adds Apache Iceberg support for running analytics directly on stored data. Works with Snowflake, Apache Spark, and DuckDB. Useful if you're already in the Cloudflare ecosystem.

Log Storage: Cloudflare Analytics & Logs can automatically send your logs to R2 for long-term storage and analysis. No more expensive log aggregation services eating your budget.

R2 enables true multi-cloud architecture by eliminating egress lock-in - move data freely between providers without paying transfer fees.

Real Companies Using R2

Canva uses R2 for their image storage - makes sense when you're serving millions of user uploads. The S3 compatibility means you can drop it in without rewriting your entire app.

Indeed moved their job posting assets to R2. Japan Airlines uses it for their digital transformation platform.

The [Workers Integration](https://developers.cloudflare.com/r2/api/workers/workers-api-usage/) (This Is Where It Gets Cool)

R2 Workers Integration

You can process files directly at the edge using Workers. Image resizing, format conversion, custom auth - all without spinning up separate compute instances. The R2/Workers combo is actually pretty slick - way better than spinning up separate Lambda functions for every damn image resize.

Read Data from R2

AutoRAG is their new AI thing that crawls your site and dumps content into R2 for search. Sounds gimmicky but the R2 integration is solid. Event notifications can trigger Workers when objects change, enabling real-time processing pipelines. Use multipart uploads from Workers for handling large file uploads efficiently.

Migration Reality Check

Moving from S3 to R2 isn't just changing your endpoint URL. Here's what actually happens:

  • Simple apps: boto3 code mostly works unchanged
  • Complex setups: Some operations fail silently, test everything
  • Data migration: Use Super Slurper for one-time moves, Sippy for ongoing sync
  • Timeline: Plan 2-3x longer than estimated due to rate limits

Most migrations I've done take 1-2 weeks for testing plus however long the data transfer takes. Had one migration where we thought we were done testing, deployed to prod, and then discovered that lifecycle policies weren't working the same way. Spent a weekend rolling back. Test your edge cases.

Questions Engineers Actually Ask About R2

Q

Is there really no catch with the zero egress fees?

A

Not really, but you're locked into Cloudflare's ecosystem. If you want to leave later, you'll pay egress fees to move your data out. But honestly, after seeing AWS bills, this feels like a fair trade.The bigger catch is that R2 doesn't have all of S3's features yet. If you're using advanced S3 stuff like cross-region replication or complex lifecycle policies, you're out of luck.

Q

What breaks when migrating from S3?

A

Some boto3 operations fail silently.

I've hit issues with multipart uploads that have weird characters in filenames

  • shit like spaces or unicode breaks things. Also saw list_objects_v2 return different pagination tokens than S3 does.That weird 'InvalidRequest: The authorization header is malformed' error? Yeah, that's R2 being picky about your S3 SDK version. Use AWS SDK v3+ or you'll hate your life. If you're using boto3 1.26.x, multipart uploads sometimes hang indefinitely. Upgrade to 1.28+ or prepare for mysterious timeouts.The S3 compatibility is maybe 90%
  • good enough for most apps, but test everything before you migrate production data. And definitely test your backup/restore procedures.
Q

How long does migration actually take?

A

Plan for 2-3x longer than you estimate. The migration tools work, but they're rate-limited as fuck. I migrated 5TB last month and it took 4 days instead of the estimated 1.5 days. Kept hitting 429 errors and having to back off.For small datasets (under 100GB), it's usually done overnight. For TBs of data, plan for weeks. The good news is you can run migrations incrementally without downtime.Pro tip: Don't trust the migration time estimates. Add 50% to whatever they tell you, then add another day for the weird edge cases you'll definitely hit.

Q

Does the S3 API actually work with my existing tools?

A

Mostly yes. AWS CLI, boto3, and rclone work fine for basic operations.Some edge cases fail

  • I've seen issues with pre-signed URLs that have really long expiration times (like 7+ days), and certain S3 analytics operations just don't exist. Also hit a weird bug where HeadObject returns 200 but GetObject fails with 404.
Q

How much money will I actually save?

A

Depends on your egress ratio. If you're mostly storing files and rarely downloading them, the savings are minimal. If you're serving media or downloads to users, the savings are massive.Quick math: if you're downloading more than 1GB per month per $1 of storage costs, R2 will save you money. Most web apps hit this easily.

Q

What about performance compared to S3?

A

In my testing, R2 is actually faster for public file serving

  • probably because of Cloudflare's edge network. For private API calls, it's comparable to S
  1. Upload speeds are similar. Download speeds depend on where your users are, but Cloudflare's CDN integration helps a lot.
Q

Can I use R2 as a backup for my S3 data?

A

Yes, but think of it as a one-way mirror.

The Sippy tool can sync from S3 to R2 automatically. Just don't expect bi-directional sync

  • that doesn't exist yet.
Q

What security features does R2 have?

A

Basic stuff: encryption at rest and in transit, IAM-style access controls, CORS policies. It's not as feature-rich as S3's security offerings, but it covers most use cases.No fancy compliance certifications yet

  • just SOC 2 Type II. If you need HIPAA or similar, check the current compliance status first.
Q

Which regions should I choose?

A

Pick the region closest to your users or compute.

There are only four regions: North America East, Europe West, Asia Pacific, and the new Oceania region.

Data stays in the region you choose

  • no magical cross-region replication.If you're unsure, start with North America East. Most tools and documentation assume that region. Pro tip: you can't change a bucket's region after creation, so choose carefully or you'll be migrating again.
Q

What happens if Cloudflare goes down?

A

Same thing that happens when AWS goes down

  • your app breaks.

R2 has a 99.9% SLA for enterprise customers, which is standard.Look, Cloudflare isn't AWS. They're smaller, they move fast, they break things. Sometimes R2 goes down and your app breaks. But honestly? Same thing happens when AWS shits the bed, and at least you're not paying egress fees while it's broken.

Essential R2 Resources (The Actually Useful Ones)

Related Tools & Recommendations

tool
Similar content

Google Cloud Storage Transfer Service: Data Migration Guide

Google's tool for moving large amounts of data between cloud storage. Works best for stuff over 1TB.

Google Cloud Storage Transfer Service
/tool/storage-transfer-service/overview
97%
tool
Similar content

Firebase - Google's Backend Service for Serverless Development

Skip the infrastructure headaches - Firebase handles your database, auth, and hosting so you can actually build features instead of babysitting servers

Firebase
/tool/firebase/overview
76%
tool
Similar content

Google Artifact Registry Overview: Store Docker & Software Packages

Google's answer to "where do I put all this shit?" - now with security scanning that actually works and won't randomly go down when you need it most

Google Artifact Registry
/tool/google-artifact-registry/overview
73%
tool
Recommended

Migrate to Cloudflare Workers - Production Deployment Guide

Move from Lambda, Vercel, or any serverless platform to Workers. Stop paying for idle time and get instant global deployment.

Cloudflare Workers
/tool/cloudflare-workers/migration-production-guide
66%
tool
Recommended

Cloudflare Workers - Serverless Functions That Actually Start Fast

No more Lambda cold start hell. Workers use V8 isolates instead of containers, so your functions start instantly everywhere.

Cloudflare Workers
/tool/cloudflare-workers/overview
66%
pricing
Recommended

Vercel vs Netlify vs Cloudflare Workers Pricing: Why Your Bill Might Surprise You

Real costs from someone who's been burned by hosting bills before

Vercel
/pricing/vercel-vs-netlify-vs-cloudflare-workers/total-cost-analysis
66%
tool
Similar content

AWS API Gateway: The API Service That Actually Works

Discover AWS API Gateway, the service for managing and securing APIs. Learn its role in authentication, rate limiting, and building serverless APIs with Lambda.

AWS API Gateway
/tool/aws-api-gateway/overview
61%
tool
Similar content

OpenAI Realtime API Overview: Simplify Voice App Development

Finally, an API that handles the WebSocket hell for you - speech-to-speech without the usual pipeline nightmare

OpenAI Realtime API
/tool/openai-gpt-realtime-api/overview
61%
tool
Similar content

QuickNode: Managed Blockchain Nodes & RPC for Developers

Runs 70+ blockchain nodes so you can focus on building instead of debugging why your Ethereum node crashed again

QuickNode
/tool/quicknode/overview
61%
alternatives
Recommended

Terraform Alternatives That Won't Bankrupt Your Team

Your Terraform Cloud bill went from $200 to over two grand a month. Your CFO is pissed, and honestly, so are you.

Terraform
/alternatives/terraform/cost-effective-alternatives
60%
integration
Recommended

AFT Integration Patterns - When AWS Automation Actually Works

Stop clicking through 47 console screens every time someone needs a new AWS account

Terraform
/integration/terraform-aws-multi-account/aft-integration-patterns
60%
integration
Recommended

Stop manually configuring servers like it's 2005

Here's how Terraform, Packer, and Ansible work together to automate your entire infrastructure stack without the usual headaches

Terraform
/integration/terraform-ansible-packer/infrastructure-automation-pipeline
60%
tool
Popular choice

jQuery - The Library That Won't Die

Explore jQuery's enduring legacy, its impact on web development, and the key changes in jQuery 4.0. Understand its relevance for new projects in 2025.

jQuery
/tool/jquery/overview
57%
tool
Similar content

Jaeger: Distributed Tracing for Microservices - Overview

Stop debugging distributed systems in the dark - Jaeger shows you exactly which service is wasting your time

Jaeger
/tool/jaeger/overview
55%
tool
Similar content

Express.js - The Web Framework Nobody Wants to Replace

It's ugly, old, and everyone still uses it

Express.js
/tool/express/overview
55%
tool
Similar content

Android Studio: Google's Official IDE, Realities & Tips

Current version: Narwhal Feature Drop 2025.1.2 Patch 1 (August 2025) - The only IDE you need for Android development, despite the RAM addiction and occasional s

Android Studio
/tool/android-studio/overview
55%
tool
Similar content

Boomi iPaaS Overview: Integration Reality Check & Costs

Still manually copying customer data between Salesforce and your ERP? In fucking 2025?

Boomi
/tool/boomi/overview
55%
tool
Similar content

Node.js Deployment Strategies: Master CI/CD, Serverless & Containers

Master Node.js deployment strategies, from traditional servers to modern serverless and containers. Learn to optimize CI/CD pipelines and prevent production iss

Node.js
/tool/node.js/deployment-strategies
55%
tool
Similar content

Checkout.com Integration: Real-World Guide & Hidden Truths

Uncover the real challenges of Checkout.com integration. This guide reveals hidden issues, onboarding realities, and when it truly makes sense for your payment

Checkout.com
/tool/checkout-com/real-world-integration-guide
55%
howto
Popular choice

Migrate JavaScript to TypeScript Without Losing Your Mind

A battle-tested guide for teams migrating production JavaScript codebases to TypeScript

JavaScript
/howto/migrate-javascript-project-typescript/complete-migration-guide
55%

Recommendations combine user behavior, content similarity, research intelligence, and SEO optimization