Cloudflare R2 for AI Training Data: Why Zero Egress Changes the Math
· 3 min read · Updated

Training a model means reading the same dataset over and over, once per epoch, often from GPUs that sit outside your storage provider's network. On most object stores you pay an egress fee every time that data leaves the bucket. Cloudflare R2 does not charge egress fees, so reading a dataset a hundred times costs the same in transfer as reading it once.
People size storage by the price per terabyte and then get surprised by the transfer line on the bill. For an archive you rarely open, egress barely matters. For a training set you stream through a data loader thousands of times, egress becomes the biggest cost.
Training data has a few traits that make egress the deciding factor:
- It is read many times. Every epoch reads the whole set again, and hyperparameter sweeps and multiple runs multiply that.
- It is large. Image, video, audio, and text corpora run to terabytes, and embeddings pile on more.
- The compute is often elsewhere. GPUs in another cloud or a rented cluster mean the data crosses a network boundary on every read, which is exactly what egress charges for.
Put those together and a metered-egress store can cost more to read than to hold.
R2 does not charge egress fees, so repeated reads from outside Cloudflare add no transfer cost. It is also S3-compatible: the data loaders, SDKs, and tools your pipeline already uses point at it when you change the endpoint and the keys, and your training code stays as it is.
R2 still has its own terms for operations and requests, and throughput depends on how your loader and network are set up. If your training compute lives in the same cloud as your current data, reads inside that cloud may already avoid egress, so R2's advantage is largest when storage and compute would otherwise sit on different networks. Confirm Cloudflare's current terms before you commit a pipeline to them.
A training corpus rarely starts life in one place. It is scraped to a local disk, staged in an S3 bucket, or scattered across a few accounts from different collaborators, so the setup step is consolidating it into one R2 bucket.
Blober moves data into R2 from AWS S3, Backblaze B2, Wasabi, DigitalOcean Spaces, Azure Blob, Dropbox, Google Drive, or local storage. It copies in parallel, keeps the folder structure intact, and resumes an interrupted run where it stopped, so a dropped connection doesn't send a large corpus back to the start. Blober runs on your computer and streams each file from the source to R2 over your connection, so the corpus never has to fit on that machine's disk, though every byte it moves counts against your bandwidth.
- Choose R2 as the dataset home if your training compute reads it repeatedly from outside Cloudflare.
- Stage the corpus into an R2 bucket with Blober, in parallel and with structure preserved.
- Point your S3-compatible data loader at the R2 endpoint and train.
- Run the workflow again when the dataset grows.
Keep a second copy somewhere else as well. One bucket is one copy, and the 3-2-1 rule applies to a dataset you cannot easily recreate just as much as to family photos.
Does Cloudflare R2 charge egress fees? No. R2 does not charge egress fees for reading your data out, which is its main draw for read-heavy workloads like model training. Confirm the current terms on Cloudflare's site before committing.
Is Cloudflare R2 good for machine learning datasets? Yes, especially when your training compute reads the dataset repeatedly from outside Cloudflare's network. Zero egress removes the per-read transfer cost that dominates training storage bills.
Is R2 S3-compatible for data loaders? Yes. R2 exposes an S3-compatible API, so existing S3 data loaders, SDKs, and tools work by changing the endpoint and credentials.
How do I move my training data into R2? Use a tool that copies in parallel and can pick up after an interruption. Blober stages datasets into R2 from S3, B2, Wasabi, Spaces, Azure Blob, and local storage, and resumes interrupted runs where they stopped.