antirez / disque

Disque is a distributed message broker
BSD 3-Clause "New" or "Revised" License
8.01k stars 537 forks source link

what consensus algorithm? #27

Closed dimitar9 closed 9 years ago

dimitar9 commented 9 years ago

Hi Antirez, Can I ask, what consensus algorithm do you use in disque? Paxos or Raft or your home-make algorithm?

Thank you, Dimi

antirez commented 9 years ago

@dimitar9 no consensus, since it's an AP system. Jobs are immutable so every job is the same forever in all the instances it was synchronously replicated, so there is no state change apart from the fact that jobs at some point are acknowledged. The acknowledge flag is merged between instances in a trivial way: if an instance has the job as acknowledged, eventually all the other instances will acknowledge it (this is technically the merge function of the AP system).

May I ask why do you think Disque would require a consensus algorithm for the API it exposes today?