tus / tusd

Reference server implementation in Go of tus: the open protocol for resumable file uploads
https://tus.github.io/tusd
MIT License
2.92k stars 465 forks source link

A redis based lock for distribued tusd instances #1129

Open whytheplatypus opened 2 months ago

whytheplatypus commented 2 months ago

This introduces a redis backed locker. This is probably most useful for tusd instances that are distributed, ephemeral, or have to scale up and down.

It uses the redis pub/sub feature to request a lock be released.

The tests use what looks like a pretty nice little redis implementation meant for testing.

Acconut commented 1 month ago

Thank you very much for this PR! I will have a more thorough look next week. There are a few things I would like to add to this PR are: documentation for the package itself, documentation for our homepage (https://tus.github.io/tusd), integration with the CLI (so that it can also be used with the tusd binary), and maybe more in-depth tests to ensure that the release notifications also work properly. But I can take care of those :)

thedentist8 commented 1 month ago

Awesome, would be great if this gets merged.

@whytheplatypus, I'm wondering if you've had a chance to run this on production and how it looks so far?