curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikrant Singh <vikrant.subscr...@gmail.com>
Subject Re: Persistent Ephemeral Node
Date Mon, 12 Oct 2015 21:41:05 GMT
thanks for the response... yes I want the same feature i.e. not worrying
about recreation of the node if connection loss is temporary.
Being said that.. I also want to make sure that we restart a new instance
of service when it dies. To do that I am using tree cache, a standby
process keep an eye on every node through tree cache and moment it sees one
node going down it provision itself as the same.

Problem is tree cache does not know about nature of ephemeral nodes. So
standby process will treat them same and I will end up in a situation where
two processes are trying to create same node.


On Mon, Oct 12, 2015 at 2:04 PM, Cameron McKenzie <mckenzie.cam@gmail.com>
wrote:

> hey Vikrant,
> Using a persistent ephemeral node just means that your application code
> doesn't need to worry about handling recreation of the node when it
> reconnects to ZooKeeper after connection / session loss.
>
> If your ephemeral node should always be present whenever your application
> instance is running, then this would be a good use case for a persistent
> ephemeral node.
> cheers
>
>
> On Tue, Oct 13, 2015 at 6:03 AM, Vikrant Singh <
> vikrant.subscribe@gmail.com> wrote:
>
>> I have some basic question on persistent ephemeral node.
>>
>> Here is some background...
>>
>> We have a zoo keeper based service discovery setup. Each service register
>> itself as a ephemeral node with zookeeper.When a service go down  its
>> ephemeral node is removed from zookeeper and we know that service is down
>> and we provision it again.
>>
>> At present we create plain ephemeral node. I am wondering what
>> benefit/risks we may get if move to persistent ephemeral ones.  I see one
>> problem... using  plane ephemeral node we can rely on state of ZK to make a
>> decision like service is down. This is because we are sure that if a node
>> get deleted with zoo keeper it will never comeback from same process. But
>> if moved to "persistent ephemeral" I guess same may not be the case.
>>
>> Please let me know what you think of the same.
>>
>> Also I would like to know what are the best scenario where one should
>> prefer using persistent ephemeral node over ephemeral node.
>>
>> Thanks,
>> Vikrant
>>
>
>

Mime
View raw message