zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Junqueira <...@yahoo-inc.com>
Subject Re: Reconnecting to another host on failure but before session expires...
Date Mon, 05 Jan 2009 09:51:39 GMT
Are you guys passing one server to the ZooKeeper constructor or a list  
of servers? If possible, could you provide your part of the code in  
which you create a ZooKeeper object?

Thanks,
-Flavio

On Jan 5, 2009, at 10:46 AM, David Yee wrote:

> I'm seeing this behavior as well, and I'm dealing with it by writing  
> custom code to handle the logic of reconnecting to another zookeeper  
> server.
>
> it would be nice to get some clarity regarding whether this is  
> expected behavior or if there is a bug in the client code.
>
> We've also written code for dealing with other issues when losing a  
> connection to a zk server. (implict triggering of all watches -  
> since watches are stored locally on a particlar an server, etc)
>
>
> On Jan 5, 2009, at 12:03 AM, "Kevin Burton" <burton@spinn3r.com>  
> wrote:
>
>> I'm not observing this behavior... if I shutdown the zookeeper  
>> server my
>> client doesn't reconnect and I get a disconnect event followed by  
>> eventual
>> session expiration.
>>
>> Which is not the behavior I want :)
>>
>> "Clients connect to a single ZooKeeper server. The client maintains  
>> a TCP
>> connection through which it sends requests, gets responses, gets  
>> watch
>> events, and sends heart beats. If the TCP connection to the server  
>> breaks,
>> the client will connect to a different server."
>>
>>
>>> I don't see this documented anywhere.
>>> I setup 5 zk servers.... if I connect to host1 and am performing  
>>> some
>>> action like watching for file updates, and host1 fails, I *should*  
>>> be able
>>> to connect to hosts2-5 just fine.
>>>
>>> But the ZooKeeper object doesn't do this for me....
>>>
>>> What's the correct behavior here?
>>>
>>> Kevin
>>>
>>>
>> -- 
>> Founder/CEO Spinn3r.com
>> Location: San Francisco, CA
>> AIM/YIM: sfburtonator
>> Skype: burtonator
>> Work: http://spinn3r.com


Mime
View raw message