Underlying Storage Scheme for Durable Objects

Hello, I’m searching for the underlying storage scheme for durable objects.

I noticed I can simply use this.state.storage.put(key, someJSON) but I can’t seem to find anything in the docs that explain “what” the JSON is stored as under the hood.

I’m asking because I’d like to know if I should use msgpack or something to reduce the size of objects before storing them. Seeing as how 500ms CPU is included and I don’t really care about blistering speed, the overhead might be worth reducing my overall storage usage if objects scale to millions quickly.

Hey @mattdlockyer,

You could run a compression algorithm to reduce the size of the stored objects. It’s worth noting, though, that the tradeoff isn’t just between stored data size and speed. You’ll be billed duration for every ms that the object is executing code, so the increased execution time costs may outweigh the cost savings from compressing the values.

Let me know if that makes sense.


Where is the pricing information?

All I could find is this and it doesn’t detail the price per ms.

But yes everything makes sense!

I suspect it’s based on Workers pricing: