Workers KV persistence

Are there any guarantees of persistence with KV?

Would I need to backup static files somewhere else? For example if storing user images and such.

Depends how you design your app.
You could store in KV and use BackBlaze for an affordable backup, more like a vendor locking protection, backup is not an issue.


The answer to this is always yes.

And another thing you can do is to have your worker race the KV and backblaze for the content. If the KV ever has a hiccup, it would automatically serve from Backblaze.

If a worker fails CF will look for a cached URL and if not serve from origin?

  1. Try cache
  2. Promise.race KV and Backblaze, whichever is faster serves the file.

Keep in mind, Backblaze isn’t built to serve content and it will instantly fail at scale.

Yeah, I wasn’t intending on using BB.

Most likely some cloud object storage.

1 Like

It sounds like you’re asking about durability?

KV has the same durability guarantees as any cloud store. If you put something in KV, it should stay there until you remove it.

This just depends on you. Having redundant copies of something may or may not be something that you care about.