If the connection to ZooKeeper is lost, the Dynamic Data Masking Server automatically attempts to restore the connection and re-create the ephemeral node in ZooKeeper.
The following process describes how the Dynamic Data Masking Server attempts to restore the connection and re-create the ephemeral node:
During the connection, Dynamic Data Masking provides the session timeout value to ZooKeeper. ZooKeeper manages session expiration.
If the connection is lost, Dynamic Data Masking attempts to restore the broken connection within the specified timeout period in order to retain the ephemeral nodes.
When ZooKeeper does not receive a response from Dynamic Data Masking within the specified session timeout period, it expires the Dynamic Data Masking session. When the session expires, ZooKeeper removes all ephemeral nodes owned by the session and immediately notifies all connected clients, which are watching the nodes, about the change.
The Dynamic Data Masking instance associated with the expired session remains disconnected from ZooKeeper, and is not notified of the session expiration until it reconnects with ZooKeeper. When the connection with ZooKeeper is reestablished, Dynamic Data Masking receives a Session Expired notification. At this point, Dynamic Data Masking attempts to re-create all ephemeral nodes that were created during the expired session.
By default, Dynamic Data Masking provides a session timeout value of 10,000 milliseconds (10 seconds) to ZooKeeper. To modify the default value, set the
zookeeper.timeout
system property in the
jvm.params
file. For example, to set a session timeout value of 12 seconds specify:
zookeeper.timeout=12000
For the minimum and maximum session timeout values that ZooKeeper allows the client to negotiate, see the ZooKeeper documentation. For more information, contact your ZooKeeper administrator.
Dynamic Data Masking monitors the ephemeral nodes that it creates so it can restore the nodes and node content as follows:
When reestablishing connection with Zookeeper, Dynamic Data Masking restores the ephemeral nodes and the content.
If a third-party tool is used to remove the ephemeral nodes, or remove the parent cluster node and then create it again, Dynamic Data Masking restores the ephemeral nodes.
If a third-party tool is used to modify the ephemeral nodes, Dynamic Data Masking restores the node content.