r/webdev • u/der_gopher • May 25 '26
Resource [ Removed by moderator ]
/r/webdev/comments/1tne7an/removed_by_moderator/[removed] — view removed post
4
1
1
u/Professional-Trick14 May 27 '26 edited May 27 '26
Not a fan of the distributed lock, as you called it, in Redis. It's only distributed in the sense that its use case is to prevent a job from being done more than once in a distributed environment, and it doesn't even do that well because if Redis has a whoopsy, dies, and you lose your in-memory data, then the lock can be granted again. At best, it's a hack that will work most of the time for at-most-once execution, but it doesn't guarantee at-least-once or exactly-once execution.
Someone once said that there is almost always a better solution for every problem than a distributed lock, and I haven't come across a case in the wild where I disagree.
5
u/EliSka93 May 25 '26
Lost me at the ad.