Cloudfare R2 rate limit
Doesn't Cloudflare R2 have a limit on the number of concurrent uploads? Isn't there a rate limit in place?
10 Replies
Same object or different object?
different object
There's no hard rate limits for that other then the intrinsic limits of the platform itself
I am just confused by the limiting mentioned here
Cloudflare Docs
Limits | Cloudflare Fundamentals docs
The global rate limit for the Cloudflare API is 1200 requests per five minutes per user, and applies cumulatively regardless of whether the request is made via the dashboard, API key, or API token.
If I have thousands of users requesting an object from Cloudflare R2, would that trigger rate limiting?
That's just for the Cloudflare API at api.cloudflare.com. That doesn't apply to the R2 S3 API or R2 Custom Domains
Got it, thanks for the clarification! Just to confirm, when you say the API rate limits don't apply to R2 storage operations, does that mean I can handle thousands of concurrent uploads and downloads without hitting any Cloudflare-imposed rate limits, as long as I'm within the storage and bandwidth capacity of my R2 plan?
does that mean I can handle thousands of concurrent uploads and downloads without hitting any Cloudflare-imposed rate limitsIt means there is indeed no Cloudflare hard rate limits. However, each bucket has a max amount of throughput. To explain it as simply as possible, each bucket is mapped to a Cloudflare Durable Object, which is a single-threaded javascript event loop. For that reason, there is a maximum amount of RPS per bucket. Somewhere around ~5k PUTs RPS or so from past comments: https://discord.com/channels/595317990191398933/940663374377783388/1126520034047561809. That's a technical limitation that varies on how expensive the operation is and is something CF is aiming to address eventually but no ETA Even more GETs, espec if you are using an R2 Custom domain with cache enabled, you don't pay for cached requests & they wouldn't hit your bucket
as long as I'm within the storage and bandwidth capacity of my R2 plan?There's no max amount of storage/bandwidth: https://developers.cloudflare.com/r2/platform/limits/. Bandwidth is also not billed by R2, just pure operations
Cloudflare Docs
Limits | Cloudflare R2 docs
Managed public bucket access through an r2.dev subdomain is not intended for production usage and has a rate limit applied to it. If you exceed the rate limit, requests through your r2.dev subdomain will be temporarily throttled and you will receive a 429 Too Many Requests response. For production use cases, consider linking a custom domain to y...
Thanks so much for the detailed explanation! That really clears things up for me. I appreciate you taking the time to walk through the technical details—makes a lot more sense now. This is super helpful!