Does Tussle need a distributed lock? #16
Unanswered
nickjamesio
asked this question in
Q&A
Replies: 1 comment
-
The answer kinda depends on what collection of tussle components you're working with. I don't see a need for locks if you're using Cloudflare Workers and the R2 storage adapter at least. As far as I know, Cloudflare will direct a client to the same Worker for each request (unless the worker terminates/restarts) in which case it'll rebuild state from R2 (which claims to provide atomic guarantees). On the other hand, if you direct two clients to upload to the same upload destination, you're gonna have a bad time. (Always return a unique upload UUID or something during upload creation). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I started looking into tus and I stumbled on Tussle which looks amazing! Thanks for building it. While looking into Tus, I saw this faq about needing distributed locks https://tus.io/faq#how-do-i-scale-tus. Does Tussle need such a locking mechanism? Or does it already handle the case of two different workers processing the same file upload?
Here is a PR I found on adding a locker to the node server in case the context helps tus/tus-node-server#514
Beta Was this translation helpful? Give feedback.
All reactions