简体   繁体   English

在Mesos上运行多个Kafka经纪人作为马拉松工作

[英]Running multiple Kafka brokers on Mesos as Marathon jobs

I want to run multiple Kafka brokers on Mesos as Marathon jobs. 我想在Mesos上运行多个Kafka经纪人作为马拉松工作。 I'm thinking what to use as a broker ID. 我在想什么作为经纪人ID使用。 I know that some people are using IP based broker ID, but I read that this approach is not optimal for situations when migrating the brokers to different machines. 我知道有些人正在使用基于IP的代理ID,但我读到这种方法对于将代理迁移到不同的机器时的情况并不是最佳的。 Any insights? 任何见解?

Related to that, is there a way to do a rolling deploy of Kafka brokers in a way that Marathon waits for the old broker instances to replicate the data to the new ones before killing them. 与此相关的是,有没有办法以一种方式对Kafka代理进行滚动部署,以便Marathon在杀死它们之前等待旧代理实例将数据复制到新代理。

I created a Docker image which can start on Marathon and also scale up and down. 我创建了一个Docker镜像 ,它可以从Marathon开始,也可以向上和向下扩展。 To get a unique broker id, I concatenate the last octet of the IP address and the port number which Marathon devises to the Docker container. 为了获得唯一的代理ID,我将IP地址的最后一个八位字节和Marathon为Docker容器设计的端口号连接起来。

I understood that this shouldn't be a problem, because normally the clients connect via ZooKeeper, which itself has the nodes and their connection info, so you shouldn't need to take care of the details. 我明白这应该不是问题,因为通常客户端通过ZooKeeper连接,ZooKeeper本身有节点及其连接信息,因此您不需要处理细节。 Or I misunderstood the question... 或者我误解了这个问题......

Have a look at 看一下

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

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