re: Cloudflare Workers KV Introduction VIEW POST


I wasn't aware Cloudflare had key-value storage!

Looks very interesting indeed. Although pricing is a bit high, if you compare it with an API Gateway and DynamoDB on AWS, it's not much more expensive. Workers are a lot cheaper than an AWS API Gateway + Lambda, so the bottom line is more persuasive for Cloudflare.

Good post Kay, thanks for sharing!


Glad you like it!

I was surprised too. This won't replace a database for all use cases, but it certainly pushes what you can do before you need one :)


Yes, definitely. It really opens up interesting use cases.

It could be used to support Tensorflow JS, for example, in order to have AI models running with very low latency in the browser backed by data stored in KV.

When data needs to be persisted long term, Workers can send the data to an external DB as well but asynchronously...

Haha, could be tight.

TFJS ES2017 is 818KB and CFW allow 1 MB max :D

Edit: I also read TFJS uses WebGL, which might not be available in CFW. I saw they support a WebAssembly alternative, but I don't know if that will get you over 1 MB.

Sure, yes, I mean using TFJS in the browser, backed by models stored in CF KV.

Wasn't aware of the 1 MB payload limit in Workers. What's the point if KV can store up to 10 MB? At first glance, I would presume Workers should be able to support at least the same limits as KV...

But anyway, models could be stored statically in the CDN anyway

Oh, I didn't mean payload. I meant script size.

Don't know really about the payload.

Code of Conduct Report abuse