Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What happens when some of the quorum members are not available?

The fact that split brain is not allowed implies that liveness is given up for it.

More importantly, what can I possibly do in the scenario where I would like to obtain several locks at the same time?

Distributed lock frameworks usually imply there’s some sort of transaction reversal mechanism implied by the architecture.



I see they mention Raft in the article. If they are updating a directory of ownership data via Raft then your split brain problem is addressed.

Generally, distributed locks are a fiat based system. I claim ownership of something and I have indisputable rights to that thing until lease renewal time. If the lease renewal fails for any reason I have to give up my claim on the object.

I might have an architecture that lets me make forward progress in a split brain scenario because I owned a lease before the split happened. If the recovery is fast enough then everything will be fine.

However my instincts tell me that it would take a pretty special problem domain and a very assertive dev team to maintain this invariant over a long period of time. Business people see all this data we have and they want to connect it more and more over time. They are not above selling a feature and then cajoling us into implementing it, even if it reduces long-term viability.

In the end you are left with is a distributed system with lower overhead per transaction. But that's nothing to sneeze at.


Each lock has an associated name. If you have locks for separate purposes, you have separate names. If you need to grab multiple locks before processing a single task, I would suggest looking for a design that doesn't need it. If there is no other way, then acquring each like in a defined order would still work.


This is one area where code reuse bites us and I think this is why you see so many systems starting to resemble functional code principles.

There are many code bases where you delegate an action to a module that goes out and modifies state (or doesn't) based on its own rules. Composing these things becomes challenging.

It leads to situations where verbs that sound like they should be side effect free are unknowingly causing an avalanche of updates behind the scenes.

And when two calls can touch the same objects in a different order (eg, when you have many-to-one relationships), then you are up a creek without a paddle.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: