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

Or you could just use a CRDT.

You don't need PAXOS, RAFT, or CURP to implement a key-value store. Those are distributed state machines, all you need is distributed state.

That means you don't need a leader election. You don't need a leader. You don't need any round trips. You don't need coordination.

PAXOS was the only game in town for many decades, but there are better ways to do this now.



CRDTs are eventually consistent whereas Raft/Paxos consensus enables strict consistency with high availability. If you don't need strict consistency or you don't need high availability, then yeah, you don't need consensus.


This isn't my area, so I don't really know.

But, if CRTDs allow independent operation, don't they check the high availability box?


You can't really have "independent operations" on a bank account.

If node A sees deposit,withdraw and node B sees withdraw,deposit one of those is business-as-usual, the other is overdraft. You can't have a "high availability" system where some parts of the system are acting like it's okay, and other parts aren't.

Not everything is a bank, but a lot of things are often more-like-a-bank than they first appear...


Many things provide high availability, including hot backups that you manually promote to leader (i.e. the traditional database setup).

However, it's distributed consensus that solves for strict serializability (I should say, not strict consistency) and high availability as a combination.

See also the Jepsen page on consistency levels.

https://jepsen.io/consistency/models/strict-serializable


CRDTs don’t magically solve the ordering problem, though they do solve a bunch of other problems around merge conflicts.


They completely solve the ordering problem of a key-value store as described in this article.

What they don't do is give you a global linear ordering. But you don't need that in a key-value store, and you don't need that in most distributed computing.

People keep reaching for PAXOS and RAFT when they don't need it. It's pretty rare that you need a distributed linearization.


This is really worthy of a good blog post or article, if it hasn't been written yet.


Yes, it is. I'm trying to spread the word... but maybe this is the kind of thing that needs a good full-size articulation for it to really click.


What are the rare cases where its generally the right choice? Just curious




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

Search: