CloudFlare Images rate limiting issues when running in a GCP function

I’ve used Cloudflare in the past for website DNS/proxy/caching and loved it. When I saw the low price for Cloudflare Images I decide to give it a shot.

My project is an Expo mobile app that uses Firebase functions for API calls (such as generating a direct upload URL and signed download tokens). Everything works great locally, but the Firebase function that calls Cloudflare’s API is getting frequent 429 responses, making it unusable. I’m probably making 5 calls a minute, if that. Shouldn’t be anywhere near a rate limit.

So my two questions:

Is this due to Cloudflare’s general rate limit from a single IP address? I’m wondering if the Firebase function I have (running on GCP) could be using the same public IP address as other functions from other accounts, and it might be enough to trigger Cloudflare’s max-calls-per-ip limit.

Separately, does Cloudflare actually enforce the 1200 requests in 5 minutes limit for API calls with Cloudflare Images? A moderately successful web app will hit that very quickly, so if that’s a real limit for Cloudflare Images, it’s not ready for primetime IMO.

I’d love to find a way to address both issues above - I like the simplicity of the product, but those two separate rate limits will be a problem for me.

Thanks for the help!

Is this due to Cloudflare’s general rate limit from a single IP address? I’m wondering if the Firebase function I have (running on GCP) could be using the same public IP address as other functions from other accounts, and it might be enough to trigger Cloudflare’s max-calls-per-ip limit.

It sounds like you trigger Cloudflare’s max-calls-per-ip limit here

Separately, does Cloudflare actually enforce the 1200 requests in 5 minutes limit for API calls with Cloudflare Images? A moderately successful web app will hit that very quickly, so if that’s a real limit for Cloudflare Images, it’s not ready for primetime IMO.

Yes it is. We will looking into a way to address this issue in Q3 specifically for Images API.

If you triggered 1200 requests in 5 minutes limit then all API calls would fail for several minutes. So I can assure you it’s not that limit you have triggered.

Thanks yevgen, appreciate the quick reply. Sounds like I’ll need to move my API to a solution that uses a fixed IP address, and I look forward to the Q3 update for Images API.

I may need to shift to S3 for the time being but I’ll keep an eye on the progress after Q3. I like Cloudflare as a whole and I hope to use Images API in the future.

This topic was automatically closed after 15 days. New replies are no longer allowed.