I've had good results using Redis as a lock server, but I live in (perhaps misplaced) fear of a client hanging or crashing leaving a lock stranded. Not that this is really Redis's problem.
I've had good results using Redis as a lock server, but I live in (perhaps misplaced) fear of a client hanging or crashing leaving a lock stranded. Not that this is really Redis's problem.
Even given this, bad lock timing (not that likely) or a crash (more likely) could let inconsistency in.
Shrugs
Like I said, my problem is not really Redis's. If I can't trust everything that uses a lock not to crash 99.99% of the time I should really be looking at our jobs and not at Redis.
Even then, though, it's probably more a matter of me not trusting things than it is said things not actually being trustworthy.
I'd be interested to hear about your implementation if you can share (email is HN username at gmail.com)
https://github.com/jamwt/dreadlock
It will release the lock when the client dies (disclaimer: I wrote it).
Or you can go whole hog and use zookeeper + ephemeral nodes. More robust but quite a bit more complex.