How does doozer maintain consistancy between all the nodes?

290 views
Skip to first unread message

gitted

unread,
Jun 13, 2013, 10:39:16 PM6/13/13
to doo...@googlegroups.com
Greetings!

I'm trying to get a handle of how doozer works under the covers, hoping someone who understands the internals can shed some light:

How is this case handled:

Say you have 5 dozerd servers running.

A 'add message' request is sent, and now when the update is being propogated to the rest of the 4 servers, say 1 server goes down.  Where in the code, and more importantly, what happens in this case?  Does it publish the change and using a socket connection try and make calls to the other 4 servers, and it times out if any server is down?

Keith Rarick

unread,
Jun 13, 2013, 11:03:21 PM6/13/13
to doo...@googlegroups.com
This is a pretty big question. The answer is that Doozer
uses the Paxos distributed consensus algorithm. Paxos
is at the heart of *all* consistent, fault-tolerant distributed
systems. Understanding how it works is worth study. You
might start at the wikipedia page for Paxos:

http://en.wikipedia.org/wiki/Paxos_(computer_science)

It also has links to academic papers with formal proofs
and rigorous descriptions of the algorithm.

Does anyone want to jump in with thoughts on how this
works specifically in the case of Doozer?
> --
> You received this message because you are subscribed to the Google Groups
> "doozer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to doozer+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Jim Dixon

unread,
Jun 19, 2013, 4:45:52 PM6/19/13
to doo...@googlegroups.com

Each doozerd instance uses has a TCP/IP connection to talk to clients and a UDP connection to talk to other doozerd nodes (peers).  The client/server protocol is described in doc/proto.md; the relevant code is in doozerd/server.   When a SET message is received (containing a path/value pair), the server forwards it to its proposer, which passes it on to the consensus code.  This copies the proposal (using UDP) to the consensus components of the other doozerd nodes.  If a quorum agree, the proposal is committed, and the value proposed is saved in the store at the right placed, the path.  The server then informs the client using the TCP/IP connection that the proposal succeeded

Whether or not one of the doozerd instances has failed is not immediately relevant to the consensus process.  What matters is simply that a quorum agree to accept the message.   As soon as a quorum agree, the proposal succeeds.
Reply all
Reply to author
Forward
0 new messages