本文介绍了ZooKeeper集成集群中的服务器数量上限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用例:一个池中有100台服务器;我想在每个服务器上启动ZooKeeper服务,并且服务器应用程序(ZooKeeper客户端)将使用ZooKeeper群集(读/写).这样就不会出现单点故障.

Use case: 100 Servers in a pool; I want to start a ZooKeeper service on each Server and Server applications (ZooKeeper client) will use the ZooKeeper cluster (read/write). Then there is no single point of failure.

此用例是否可以使用此解决方案?性能如何?

Is this solution possible for this use case? What about the performance?

如果池中有1000台服务器怎么办?

What if there are 1000 Servers in the pool?

推荐答案

如果您只是想避免出现故障点,那么您只需要3台服务器.在3个节点的集合中,可以容忍单个故障,而其余2个节点构成定额.服务器越多,写入性能就越差.如果ZK甚至可以处理,那么100个服务器就是其中的一个极端.

If you are simply trying to avoid a single point of failure, then you only need 3 servers. In a 3 node ensemble, a single failure can be tolerated with the remaining 2 nodes forming the quorum. The more servers you have the worse write performance will be. And 100 servers is the extreme of this, if ZK can even handle it.

但是,拥有这么多的客户完全没有问题.Zookeeper具有超过1000个客户端的活动部署.如果发现需要更多服务器来处理读取负载,则可以随时添加观察器.我强烈建议您加入列表服务.这是一种快速回答您的问题的绝妙方法,而且可能比任何人在SO上给您的信息都要详细得多.

However, having that many clients is no problem at all. Zookeeper has active deployments with many more than 1000 clients. If you find that you need more servers to handle your read load, you can always add Observers. I highly recommend you join the list serve. It is an excellent way to quickly have your questions answered, and likely in much more detail than anyone will give you on SO.

这篇关于ZooKeeper集成集群中的服务器数量上限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 18:35