Re:Cassandra is not row level consistent
by AznHisoka on Thursday November 24, 2016 @07:48PM
(#13033749)
what about using redis for distributed locks? (assuming you are not using redis cluster)
[ Parent
| on HN ]
You'll want to use a library that implements Redlock: http://redis.io/topics/distlock
Re:Cassandra is not row level consistent
by SEJeff on Thursday November 24, 2016 @09:57PM
(#13034126)
You really don't want to use redlock: 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
Did 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.
I 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.
I'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.
Honestly 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-desig...
EDIT: prefaced URL with http
Re:Cassandra is not row level consistent
by nurettin on Friday November 25, 2016 @12:30AM
(#13034587)
Thanks, I learned the fencing token lock algorithm from this.
Re:Cassandra is not row level consistent
by helper on Thursday November 24, 2016 @07:55PM
(#13033766)
I personally wouldn't use redis for anything besides a cache.
Re:Cassandra is not row level consistent
by fgasparini on Thursday November 24, 2016 @08:50PM
(#13033924)
Why not?
It has a WAL persisted to disk at a desired interval. It provides the same durability levels of most databases.
Re:Cassandra is not row level consistent
by helper on Thursday November 24, 2016 @09:25PM
(#13034028)
Let me be clear, I think redis is a well engineered piece of software and I have been constantly impressed with the way antirez runs the project.
Specifically for the question of a locking service, I need more availability than what a single node can offer. I'm not sure if you are advocating for using redis cluster as a locking service, but since it intentionally doesn't offer write safety during a partition that does not seem advisable.