ZooKeeper maximum number of children per node

I use ZooKeeper to store hierarchical data. In one test, I saved more than 300 thousand children for one node. The ZK client crashed due to a ConnectionLossException when I tried to recover ALL child elements.

Remodeling data can solve the problem (for example, by bucketing, as this reduces the number of children per node).

However, I am curious to know the answers to the following questions:

  • ZK has a limit on the data that can be stored on one node (no more than 1 MB), is there the same limit on the number of children per node?
  • Does the Java Heap size increase the ZK size to increase the number of children per node?
  • Is there a way to control how these children are sent back to the client? if the children are sent in one batch, then the "hiccups" of the network can destroy the message and cause a failure.

Thank!

+4
source share

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


All Articles