Hi Andrei, the answer may not be as simple as that. In the case of "passive
leader" you might want to just wait till you're reconnected before taking
any action. Connection loss indicates that you aren't currently connected to
a server, it doesn't mean that you've lost leadership (if you get expire
You should also be careful how you handle connection loss events. The
leader should suspend itself and re-run the election process when the
connection is reestablished.
On Sat, Sep 4, 2010 at 8:37 AM, Mahadev Konar wrote:
> Hi Eric,
> As Ted and you yourself mentioned its mostly to avoid herd af
Hi Eric,
As Ted and you yourself mentioned its mostly to avoid herd affect. A herd
affect would usually mean 1000¹s of client notified of some change and would
try creating the same node on notification. With just 10¹s of clients you
don¹t need to worry abt this herd effect at all.
Thanks
mahad
You are correct that this simpler recipe will work for smaller populations
and correct that the complications are to avoid the herd effect.
On Thu, Sep 2, 2010 at 12:55 PM, Eric van Orsouw
wrote:
> Hi there,
>
>
>
> I would like to use zookeeper to implement an election scheme.
>
> There is a r
Hi there,
I would like to use zookeeper to implement an election scheme.
There is a recipe on the homepage, but it is relatively complex.
I was wondering what was wrong with the following pseudo code;
forever {
zookeeper.create -e /election
if creation succeeded then {