Klowner / tussle

Tus daemon written in Typescript using a pluggable architecture
MIT License
36 stars 2 forks source link

Does it make sense to use cloudflare worker kv statestore for r2 uploads #15

Open rverma-dev opened 3 months ago

rverma-dev commented 3 months ago

The examples only demonstrate usage of cloudflare kv state store for b2. Wondering whether we could get benefitted with using worker KV state store or the default worker cache is sufficient?

Klowner commented 3 months ago

The short answer is no, I would recommend using @tussle/state-memory-ttl with Cloudflare/R2.

I'll happily provide a long answer when I'm at my computer.

Klowner commented 3 months ago

The long answer:

So with that in mind: using a transient in-memory state store with R2 means upload state and data are stored in a single point of truth (good!), and that point of truth has global strong consistency guarantees (also good!).