How to improve Workers KV read speed

Workers KV is a global, low-latency, key-value data store. It supports exceptionally high read volumes with low-latency, making it possible to build highly dynamic APIs and websites which respond as quickly as a cached static file would.

However, I can’t get anything better than ~12ms, and even then it spikes a lot even when running the Apache HTTP server benchmarking tool against it. That’s not exactly low-latency.

Did anyone run benchmarks who got something better? How?

Any suggestions on how to improve the Workers KV read speed?

You could store that read in your script global variables if the values don’t change much. The first read from KV, therefore reads from global variables, until there is eviction. There is a big difference on the first run from Free and Bundled plan.

Thanks but these reads can’t be inlined as it’s a lot of data.
The first run isn’t included. I’m only talking about best case yield.

You get 12ms and you want better?!!! :crazy_face:

See my problem "Always lowest latency".



Well, it’s the web. The user doesn’t want to wait. Thanks for that link.