Book Image

Apache ZooKeeper Essentials

By : Saurav Haloi
Book Image

Apache ZooKeeper Essentials

By: Saurav Haloi

Overview of this book

Table of Contents (14 chapters)
Apache ZooKeeper Essentials
About the Author
About the Reviewers
Performing Common Distributed System Tasks

ZooKeeper best practices

Some of the best practices of running and managing a ZooKeeper ensemble are show here:

  • The ZooKeeper data directory contains the snapshot and transactional log files. It is a good practice to periodically clean up the directory if the autopurge option is not enabled. Also, an administrator might want to keep a backup of these files, depending on the application needs. However, since ZooKeeper is a replicated service, we need to back up the data of only one of the servers in the ensemble.

  • ZooKeeper uses Apache log4j as its logging infrastructure. As the logfiles grow bigger in size, it is recommended that you set the auto-rollover of the logfiles using the in-built log4j feature for ZooKeeper logs.

  • The list of ZooKeeper servers used by the clients in their connection strings must match the list of ZooKeeper servers that each ZooKeeper server has. Strange behaviors might occur if the lists don't match.

  • The server lists in each Zookeeper server configuration file should...