How to calculate the number of zookeeper servers I need for a cluster?

一曲冷凌霜 提交于 2020-01-24 12:14:08

问题


Is there a formula to calculate the number of zookeeper servers I need? Say a cluster may have 50, 500, or 5000 servers running, how do I convert those numbers into how many zookeeper server I want to start?

To put it another way, what's a good estimate for the workload a zk server can handle? Is it based on the size of the storage, or QPS the quorum receives, or some other metrics?


回答1:


The workload an ensemble (cluster) of ZooKeeper servers can handle, is primarily dependent on the number of writes your application performs. It's not dependent on the number of clients to the ZooKeeper ensemble.

The number of ZooKeeper servers in the ensemble will have an effect on the write performance where having fewer (optimal is 3) is faster. However, you would like to have more than 3 ZooKeeper servers in order to be able to roll your ZooKeeper servers without downtime. As an example you can restart one server and still survive a crash with a 5 ZooKeeper ensemble.

See also throughput example here: https://wiki.apache.org/hadoop/ZooKeeper/Performance

Does that answer your question?



来源:https://stackoverflow.com/questions/42880362/how-to-calculate-the-number-of-zookeeper-servers-i-need-for-a-cluster

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!