Detailed explanation of ZooKeepr configuration file

Detailed description of ZooKeepr configuration items

 

 

  1. clientPort is required, the -D parameter is not supported, the listening port
  2. dataDir is required. The -D parameter is not supported. It is used to specify the directory where the ZooKeeper server stores snapshot files. By default, if dataLogDir is not configured, the transaction log will also be stored in this directory. Considering that the write performance of the transaction log directly affects ZooKeeper the overall performance, so it is recommended to configure the transaction log storage directory through the parameter dataLogDir
  3. tickTime is optional, the default value is 3000, the unit is milliseconds, the -D parameter is not supported, it indicates the time unit
  4. dataLogDir is optional, the default is the same as dataDir, the -D parameter is not supported, transaction log storage directory, try to store the transaction log on a separate disk, transaction log records have very high performance requirements on the disk, in order to ensure data consistency, Before ZooKeeper returns the client transaction response, the transaction corresponding to this request must be written to the local disk. Therefore, the performance of the transaction log writing directly determines the throughput of ZooKeeper when processing transaction requests. Storing the transaction log on a disk different from the snapshot will effectively improve the overall performance of ZooKeeper.
  5. initLimit must, the default is 10, which means 10 times the tickTime, which is used to specify the time for the Leader server to wait for the Follower to start and complete the data synchronization
  6. syncLimit is   required, the default is 5, which means 5 times the tickTime, which is used to specify the maximum delay time for heartbeat detection between the leader and the follower. In the ZK cluster, the Leader will periodically perform periodic heartbeat detection with all Followers to determine whether the Follower has hung up. If the Leader does not receive a heartbeat response within the syncLimit time, the Leader will consider the Follower to have hung up.
  7. snapCount is optional, the default is 100000, only the -Dzookeeper.snapCount configuration is supported, which indicates how many transaction operations to save a data snapshot after
  8. preAllocSize is optional, the default is 65536, the unit is KB, only the -Dzookeeper.preAllocSize configuration is supported, and the size of the disk space pre-allocated by the transaction log is specified
  9. minSessionTimeout and maxSessionTimeout are optional. The default values ​​are 2 times and 20 times tickTime respectively. The -D parameter is not supported. Specify the session timeout time range. If the session timeout time set by the client is no longer within this range, the timeout time will actually be is set to minSessionTimeout or maxSessionTimeout
  10. maxClientCnxns is optional, the default is 60, the maximum number of concurrency between a single client and a single server
  11. jute.maxbuffer is optional, the default is 1048575 KB, only supports -Djute.maxbuffer configuration, specifies the maximum data size that can be stored on a single data node (ZNode)
  12. clientPortAddress is optional, no default, does not support the -D parameter, for machines with multiple network cards, this parameter allows specifying different listening ports for each IP address
  13. servre.id = host:port:port Required when clustering, no default, does not support the -D parameter, specify the cluster machine ID and its connection address, the id is ServerID, which is consistent with the number in the myid file in each ZK server, the first One port is the port for the follower and the leader to communicate and synchronize data, and the second port is the communication port dedicated to the leader election.
  14. autopurge.snapRetainCount is optional, the default value is 3, and only supports -Dautopurge.snapRetainCount configuration. Starting from version 3.4.0, ZK supports automatic cleaning of data snapshots and transaction logs. This parameter specifies the number of snapshot files to be retained during automatic cleaning and Its corresponding transaction log file. The minimum value is 3, if it is set to a number less than 3, it will be adjusted to 3
  15. autopurge.purgeInterval is optional, the default is 0, the unit is hour, and the -D parameter is not supported. Starting from version 3.4.0, ZK supports automatic cleaning of data snapshots and transaction logs. This parameter specifies the cleaning interval
  16. fsync.warningthresholdms is optional, the default is 1000 milliseconds, only supports -Dfsync.warningthresholdms configuration, specifies the time-consuming alarm threshold when ZK performs transaction log fsync operation
  17. forceSync is optional, the default is yes, only the -Dzookeeper.forceSync configuration is supported, specifying whether ZK wants to flush the log to disk (actual write) when the transaction commits
  18. globalOutstandingLimit is optional, the default is 1000, only supports -Dzookeeper.globalOutstandingLimit configuration, specifies the maximum number of ZK request accumulation
  19. leaderServes is optional, the default is yes, only the -Dzookeeper.leaderServes configuration is supported, specifying whether the leader can provide services to clients
  20. SkipAcl is optional, the default is no, only supports -Dzookeeper.skipAcl configuration, specifies whether to skip the ACL check, if it is set to yes, the ACL is invalid
  21. cnxTimeout is optional, the default is 5000 milliseconds, only the zookeeper.cnxTimeout configuration is supported, specifying the timeout time for establishing TCP connections between servers during the election process

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326919669&siteId=291194637