Muhammad Gelbana
Muhammad Gelbana

Reputation: 4000

Is there a way to delete an ephemeral node after a client is disconnected by some time?

Our cluster nodes take actions on the deletion of some ephemeral nodes but we're having network issues at a customer that leads to the deletion of the ephemeral nodes for some clients, although those clients are still up and running.

I agree that the network issues should be solved but it doesn't look like we can do that at the moment.

So is there a way to configure Zookeeper to delete the ephemeral node for a disconnected client only if it stays disconnected for X amount of time ?

We use Apache Curator as a Zookeeper client. Our Zookeeper version is 3.4.6.

Upvotes: 1

Views: 2623

Answers (1)

nsuneja
nsuneja

Reputation: 336

You can play around with zookeeper's session timeout configuration to achieve the desired behavior. Zookeeper server will delete the ephemeral node for a session after not receiving any heartbeat from the client for the session timeout duration.

Upvotes: 3

Related Questions