it allows you to deterministically identify a running node... this has been helpful for our use of doozerd at bitly particularly in scripts for cluster setup and daemon instantiation
ready for review @kr
matching pull request for client code on https://github.com/ha/doozer coming up
Closing this issue - newer code exists and should be merged against updated codebase with new PR.
We need community consensus on this feature addition. Can other people chime in with +1, thumbs up, please?
+1 from me
I should probably add tests for this too :)
Perhaps a more detailed description would be helpful for discussion.
When initializing a doozer cluster you need to add nodes under /ctl/cal/<id> for each participating instance. We wanted a way to be able to do this deterministically such that as instances come and go (hosts die, topology changes, etc.) we would know whether or not a given instance was already correctly configured in the cluster.
We did two things in order to accomplish this:
the /ctl/cal/<id> was based on our hostname the instance ran on, ie: app01.hostname.org == /ctl/cal/1 and app03.hostname.org == /ctl/cal/3
app01.hostname.org == /ctl/cal/1
app03.hostname.org == /ctl/cal/3
we added the SELF command so that we could query a doozer instance to retrieve its internal ID (the value that is assigned to the /ctl/cal/<id> node).
This allowed our cluster initialization script to query doozer and see what the value of that node was (if it existed). If it did not exist or did not match the value returned by a SELF command it meant that the node was not correctly configured and needed to be bootstrapped.
This also made the script idempotent.
I was planning on opening a pull request with some of these scripts relating to #46.
I would love to hear how others have resolved these issues for their production setups so we can decide whether or not this makes sense to go in.
It would be nice to see the startup scripts too. This has been a real pain point for us on doozerd startup.
add self transaction (for a client to deterministically identify a node)
add doozer_init script
pushed a commit w/ said script
this is very nice.
I wasn't quite ready for that script to go in, but I'll continue work on it in #46.
There are a couple gotchas that I will document there and solicit feedback.