Workers CPU time 99.9th percentile

Hello, I have deployed a worker which has a 29.8 ms CPU time in 75th percentile and around 40ms in 99th percentile. What will happen if the 99.9th percentile is higher than the limit 50ms? Will all the requests fail? Is there a plan to increase the 50ms limit? It’s quite limiting for some usecases where the CPU time is 25-50ms, since having a 0,1% of failed requests is not aceptable, an overcharge for those requests would be preferable.

thanks

There is a soft limit, which only kicks in if you consistently go over the 50ms limit, some >50ms requests won’t cause issues.

There is Workers Unbound, in private beta. Pricing Lambda-style.

2 Likes

I should add that the worker startup-time also shows in the worker stats, sometimes this can cause spikes 100 to 200ms, but this doesn’t affect the limit of 50ms. If the 75th percentile is less than 50ms it’s generally safe in production (According to my load testing). It’s common to see < 8ms on the 75th but still see > 20ms on the 99th.

From the docs “higher quantiles may appear to exceed CPU time limits without generating invocation errors because of a mechanism in the Workers runtime that allows rollover CPU time for requests below the CPU limit”

1 Like