5 ms·
You'll want to use a library that implements Redlock: http://redis.io/topics/distlock http://redis.io/topics/distlock
by craz 10y ago
You'll want to use a library that implements Redlock: http://redis.io/topics/distlock http://redis.io/topics/distlock
- SEJeff 10y agoYou really don't want to use redlock: http://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html http://martin.kleppmann.com/2016/02/08/how-to-do-distributed... Antirez's rebuttle didn't really rebuke martin's overall theory that redlock is a very bad locking algorithm: http://antirez.com/news/101 http://antirez.com/news/101
- dpark 10y agoDid anyone else ever publish a meaningful response? I thought Antirez's response was reasonable but I also recognize the inherent bias. I'd love to see responses from other experts, ideally written such that non-experts can reasonably understand.
- SEJeff 10y agoI recall several people on twitter (I follow a lot of distributed systems people / cs professors as it is part of my job to build these things) who agreed with Martin's analysis.
- dpark 10y agoI'll have to see if I can dig some of the responses up. It bugs me that I still don't know if this algorithm is actually safe.
- SEJeff 10y agoHonestly given Antirez's response I'm genuinely surprised no one has written a TLA+ or similar formal verification proof. Then the outcome is binary; either redlock is sound and works as expected, or it is not. Amazon's AWS Architect, James Hamilton is a big fan of this approach, as are most of the heavyweights in distributed systems: http://perspectives.mvdirona.com/2014/07/challenges-in-designing-at-scale-formal-methods-in-building-robust-distributed-systems/ http://perspectives.mvdirona.com/2014/07/challenges-in-desig... EDIT: prefaced URL with http
- nurettin 10y agoThanks, I learned the fencing token lock algorithm from this.