Workers Capacity and SLA


#1

Hi

We currently use Amazon API Gateway + Lambda to process 3,000 concurrent requests.

We want to dramatically improve this level of performance by using Cloudflair instead of Amazon for this task.

We believe we can run our script on the edge (using Cloudflare Workers)

I have 2 questions

  1. How many concurrent request can I make
  2. Does Cloudflare have an Service Level Agreement.

Thank you


#2

Hi Mark,

I believe there is no real limit here, especially with 3000 rps is not an issue. NPM is run on top of Workers, they handle tens or even hundreds of thousands of requests per second.

If you go in the feature comparison (https://www.cloudflare.com/plans/#compare-features) there is the row for SLA. It’s 100% for Business plans, 2500% for Enterprise. I have not seen a system-wide disruption in years (back then they were like a year old).


#3

The most important thing should be that the worker uses no more than 128MB in all concurrent processes per Datacenter, and takes Worker CPU time per execution for each plan no more than:

  • Free: 5ms
  • Pro: 10ms
  • Business: 50ms

The real-time per request is now 30 seconds.

The bottleneck could be where the worker connects to.

How many requests do you have per month? What type of job does your worker?


#4

Thanks for your response

I get requesting a file takes tiny CPU resources

We are getting image, json and certificate assets from the CDN, creating a manifest file with hash values for each, creating a PK7 signature then zipping up and returning the file

I assume this consumes more CPU resources.

Is honestly no way to find out what resources our script is using per request?


#5

You can try experimenting cloudflareworkers.com or buying the subscription for a month. It’s 5$…

Unfortunately I didn’t try those things, I know the actual request is insignificant. The other thinks depend on the size of the files.


#6

This hard limit has been removed :tada:

You should be able to test workers by enabling it for a month ($5/month base price) and setting it up on a test endpoint/test subdomain. If some regular load on that endpoiny never returns errors then you probably aren’t hitting any limits. Note than an Lambda function that takes 2-3 seconds will likely take less than a few milliseconds on Cloudflare since Lambda functions are ran on a slow containerized node instance, which makes executions slower than when run on bare metal.