简体   繁体   English

与kafka在同一节点上的Zookeeper?

[英]Zookeeper on same node as kafka?

I am setting up a kafka+zookeeper cluster. 我正在建立一个kafka + zookeeper集群。 Let's say I want 3 kafka brokers. 假设我想要3个卡夫卡经纪人。 I am wondering if I can setup 3 machines with kafka on them and then run the zookeeper cluster on the same nodes. 我想知道我是否可以使用kafka设置3台机器,然后在相同的节点上运行zookeeper集群。 So each machine has a kafka+zookeeper node in the cluster, instead of having 3 machines for kafka and 3 machines for zookeeper (6 in total). 因此每台机器在集​​群中都有一个kafka + zookeeper节点,而不是3台机器用于kafka,3台机器用于zookeeper(总共6台)。

What are the advantages and disadvantages? 有哪些优点和缺点? These machines will most probably be dedicated to running kafka/zookeeper. 这些机器很可能专门用于运行kafka / zookeeper。 I am thinking if I can reduce costs a bit without sacrificing performance. 我在想是否可以在不牺牲性能的情况下降低成本。

We have been running zookeeper and kafka broker on the same node in production environment for years without any problems. 我们一直在生产环境中的同一节点上运行zookeeper和kafka broker,没有任何问题。 The cluster is running at very very high qps and IO traffics, so I dare say that our experience suits most scenarios. 群集以非常高的 qps和IO流量运行,所以我敢说我们的经验适合大多数情况。

The advantage is quite simple, which is saving machines. 优点很简单,即节省机器。 Kafka brokers are IO-intensive, while zookeeper nodes don't cost too much disk IO as well as CPU. Kafka代理是IO密集型的,而zookeeper节点不会花费太多磁盘IO和CPU。 So they won't disturb each other in most occasions. 所以在大多数情况下他们不会互相打扰。

But do remember to keep watching at your CPU and IO(not only disk but also network) usages, and increase cluster capacity before they reach bottleneck. 但请记住继续关注CPU和IO(不仅是磁盘而且还有网络)用法,并在达到瓶颈之前增加群集容量。

I don't see any disadvantages because we have very good cluster capacity planning. 我没有看到任何缺点,因为我们有非常好的集群容量规划。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM