Free Tier can break your website, should we call it a Trial Tier?

Hi,

One of the best new features of Cloudlare Workers recently announced revamp was the Free Tier:

We’re excited to announce that starting today, Cloudflare Workers® gets a CLI, new and improved docs, multiple scripts for everyone, the ability to run applications on workers.dev without bringing your own domain, and a free tier to make experimentation easier than ever.

However, as it is currently implemented, as soon as the account reaches one of its limits, not only does Workers stop running, but your visitors start getting a nasty 1025/1015 error page:

image

To the best of my knowledge, this is the only CF feature that can break a site mid-flight when a limit is reached. The only possible remedy appears to be turning the worker route off for the whole site and wait the time-out. And that can only be done, of course, when and if the site owner is aware of the limit being reached, which can happen during testing/debugging, but may as well happen only after one leaves the worker running for a period of time.

I for instance was testing a worker that applies to all files of the website, which means it runs about 45 times every time a page is requested. But after only a few refreshes, perhaps 5 in total, I was rate limited and had to turn the worker route off, lest visitors get that error page instead of my site. (There’s a limit of 100,000 requests/day for the account, and 1,000 requests/minute. Since I was far from either limit, I’m really not sure I understand how CF applies the rate limiting)

I suggest that Workers stop running for the remainder of the period after the Free Tier limit is reached, instead of breaking the site without warning. A message on the Workers tab could then let the admin know it didn’t run for the whole period due to limits being reached at times. This could lead many users testing Workers to finally adopt it on a permanent, paid basis. As it stands, the block / error message could instead alienate many potential users of the service.

Or, otherwise, it could instead be called Trial Tier. Since all other free services CF provides (and there are plenty) are not limited in a way that could make the site stop working, at least by changing the label to “Trial” it could perhaps become clearer for customers that there’s something rather different with this special tier for Workers.

6 Likes

Very interesting point, I’ll bring it up with the team.

@floripare, if you put event.passThroughOnException() in your Worker script does that allow your visitors to pass through the rate limit page?

3 Likes

Good question.

I’m afraid I can’t test this anymore, as I have moved to the paid tier in order to implement a security solution involving a worker as described in another post.

But if you browse through this category, you’ll find recent posts where users are mentioning 1015 errors, so perhaps you may want to suggest to some of them to put this line of code to test.

I can confirm @ashcon that you solution doesn’t work. Tried it.

2 Likes

Oh, also @ashcon see this thread:

2 Likes

Yeah, event.passThroughOnException() won’t help here because when the rate limit is reached, the worker doesn’t actually run, so event.passThroughOnException() never gets called.

Note that simply turning off the worker when limits are reached may work for some sites but not others. If people are relying on Workers for security, for example, then turning it off may be much worse than producing an error. So this is a somewhat complicated problem…

In any case we know the current behavior is not great and we’re working on improving it!

4 Likes

I did not like the answer. Its really difficult to purchase a paid plan of worker. The language specific on free worker indicate that after 100000 request the request will be all paid. It has no mention of rate limit on the page itself or on any help link.

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