在Docker容器中运行Kafka集群? [英] Running Kafka cluster in Docker containers?

查看:59
本文介绍了在Docker容器中运行Kafka集群?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从性能的角度来看,在Docker容器中运行Kafka是一个不错的选择吗?是否有一些应该注意,特别调音的内容??

From a performance perspective, is it a good choice to run Kafka in Docker containers ? Are there things which one should watch out for, tune specifically etc. ?

推荐答案

有一个很好的-到现在为止还有些陈旧,但是我确信基本陈述仍然适用,并且仅在改进上.要点是,Docker在cpu和内存方面引入的开销非常小,但是对于IO繁重的应用程序,您需要多加注意.根据工作量,我会将Kafka摆在IO重负荷组中,因此这可能不是一件容易的事.Kafka可以从快速的磁盘访问中受益匪浅,因此,如果您在某种分布式平台上运行容器,并在SAN或NFS共享上附加存储,或者像我想的那样,那您会发现有所不同.但是,如果您只选择容器来简化部署并在一台物理计算机上运行它们,那么我认为差异可以忽略不计.

There is a good research paper from IBM on this topic - it is a bit dated by now, but I am sure the basic statements still hold true and have only been improved upon. The gist is, that the overhead introduced by Docker is quite small where it comes to cpu and memory, but for IO heavy applications you need to be a bit more careful. Depending on the workload I'd put Kafka squarely in the IO heavy group, so it is probably not a no-brainer. Kafka benefits a lot from fast disc access, so if you run your containers in some sort of distributed platform with storage attached on a SAN or NFS share or something like that I'd assume, that you will notice a difference. But if you only chose containers to ease deployment and run them on one physical machine, I'd assume the difference to be negligible.

但是与所有性能问题一样,通常很难这样说,您必须测试您的特定用例和环境才能确定.

But as with all performance questions, it is hard to say this in general, you'll have to test your specific use case and environment to be sure.

这篇关于在Docker容器中运行Kafka集群?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆