Automatically expire and delete znodes in Zookeeper?

Is there a way to automatically expire znode and delete (under Zookeeper) after some time? After that I do not need to support znode. I want to save resources.

If your answer is β€œno, your application should handle this,” could you point me to some documentation that makes this clear? (Now I suspect that this may be so, but I do not want to take it too quickly.)

If the answer is β€œno at this time, but Zookeeper can be extended to do this,” then I would especially appreciate offering a good starting point for creating such an improvement.

+4
source share
2 answers

According to Patrick on the Zookeeper Mailing List: ZNODE's time for life :

There is no TTL function in the current implementation.

It was April 26, 2012, which corresponds to version 3.3.5 according to the list Apache ZooKeeper releases .

I took notes on releases 3.3.6 , 3.4.4 and 3.4.5 and did not find any mention of β€œTTL” or β€œtime to live” or something like that.

+4
source

Zookeeper 3.5.3 contains ttl support on zknodes.

A new function call has been added where you can provide ttl for node in milliseconds.

0
source

Source: https://habr.com/ru/post/1491151/


All Articles